Summary: FreeType library Name: freetype2 Version: 2.1.5 Release: 2 Source0: http://prdownloads.sourceforge.net/freetype/freetype-%{version}.tar.bz2 Source1: http://prdownloads.sourceforge.net/freetype/ftdocs-%{version}.tar.bz2 Patch0: %{name}-conf.patch URL: http://www.freetype.org/ Copyright: BSD-Like Group: System Environment/Libraries BuildRoot: /var/tmp/freetype BuildRequires: libtool >= 1.4.2 Prefix:%{_prefix} %define prefix64 %{prefix}/64 %define DEFCC cc # Use --define 'no64 1' on the command line to disable 64bit build %{!?no64:%define BUILD64 1} %{?no64:%define BUILD64 0} %description FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable and portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display servers, font conversion tools, text image generation tools, and many other products as well.. Note that FreeType 2 is a font service and doesn't provide APIs to perform higher-level features, like text layout or graphics processing (e.g. colored text rendering, "hollowing", etc..). However, it greatly simplifies these tasks by providing a simple, easy to use and uniform interface to access the content of font files. %package devel Summary: FreeType development headers and libraries Group: Development/Libraries Requires: %{name} = %{version} %description devel Headers and documentation for the FreeType 2 software font engine. %prep %setup -q -b 1 -n freetype-%{version} %patch0 -p1 -b .conf %if %{BUILD64} == 1 # Prep 64-bit build in 64bit subdirectory ########################################## mkdir 64bit cd 64bit bzip2 -dc %{SOURCE0} |tar -xf - cd freetype-%{version} %patch0 -p1 -b .conf %endif %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if [[ "$CC" != "gcc" ]] then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` fi export OBJECT_MODE=32 #just in case make setup CFG="--prefix=%{prefix} --disable-static" make %if %{BUILD64} == 1 # Now build again as 64bit ########################### cd 64bit/freetype-%{version} export OBJECT_MODE=64 make setup CFG="--prefix=%{prefix64} --disable-static" make # Go back to 32-bit library and add our 64bit shared object # into same archive cd ../../objs/.libs /usr/bin/ar -q libfreetype.a ../../64bit/freetype-%{version}/objs/.libs/libfreetype.so.* %endif #BUILD64 %install INSTDIR=%{prefix} make install prefix=$RPM_BUILD_ROOT$INSTDIR /usr/bin/strip $RPM_BUILD_ROOT$INSTDIR/bin/* 2>/dev/null || : (cd $RPM_BUILD_ROOT mkdir -p usr/include cd usr/include ln -sf ../..%{prefix}/include/* . cd - mkdir -p usr/linux/bin cd usr/linux/bin ln -sf ../../..%{prefix}/bin/* . cd - mkdir -p usr/lib cd usr/lib ln -sf ../..%{prefix}/lib/libfreetype.la . cd - mkdir -p usr/linux/lib cd usr/linux/lib ln -sf ../../..%{prefix}/lib/libfreetype.a . cd - ) ( cd $RPM_BUILD_ROOT/%{prefix}/lib # Create a compatibility member to mitigate differences with Bull Freeware # offering COMPATMEMBER=shr.o for lib in *.a do /usr/bin/dump -Tv $lib |/usr/bin/awk 'match($4,"EXP|Exp") { print $NF }' > tmp.exp libbase=`print $lib | sed -e 's/.a$//' -e 's/^lib//'` ld -L. -bI:tmp.exp -bE:tmp.exp -l$libbase -bM:SRE -bnoentry -o $COMPATMEMBER /usr/bin/strip -e $COMPATMEMBER # Make shr.o a load-only module /usr/bin/ar -r $lib $COMPATMEMBER rm -f $COMPATMEMBER tmp.exp done ) %if %{BUILD64} == 1 #Add links for 64-bit library members ( mkdir -p $RPM_BUILD_ROOT/%{prefix64}/lib cd $RPM_BUILD_ROOT/%{prefix64}/lib ln -s ../../lib/*.a . ) %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644, root, root, 755) %doc docs/license.txt docs/FTL.txt docs/GPL.txt docs/PATENTS %{prefix}/lib/libfreetype.a /usr/linux/lib/libfreetype.a %if %{BUILD64} == 1 %dir %{prefix64} %dir %{prefix64}/lib %{prefix64}/lib/libfreetype.a %endif %files devel %defattr(644, root, root, 755) %doc README* docs/ %{prefix}/include/* %attr(0755, root, system) %{prefix}/bin/* /usr/include/freetype2 /usr/include/ft2build.h /usr/linux/bin/* %{prefix}/lib/libfreetype.la /usr/lib/libfreetype.la %changelog * Thu Feb 05 2004 David Clissold 2.1.5-2 - Add 64-bit shared library build. * Tue Dec 09 2003 David Clissold 2.1.5-1 - Update to 2.1.5 * Fri May 09 2003 David Clissold - Update to 2.1.4 * Wed Sep 18 2002 David Clissold - Update to 2.0.9 * Mon Sep 17 2001 David Clissold - Update to 2.0.4 * Wed Apr 11 2001 David Clissold - Link into /usr/linux/lib instead of /usr/lib * Thu Mar 22 2001 Marc Stephenson - Build both 32- and 64-bit libraries * Sun Mar 18 2001 Marc Stephenson - Use libtool 1.3.5a via libtoolize * Fri Mar 09 2001 Marc Stephenson - Rebuild against new shared objects - Use libtool 1.3.5a - Insert Bull freeware compatibility member * Thu Feb 15 2001 David Clissold - Strip the executable binaries * Thu Feb 15 2001 aixtoolbox - Account for different standard lib location in IA64 32-bit ABI * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Wed Jun 16 1999 Werner Lemberg - Updated to version 1.3. * Sun Oct 25 1998 Pavel Kankovsky - libttf.so version number updated again. - Default localedir based on prefix. - File list adjustments (howto/). * Sun Oct 16 1998 Pavel Kankovsky - Source filename fixed. - HOWTO removed. - libttf.so version number updated. * Tue Sep 29 1998 Robert Wilhelm - Updated to version 1.2. * Thu Sep 9 1998 Pavel Kankovsky - Simplified (and fixed) file list. * Tue Jul 14 1998 Alexander Zimmermann - Added missing files. - Added %defattr tags. * Thu Jun 18 1998 Robert Wilhelm - Added lots of attr(-,root,root). * Wed May 27 1998 Pavel Kankovsky - Changed group attr of freetype and freetype-devel package. - Fixed misc glitches. * Sun May 24 1998 Pavel Kankovsky - Split the package into three parts (runtime library, development tools, and demo programs). - Added missing files (headers, NLS). - Added ldconfing upon (de)installation. * Thu Mar 12 1998 Bruno Lopes F. Cabral - NLS for Portuguese language is missing, sorry (may be in a near future) (please note the workaround using --with-locale-dir and gnulocaledir. NLS Makefile needs a bit more rework but again I'll not patch it here).