%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc %define freetype_version 2.0.9 Summary: Font configuration and customization library Name: fontconfig Version: 2.2.2 Release: 6 License: MIT Group: System Environment/Libraries Patch0: fontconfig-2.2.2-aix.patch Patch1: fontconfig-2.2.2-autotools.patch URL: http://fontconfig.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Source: %{name}-%{version}.tar.bz2 PreReq: freetype2 >= %{freetype_version} BuildRequires: freetype2-devel >= %{freetype_version} %description Fontconfig is designed to locate fonts within the system and select them according to requirements specified by applications. %package devel Summary: Font configuration and customization library Group: Development/Libraries Requires: %{name} = %{version} Requires: freetype2-devel >= %{freetype_version} # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %define prefix64 %{_prefix}/64 %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. %prep %setup -q if test x$PATCH = x ; then PATCH=/opt/freeware/bin/patch ; fi $PATCH -p2 -s < %{_sourcedir}/fontconfig-2.2.2-aix.patch #$PATCH -p2 -s < %{_sourcedir}/fontconfig-2.2.2-autotools.patch %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## # Test whether we can run a 64bit command so we don't waste our time /usr/bin/locale64 >/dev/null 2>&1 mkdir 64bit cd 64bit bzip2 -dc %{_sourcedir}/%{name}-%{version}.tar.bz2 |tar xf - cd %{name}-%{version} $PATCH -p2 -s < %{_sourcedir}/fontconfig-2.2.2-aix.patch #$PATCH -p2 -s < %{_sourcedir}/fontconfig-2.2.2-autotools.patch %endif %build export OBJECT_MODE=32 ./configure --prefix=%{_prefix} --with-freetype-config=/opt/freeware/bin/freetype-config \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 --disable-static gmake %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/%{name}-%{version} export OBJECT_MODE=64 ./configure --prefix=%{_prefix} --with-freetype-config=/opt/freeware/bin/freetype-config \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 --disable-static gmake # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../.. /usr/bin/ar -q src/.libs/libfontconfig.a 64bit/%{name}-%{version}/src/.libs/libfontconfig.so.1 %endif #BUILD64 %install if test "%{buildroot}" != "/"; then rm -rf %{buildroot} fi mkdir -p %{buildroot} gmake DESTDIR=%{buildroot} install # make links cd %{buildroot} for dir in lib include bin do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p %{buildroot}%{_prefix}/64/lib cd %{buildroot}%{_prefix}/64/lib ln -sf ../../../..%{_prefix}/lib/* . ) %endif %post # Force regeneration of all fontconfig cache files. %{_bindir}/fc-cache -f >/dev/null 2>&1 # Prototype support gtk 64 bit mkdir -p /opt/freeware/64/lib cd /opt/freeware/64/lib ln -sf /opt/freeware/lib/libfontconfig.a . %files %defattr(-, root, system) %doc README AUTHORS COPYING %{_libdir}/libfontconfig.a %{_bindir}/fc-cache %{_bindir}/fc-list %{_sysconfdir}/fonts /usr/bin/fc-cache /usr/bin/fc-list /usr/lib/libfontconfig.a %if %{BUILD64} == 1 %attr(755,bin,bin) %dir %{prefix64} %attr(755,bin,bin) %dir %{prefix64}/lib %{prefix64}/lib/lib*.a %endif %files devel %defattr(-, root, system) %{_libdir}/libfontconfig.la %{_libdir}/pkgconfig/*.pc %{_includedir}/fontconfig %{_mandir}/man1/* %{_mandir}/man3/* /usr/include/fontconfig %changelog * Fri Dec 23 2005 BULL - Release 5 - Prototype gtk 64 bit * Wed Nov 16 2005 BULL - Release 4 * Mon May 30 2005 BULL - Release 3 - .o removed from lib * Fri Sep 24 2004 BULL - Release 2 - Package the directories /opt/freeware/etc/fonts, /opt/freeware/include/fontconfig and /usr/include/fontconfig along with their contents