2 Summary: A free and portable font rendering engine
5 Group: Graphics/Font Management
7 Url: http://www.freetype.org
8 Source0: http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-%{version}.tar.gz
9 Source1001: packaging/freetype2.manifest
10 BuildRequires: pkgconfig(libpng)
11 Requires(post): /sbin/ldconfig
12 Requires(postun): /sbin/ldconfig
13 Provides: %{name}-bytecode
16 The FreeType engine is a free and portable font rendering
17 engine, developed to provide advanced font support for a variety of
18 platforms and environments. FreeType is a library which can open and
19 manages font files as well as efficiently load, hint and render
20 individual glyphs. FreeType is not a font server or a complete
21 text-rendering library.
23 %package -n libfreetype
24 Summary: A TrueType Font Library
25 Group: Graphics/Font Management
27 %description -n libfreetype
28 This library features TrueType fonts for open source projects. This
29 version also contains an autohinter for producing improved output.
32 Summary: FreeType development libraries and header files
33 Group: Development/Libraries
34 Requires: libfreetype = %{version}
37 Provides: freetype-devel
40 The freetype-devel package includes the static libraries and header files
41 for the FreeType font rendering engine.
43 Install freetype-devel if you want to develop programs which will use
49 %setup -q -n freetype-%{version}
53 export CFLAGS+=" -fstack-protector-strong -D_FORTIFY_SOURCE=2"
54 export LDFLAGS+=" -Wl,-z,relro"
56 %configure --disable-static --enable-freetype-config
57 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool
58 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool
64 %makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
67 %ifarch x86_64 s390x ia64 ppc64 alpha sparc64 aarch64
73 mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
74 $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
75 cat >$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h <<EOF
76 #ifndef __FTCONFIG_H__MULTILIB
77 #define __FTCONFIG_H__MULTILIB
79 #include <bits/wordsize.h>
82 # include "ftconfig-32.h"
83 #elif __WORDSIZE == 64
84 # include "ftconfig-64.h"
86 # error "unexpected value for __WORDSIZE macro"
92 # Don't package static a or .la files
93 rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
96 %post -n libfreetype -p /sbin/ldconfig
98 %postun -n libfreetype -p /sbin/ldconfig
100 %files -n libfreetype
101 %manifest %{name}.manifest
102 %defattr(-,root,root,-)
103 %{_libdir}/libfreetype.so.*
104 %license docs/FTL.TXT
107 %manifest %{name}.manifest
108 %defattr(-,root,root,-)
109 %dir %{_includedir}/freetype2
110 %{_datadir}/aclocal/freetype2.m4
111 %{_includedir}/freetype2/*
112 %{_libdir}/libfreetype.so
113 %{_bindir}/freetype-config
114 %{_libdir}/pkgconfig/*.pc
115 %{_datadir}/man/man1/*