%ifos aix6.1 || %ifos aix7.1 %global p7build 1 %else %global p7build 0 %endif %define freetype_version 2.5.5 Summary: Font configuration and customization library Name: fontconfig Version: 2.11.0 %if %{p7build} Release: 1.p7 %else Release: 1 %endif License: MIT Group: System Environment/Libraries Source0: http://fontconfig.org/release/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-aix.patch URL: http://fontconfig.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gawk, make, patch BuildRequires: gcc >= 4.5.4-1 BuildRequires: expat-devel >= 2.1.1-1 BuildRequires: freetype2-devel >= %{freetype_version} Requires: expat >= 2.1.1-1 Requires: freetype2 >= %{freetype_version} %if %{p7build} %ifos aix6.1 Requires: AIX-rpm >= 6.1.8.0 %endif %ifos aix7.1 Requires: AIX-rpm >= 7.1.3.0 %endif %endif %define _libdir64 %{_prefix}/lib64 %description Fontconfig is designed to locate fonts within the system and select them according to requirements specified by applications. The library is available as 32-bit and 64-bit. %package devel Summary: Font configuration and customization library Group: Development/Libraries Requires: fontconfig = %{version}-%{release} Requires: expat-devel >= 2.1.1-1 Requires: freetype2-devel >= %{freetype_version} Requires: pkg-config %description devel The fontconfig-devel package includes the header files, and developer docs for the fontconfig package. Install fontconfig-devel if you want to develop programs which will use fontconfig. 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 %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 PATH=/opt/freeware/bin:$PATH # we don't want to rebuild the docs, but we want to install the included ones. export HASDOCBOOK=no export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -D_LARGE_FILES -D_LINUX_SOURCE_COMPAT -O6 -I/opt/freeware/include" %if %{p7build} export CFLAGS="-mtune=power7 -mcpu=power7 ${CFLAGS}" %endif export RM="/usr/bin/rm -f" cd 64bit # first build the 64-bit version export CC="gcc -maix64 -pthread" export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export CC="gcc -maix32 -pthread" export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install ( 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 /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}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.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} %post umask 0022 mkdir -p %{_localstatedir}/cache/fontconfig # Remove stale caches rm -f %{_localstatedir}/cache/fontconfig/????????????????????????????????*.cache-? rm -f %{_localstatedir}/cache/fontconfig/stamp # Force regeneration of all fontconfig cache files # The check for existance is needed on dual-arch installs (the second # copy of fontconfig might install the binary instead of the first) # The HOME setting is to avoid problems if HOME hasn't been reset if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then HOME=/ /usr/bin/fc-cache -f fi %files %defattr(-,root,system) %doc 32bit/README 32bit/AUTHORS 32bit/COPYING %doc 32bit/doc/fontconfig-user.txt 32bit/doc/fontconfig-user.html %doc 32bit/doc/fontconfig-user.pdf %{_bindir}/* %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/conf.avail %config %{_datadir}/%{name}/conf.avail/*.conf %dir %{_sysconfdir}/fonts %config %{_sysconfdir}/fonts/fonts.conf %dir %{_sysconfdir}/fonts/conf.d %config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf %{_datadir}/xml/%{name} %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %doc %{_sysconfdir}/fonts/conf.d/README %dir %{_localstatedir}/cache/fontconfig %{_mandir}/man1/* %{_mandir}/man5/* /usr/bin/* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %doc 32bit/doc/fontconfig-devel.txt 32bit/doc/fontconfig-devel %doc 32bit/doc/fontconfig-devel.pdf %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_includedir}/* %{_mandir}/man3/* /usr/lib/*.la /usr/lib64/*.la /usr/include/* %changelog * Tue May 24 2016 Michael Perzl - 2.11.0-1 - updated to version 2.11.0 * Mon Jan 07 2013 Michael Perzl - 2.10.2-1 - updated to version 2.10.2 * Wed Aug 29 2012 Michael Perzl - 2.10.1-1 - updated to version 2.10.1 * Thu Apr 19 2012 Michael Perzl - 2.9.0-1 - updated to version 2.9.0 * Mon Jul 04 2011 Michael Perzl - 2.8.0-2 - added missing 64-bit pkg-config file and RTL-style shared libraries * Thu Nov 19 2009 Michael Perzl - 2.8.0-1 - updated to version 2.8.0 * Thu Nov 19 2009 Michael Perzl - 2.7.3-1 - updated to version 2.7.3 * Wed Sep 02 2009 Michael Perzl - 2.7.2-1 - updated to version 2.7.2 * Mon Jul 06 2009 Michael Perzl - 2.7.0-1 - updated to version 2.7.0 * Tue Jul 08 2008 Michael Perzl - 2.6.0-1 - updated to version 2.6.0 * Wed Apr 23 2008 Michael Perzl - 2.5.0-2 - some minor spec file fixes * Tue Apr 01 2008 Michael Perzl - 2.5.0-1 - first version for AIX V5.1 and higher