From 5fdf55a3e16b9c40364ba061c94a180fc132b0d1de8d988d40e14e685ed23bc0 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Fri, 11 May 2012 10:09:58 +0000 Subject: [PATCH] Accepting request 120699 from home:jsmeix:branches:Printing Require the Ghostscript font packages because Ghostscript requires its fonts to be there. Provide catalog.devices OBS-URL: https://build.opensuse.org/request/show/120699 OBS-URL: https://build.opensuse.org/package/show/Printing/ghostscript?expand=0&rev=15 --- ghostscript-mini.changes | 14 ++++++++++++++ ghostscript-mini.spec | 23 +++++++++++++++++++++-- ghostscript.changes | 14 ++++++++++++++ ghostscript.spec | 25 +++++++++++++++++++++---- 4 files changed, 70 insertions(+), 6 deletions(-) diff --git a/ghostscript-mini.changes b/ghostscript-mini.changes index 33a74cf..1e8c77a 100644 --- a/ghostscript-mini.changes +++ b/ghostscript-mini.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu May 10 15:49:33 CEST 2012 - jsmeix@suse.de + +- Require Ghostscript's font packages because the + Ghostscript package provides the "Fontmap" file + /usr/share/ghostscript//Resource/Init/Fontmap.GS + which lists Ghostscript's fonts but the fonts itself + are provided in the separated packages ghostscript-fonts-std + and ghostscript-fonts-other so that a RPM requirement + is needed to make sure that Ghostscript has its fonts. +- Extract the catalog of devices which are actually built-in + in exactly this Ghostscript and provide it as catalog.devices + in the Ghostscript package. + ------------------------------------------------------------------- Tue Apr 24 14:30:45 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript-mini.spec b/ghostscript-mini.spec index 55206d0..bbc7a2d 100644 --- a/ghostscript-mini.spec +++ b/ghostscript-mini.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: ghostscript-mini BuildRequires: freetype2-devel BuildRequires: liblcms-devel @@ -48,8 +49,14 @@ Conflicts: ghostscript Conflicts: ghostscript-x11 Conflicts: ghostscript-devel Conflicts: ghostscript-library -# Require only the basic fonts for Ghostscript (but do not recommend ghostscript-fonts-other): +# Require Ghostscript's fonts because the Ghostscript package provides the +# "Fontmap" file /usr/share/ghostscript//Resource/Init/Fontmap.GS +# which lists Ghostscript's fonts but the fonts itself are provided in the +# separated packages ghostscript-fonts-std and ghostscript-fonts-other +# (regarding separated packages see /usr/share/ghostscript//doc/Fonts.htm) +# so that a RPM requirement is needed to make sure that Ghostscript has its fonts: Requires: ghostscript-fonts-std +Requires: ghostscript-fonts-other # Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun: PreReq: /sbin/ldconfig # Install into this non-root directory (required when norootforbuild is used): @@ -184,10 +191,22 @@ do test -e $DOCDIR/$( basename $D ) && exit 99 done # Add a link from SUSE's usual documentation directory to Ghostscript's documentation directory # because "configure --docdir=%%{_defaultdocdir}/%%{name}" does not work (see above): -install -d -m755 %{buildroot}%{_defaultdocdir} +install -d -m 755 %{buildroot}%{_defaultdocdir} pushd %{buildroot}%{_defaultdocdir} ln -s ../../ghostscript/%{version}/doc ghostscript popd +# Extract the catalog of devices which are actually built-in in exactly this Ghostscript: +# Do not pollute the build log file with zillions of meaningless messages: +set +x +cat /dev/null >catalog.devices +for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' ) +do for F in base/devs.mak base/contrib.mak contrib/contrib.mak + do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices + done +done +# Switch back to the usual build log messages: +set -x +install -m 644 catalog.devices $DOCDIR # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets diff --git a/ghostscript.changes b/ghostscript.changes index 6aba5db..992bef0 100644 --- a/ghostscript.changes +++ b/ghostscript.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu May 10 15:49:33 CEST 2012 - jsmeix@suse.de + +- Require Ghostscript's font packages because the + Ghostscript package provides the "Fontmap" file + /usr/share/ghostscript//Resource/Init/Fontmap.GS + which lists Ghostscript's fonts but the fonts itself + are provided in the separated packages ghostscript-fonts-std + and ghostscript-fonts-other so that a RPM requirement + is needed to make sure that Ghostscript has its fonts. +- Extract the catalog of devices which are actually built-in + in exactly this Ghostscript and provide it as catalog.devices + in the Ghostscript package. + ------------------------------------------------------------------- Fri Apr 27 10:40:53 CEST 2012 - jsmeix@suse.de diff --git a/ghostscript.spec b/ghostscript.spec index 40351d2..fe372cb 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: ghostscript BuildRequires: cups-devel # dbus-1-devel is needed for "configure --enable-dbus" (see below): @@ -128,10 +129,14 @@ Conflicts: ghostscript-x11 > %{version}-%{release} # When the ghostscript main-package is installed, usually the exact matching # version-release of the ghostscript-x11 sub-package should be also installed: Recommends: ghostscript-x11 = %{version}-%{release} -# Require the basic fonts for Ghostscript: +# Require Ghostscript's fonts because the Ghostscript package provides the +# "Fontmap" file /usr/share/ghostscript//Resource/Init/Fontmap.GS +# which lists Ghostscript's fonts but the fonts itself are provided in the +# separated packages ghostscript-fonts-std and ghostscript-fonts-other +# (regarding separated packages see /usr/share/ghostscript//doc/Fonts.htm) +# so that a RPM requirement is needed to make sure that Ghostscript has its fonts: Requires: ghostscript-fonts-std -# Usually the optional fonts for Ghostscript should be also installed: -Recommends: ghostscript-fonts-other +Requires: ghostscript-fonts-other # Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun: PreReq: /sbin/ldconfig # Install into this non-root directory (required when norootforbuild is used): @@ -301,10 +306,22 @@ do test -e $DOCDIR/$( basename $D ) && exit 99 done # Add a link from SUSE's usual documentation directory to Ghostscript's documentation directory # because "configure --docdir=%%{_defaultdocdir}/%%{name}" does not work (see above): -install -d -m755 %{buildroot}%{_defaultdocdir} +install -d -m 755 %{buildroot}%{_defaultdocdir} pushd %{buildroot}%{_defaultdocdir} ln -s ../../ghostscript/%{version}/doc ghostscript popd +# Extract the catalog of devices which are actually built-in in exactly this Ghostscript: +# Do not pollute the build log file with zillions of meaningless messages: +set +x +cat /dev/null >catalog.devices +for D in $( %{buildroot}/usr/bin/gs -h | sed -n -e '/^Available devices:/,/^Search path:/p' | egrep -v '^Available devices:|^Search path:' ) +do for F in base/devs.mak base/contrib.mak contrib/contrib.mak + do sed -n -e '/ Catalog /,/ End of catalog /p' $F | grep "[[:space:]]$D[[:space:]]" | grep -o '[[:alnum:]].*' | tr -s '[:blank:]' ' ' | sed -e 's/ /\t/' | expand -t16 >>catalog.devices + done +done +# Switch back to the usual build log messages: +set -x +install -m 644 catalog.devices $DOCDIR # Use traditional bash scriptlet with an explicite "exit 0" line at the end to be fail safe # see http://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets