%define _libdir64 %{_prefix}/lib64 Summary: A free and portable font rendering engine Name: freetype2 Version: 2.10.2 Release: 1 License: BSD/GPL dual license Group: System Environment/Libraries URL: http://www.freetype.org Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.gz Source1: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.gz.sig Source2: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.gz Source3: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.gz.sig Source4: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.gz Source5: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.gz.sig Source10: ftconfig.h Patch0: %{name}-%{version}-aix.patch BuildRequires: bzip2 >= 1.0.2-4 BuildRequires: libpng-devel >= 1.6.37-1 BuildRequires: zlib-devel >= 1.2.3-7 BuildRequires: coreutils, make Requires: bzip2 >= 1.0.2-4 Requires: libpng >= 1.6.37-1 Requires: zlib >= 1.2.3-7 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root %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} %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 >= 1.2.3-7 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_r -q64" or "gcc -maix64". %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n freetype-%{version} -b 2 -a 4 %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="cc_r" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 GNUMAKE=gmake ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-shared --enable-static \ --with-zlib=yes \ --with-bzip2=yes \ --with-png=yes \ --with-harfbuzz=no gmake %{?_smp_mflags} # Build demos cd ft2demos-%{version} gmake TOP_DIR=".." %{?_smp_mflags} cd .. cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 GNUMAKE=gmake ./configure \ --prefix=%{_prefix} \ --enable-shared --enable-static \ --with-zlib=yes \ --with-bzip2=yes \ --with-png=yes \ --with-harfbuzz=no gmake %{?_smp_mflags} # Build demos cd ft2demos-%{version} gmake TOP_DIR=".." %{?_smp_mflags} %install export PATH=/opt/freeware/bin:$PATH [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install mkdir -p ${RPM_BUILD_ROOT}%{_bindir} cat builds/unix/freetype-config | sed 's/pkg-config/pkg-config_64/g' > ${RPM_BUILD_ROOT}%{_bindir}/freetype-config # unfortunately this will be overwritten again by the 32-bit installation # as 'make install' makes a 'rm -rf %{_includedir}/freetype2 mv ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig.h ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig-ppc64.h for f in ftbench ftdiff ftdump ftgamma ftgrid ftlint ftmulti ftstring ftvalid ftview ttdebug ; do cp ft2demos-%{version}/bin/.libs/${f} ${RPM_BUILD_ROOT}%{_bindir}/ done ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install cp builds/unix/freetype-config ${RPM_BUILD_ROOT}%{_bindir}/ mv ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig.h ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig-ppc32.h # redo this step again.... cp ../64bit/builds/unix/ftconfig.h ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig-ppc64.h cp %{SOURCE10} ${RPM_BUILD_ROOT}%{_includedir}/freetype2/freetype/config/ftconfig.h for f in ftbench ftdiff ftdump ftgamma ftgrid ftlint ftmulti ftstring ftvalid ftview ttdebug ; do cp ft2demos-%{version}/bin/.libs/${f} ${RPM_BUILD_ROOT}%{_bindir}/ done chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/* || : /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libfreetype.a ${RPM_BUILD_ROOT}%{_libdir64}/libfreetype.so* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/ChangeLog 32bit/README %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files demos %defattr(-,root,system) %{_bindir}/ft* /usr/bin/ft* %files devel %defattr(-,root,system) %{_bindir}/freetype-config* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %{_datadir}/aclocal/* /usr/bin/freetype-config* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Mon Jun 22 2020 Michael Perzl - 2.10.2-1 - updated to version 2.10.2 * Wed Jul 03 2019 Michael Perzl - 2.10.1-1 - updated to version 2.10.1 * Mon Apr 08 2019 Michael Perzl - 2.10.0-1 - updated to version 2.10.0 * Thu Nov 01 2018 Michael Perzl - 2.9.1-2 - added the missing ftconfig-ppc64.h header file for 64-bit compiles * Tue Jun 19 2018 Michael Perzl - 2.9.1-1 - updated to version 2.9.1 * Tue Jan 09 2018 Michael Perzl - 2.9-1 - updated to version 2.9 * Wed Sep 20 2017 Michael Perzl - 2.8.1-1 - updated to version 2.8.1 * Thu Aug 10 2017 Michael Perzl - 2.8-1 - updated to version 2.8 * Thu Jan 05 2017 Michael Perzl - 2.7.1-1 - updated to version 2.7.1 * Fri Oct 14 2016 Michael Perzl - 2.7-1 - updated to version 2.7 * Wed Jul 27 2016 Michael Perzl - 2.6.5-1 - updated to version 2.6.5 * Wed Jul 27 2016 Michael Perzl - 2.6.4-1 - updated to version 2.6.4 * Sun May 01 2016 Michael Perzl - 2.6.3-1 - updated to version 2.6.3 * Tue Feb 02 2016 Michael Perzl - 2.6.2-1 - updated to version 2.6.2 * Tue Feb 02 2016 Michael Perzl - 2.6.1-1 - updated to version 2.6.1 * Tue Feb 02 2016 Michael Perzl - 2.6-1 - updated to version 2.6 * Mon Apr 01 2015 Michael Perzl - 2.5.5-1 - updated to version 2.5.5 * Tue Dec 09 2014 Michael Perzl - 2.5.4-1 - updated to version 2.5.4 * Mon Mar 17 2014 Michael Perzl - 2.5.3-1 - updated to version 2.5.3 * Wed Dec 11 2013 Michael Perzl - 2.5.2-1 - updated to version 2.5.2 * Wed Dec 04 2013 Michael Perzl - 2.5.1-1 - skipped due to bugs * Thu Jun 20 2013 Michael Perzl - 2.5.0-1 - updated to version 2.5.0 * Mon Jun 17 2013 Michael Perzl - 2.4.12-1 - updated to version 2.4.12 * Mon Jan 07 2013 Michael Perzl - 2.4.11-1 - updated to version 2.4.11 * Tue Jun 19 2012 Michael Perzl - 2.4.10-1 - updated to version 2.4.10 * Tue Jun 19 2012 Michael Perzl - 2.4.10-1 - updated to version 2.4.10 * Wed Mar 14 2012 Michael Perzl - 2.4.9-1 - updated to version 2.4.9 * Wed Nov 16 2011 Michael Perzl - 2.4.8-1 - updated to version 2.4.8 * Mon Nov 07 2011 Michael Perzl - 2.4.7-1 - updated to version 2.4.7 * Mon Aug 01 2011 Michael Perzl - 2.4.6-1 - updated to version 2.4.6 * Mon Jun 27 2011 Michael Perzl - 2.4.5-1 - updated to version 2.4.5 * Mon Dec 06 2010 Michael Perzl - 2.4.4-1 - updated to version 2.4.4 * Thu Oct 07 2010 Michael Perzl - 2.4.3-1 - updated to version 2.4.3 * Thu Aug 26 2010 Michael Perzl - 2.4.2-1 - updated to version 2.4.2 * Tue Aug 03 2010 Michael Perzl - 2.4.1-1 - updated to version 2.4.1 * Tue Jul 13 2010 Michael Perzl - 2.4.0-1 - updated to version 2.4.0 * Thu Apr 08 2010 Michael Perzl - 2.3.12-1 - updated to version 2.3.12 * Tue Nov 17 2009 Michael Perzl - 2.3.11-1 - updated to version 2.3.11 * Tue Jul 07 2009 Michael Perzl - 2.3.9-1 - updated to version 2.3.9 * 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