%global _libdir64 %{_libdir}64 Summary: A free and portable font rendering engine Name: freetype2 Version: 2.12.1 Release: 1 License: BSD/GPL dual license Group: System Environment/Libraries URL: http://www.freetype.org Source0: https://download.savannah.gnu.org/releases/freetype//freetype-%{version}.tar.xz Source1: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz.sig Source2: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz Source3: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz.sig Source4: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz Source5: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz.sig BuildRequires: zlib-devel BuildRequires: coreutils Requires: zlib >= 1.2.11 Requires: bzip2 >= 1.0.8 Requires: libgcc >= 8.3.0 Requires: libpng >= 1.6.27 %description The FreeType engine is a free and portable font rendering engine, developed to provide advanced font support for a variety of platforms and environments. FreeType is a library which can open and manages font files as well as efficiently load, hint and render individual glyphs. FreeType is not a font server or a complete text-rendering library. The library is available as 32-bit and 64-bit. %package demos Summary: A collection of FreeType demos Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: libpng >= 1.6.27 Requires: bzip2 >= 1.0.8 %description demos The FreeType engine is a free and portable font rendering engine, developed to provide advanced font support for a variety of platforms and environments. The demos package includes a set of useful small utilities showing various capabilities of the FreeType library. %package devel Summary: FreeType development libraries and header files Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: zlib-devel Requires: pkg-config %description devel The freetype-devel package includes the static libraries and header files for the FreeType font rendering engine. Install freetype-devel if you want to develop programs which will use FreeType. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q -n freetype-%{version} -b 2 -a 4 rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit %build # setup environment for 32-bit and 64-bit builds export AR="/usr/bin/ar -X32_64" export NM="/usr/bin/nm -X32_64" # first build the 64-bit version cd 64bit export CC="/opt/freeware/bin/gcc -O2 -maix64" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export OBJECT_MODE=64 GNUMAKE=gmake ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --enable-freetype-config \ --with-png=yes \ --with-zlib=yes \ --with-bzip2=yes gmake %{?_smp_mflags} # Build demos cd ft2demos-%{version} env gmake TOP_DIR=".." %{?_smp_mflags} LDFLAGS="-L%{_builddir}/freetype-%{version}/64bit/objs/.libs $LDFLAGS" # now build the 32-bit version cd ../../32bit export CC="/opt/freeware/bin/gcc -O2 -maix32 -D_LARGE_FILES" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" export OBJECT_MODE=32 GNUMAKE=gmake ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --enable-freetype-config \ --with-png=yes \ --with-zlib=yes \ --with-bzip2=yes gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q objs/.libs/libfreetype.a ../64bit/objs/.libs/libfreetype.so.6 # Build demos cd ft2demos-%{version} gmake TOP_DIR=".." %{?_smp_mflags} LDFLAGS="-L%{_builddir}/freetype-%{version}/32bit/objs/.libs $LDFLAGS" %install export PATH=/opt/freeware/bin:$PATH [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT # install on 64bit mode cd 64bit export OBJECT_MODE=64 gmake DESTDIR=$RPM_BUILD_ROOT install for f in ftbench ftdiff ftdump ftgamma ftgrid ftlint ttdebug \ ftmulti ftstring ftvalid ftview ; do builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$f $RPM_BUILD_ROOT%{_bindir} done ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) # install on 32bit mode cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=$RPM_BUILD_ROOT install for f in ftbench ftdiff ftdump ftgamma ftgrid ftlint ftmulti ftstring ftvalid ftview ttdebug \ ftmulti ftstring ftvalid ftview ; do builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$f $RPM_BUILD_ROOT%{_bindir} done ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) /usr/bin/strip -X32_64 $RPM_BUILD_ROOT%{_bindir}/* || : %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,system) %doc 32bit/ChangeLog 32bit/README %{_libdir}/*.a %files demos %defattr(-,root,system) %{_bindir}/ft* %{_bindir}/ttdebug* %files devel %defattr(-,root,system) %{_bindir}/freetype-config* %{_includedir}/* %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/* %changelog * Wed Jun 15 2022 Sangeetha Bandi - 2.12.1-1 - Update to 2.12.1 - Fixed CVE-2022-27406 & CVE-2022-27404 * Tue Aug 10 2021 Reshma V Kumar - 2.10.4-1 - Update to 2.10.4 * Fri Jan 16 2009 Michael Perzl - 2.3.8-1 - updated to version 2.3.8 * Mon Jul 07 2008 Michael Perzl - 2.3.7-1 - updated to version 2.3.7 * Tue Jun 24 2008 Michael Perzl - 2.3.6-1 - updated to version 2.3.6 * Sat Mar 28 2008 Michael Perzl - 2.3.5-1 - first version for AIX V5.1 and higher