diff --git a/cidfmap b/cidfmap new file mode 100644 index 0000000..99c0f4a --- /dev/null +++ b/cidfmap @@ -0,0 +1,8 @@ +%! +% Don't change following line. We should ensure that the original one is surely loaded. +(cidfmap.GS) .runlibfile +% following lines are for CJK fonts. +(cidfmap.ja) .runlibfileifexists +(cidfmap.ko) .runlibfileifexists +(cidfmap.zh_CN) .runlibfileifexists +(cidfmap.zh_TW) .runlibfileifexists diff --git a/ghostscript.spec b/ghostscript.spec index ee55648..78b667d 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -1,11 +1,12 @@ %define gs_ver 8.15 %define gs_rc rc4 +%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}} Summary: A PostScript(TM) interpreter and renderer. Name: ghostscript Version: %{gs_ver} BuildRequires: libjpeg-devel -Release: 0.%{?gs_rc:%gs_rc.}1 +Release: 0.%{?gs_rc:%gs_rc.}2 License: GPL URL: http://www.cups.org/espgs/ @@ -14,6 +15,7 @@ Source0: ftp://ftp.rz.tu-bs.de/pub/mirror/ftp.easysw.com/ftp/pub/ghostscript/%{? Source1: FAPIcidfmap Source2: adobe-cmaps-200204.tar.gz Source3: acro5-cmaps-2001.tar.gz +Source4: cidfmap Patch1: ghostscript-build.patch Patch2: ghostscript-gtk2.patch @@ -34,7 +36,7 @@ BuildRequires: glib2-devel, XFree86-devel BuildRequires: libxml2-devel BuildRequires: libtiff-devel BuildRequires: cups-devel >= 1.1.13 -BuildPreReq: freetype-devel +%{?_with_freetype:BuildRequires: freetype-devel} BuildRoot: %{_tmppath}/%{name}-%{gs_ver}-root # See bug #83516. @@ -131,11 +133,16 @@ automake --add-missing --copy || : # Ships with broken symlinks make cd .. +%if %{build_with_freetype} FT_CFLAGS=$(pkg-config --cflags freetype2) make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} \ FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} \ FT_BRIDGE=1 FT_CFLAGS="$FT_CFLAGS" FT_LIB=freetype +%else +make so RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} +make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" prefix=%{_prefix} +%endif %install rm -rf $RPM_BUILD_ROOT @@ -144,6 +151,7 @@ mkdir -p $RPM_BUILD_ROOT/{%{_mandir},%{_bindir},%{_datadir},%{_docdir}} mkdir -p $RPM_BUILD_ROOT/{%{_libdir},%{_includedir}/ijs} make install soinstall \ +%{?_with_freetype:FT_BRIDGE=1} \ prefix=$RPM_BUILD_ROOT%{_prefix} \ mandir=$RPM_BUILD_ROOT%{_mandir} \ datadir=$RPM_BUILD_ROOT%{_datadir} \ @@ -155,8 +163,7 @@ make install soinstall \ gssharedir=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{gs_ver} \ CUPSSERVER=$RPM_BUILD_ROOT`cups-config --serverbin` \ CUPSCONFIG=$RPM_BUILD_ROOT`cups-config --serverroot` \ - CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir` \ - FT_BRIDGE=1 + CUPSDATA=$RPM_BUILD_ROOT`cups-config --datadir` mv -f $RPM_BUILD_ROOT%{_bindir}/gsc $RPM_BUILD_ROOT%{_bindir}/gs @@ -169,9 +176,12 @@ ln -sf gs $RPM_BUILD_ROOT/usr/bin/ghostscript # Rename an original FAPIcidfmap to FAPIcidfmap.GS mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_ver}/lib/FAPIcidfmap{,.GS} -# Install our own FAPIcidfmap to allow the separated -# FAPIcidfmap which the font packages own. +# Rename an original cidfmap to cidfmap.GS +mv $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_ver}/lib/cidfmap{,.GS} +# Install our own FAPIcidfmap/cidfmap to allow the separated +# FAPIcidfmap/cidfmap which the font packages own. install -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_ver}/lib/FAPIcidfmap +install -m0644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_ver}/lib/cidfmap # Install adobe/acro5 CMaps (bug #165428). tar zxf %{SOURCE2} -C $RPM_BUILD_ROOT%{_datadir}/%{name}/%{gs_ver}/Resource @@ -253,6 +263,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Mon Aug 15 2005 Tim Waugh 8.15-0.rc4.2 +- Parametrize freetype, and disable it (bug #165962). + * Fri Aug 12 2005 Tim Waugh 8.15-0.rc4.1 - 8.15rc4. - Fixed lips4v driver (bug #165713).