[csw-devel] SF.net SVN: gar:[21288] csw/mgar/pkg/ghostscript/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Jun 6 12:50:05 CEST 2013


Revision: 21288
          http://gar.svn.sourceforge.net/gar/?rev=21288&view=rev
Author:   dmichelsen
Date:     2013-06-06 10:50:04 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
ghostscript/trunk: Add cups filters and fix #4913

Modified Paths:
--------------
    csw/mgar/pkg/ghostscript/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/ghostscript/trunk/files/0001-Use-ksh-and-GNU-sed-as-reported-in-4913.patch

Modified: csw/mgar/pkg/ghostscript/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ghostscript/trunk/Makefile	2013-06-06 10:03:02 UTC (rev 21287)
+++ csw/mgar/pkg/ghostscript/trunk/Makefile	2013-06-06 10:50:04 UTC (rev 21288)
@@ -11,6 +11,9 @@
 MASTER_SITES = $(SF_MIRRORS)
 DISTFILES  = $(NAME)-$(VERSION).tar.bz2
 
+# See for details https://www.opencsw.org/mantis/view.php?id=4913
+PATCHFILES += 0001-Use-ksh-and-GNU-sed-as-reported-in-4913.patch
+
 VENDOR_URL = http://www.ghostscript.com
 
 LICENSE = LICENSE
@@ -73,6 +76,26 @@
 RUNTIME_DEP_PKGS_CSWgs += CSWlibgs8
 CHECKPKG_OVERRIDES_CSWgs += surplus-dependency|CSWlibgs8
 
+# CUPS filter
+PACKAGES += CSWghostscript-filters
+SPKG_DESC_CSWghostscript-filters = CUPS filter for Ghostscript
+PKGFILES_CSWghostscript-filters += $(libdir)/cups/.*
+PKGFILES_CSWghostscript-filters += $(sysconfdir)/cups/.*
+RUNTIME_DEP_PKGS_CSWghostscript-filters += CSWlibcupsimage2
+RUNTIME_DEP_PKGS_CSWghostscript-filters += CSWlibcups2
+RUNTIME_DEP_PKGS_CSWghostscript-filters += CSWlibdbus1-3
+CHECKPKG_OVERRIDES_CSWghostscript-filters += file-with-bad-content|/usr/share|root/opt/csw/lib/cups/filter/gstoraster
+CHECKPKG_OVERRIDES_CSWghostscript-filters += file-with-bad-content|/usr/share|root/opt/csw/lib/cups/filter/gstopxl
+
+# Yes, the filter is 32 bit only
+CHECKPKG_OVERRIDES_CSWghostscript-filters += 64-bit-binaries-missing
+
+# The filter gstopxl calls /opt/csw/bin/gs
+RUNTIME_DEP_PKGS_CSWghostscript-filters += CSWghostscript
+CHECKPKG_OVERRIDES_CSWghostscript-filters += surplus-dependency|CSWghostscript
+
+PRESERVECONF += $(sysconfdir)/cups/gstoraster.convs
+
 PACKAGES += CSWlibgs9
 SPKG_DESC_CSWlibgs9 = Ghostscript library, libgs.so.9
 PKGFILES_CSWlibgs9 += $(call pkgfiles_lib,libgs.so.9)
@@ -93,6 +116,14 @@
 PKGFILES_CSWghostscript-dev += $(PKGFILES_DEVEL)
 RUNTIME_DEP_PKGS_CSWghostscript-dev += CSWlibgs9
 
+REINPLACEMENTS += fontpath
+REINPLACE_MATCH_fontpath = /usr/share/cups/fonts
+REINPLACE_WITH_fontpath = $(sharedstatedir)/cups/fonts
+REINPLACE_FILES_fontpath += cups/gstopxl.in
+
+# This is for cups/gstoraster.c which doesn't seem to honour --with-fontpath
+EXTRA_CPPFLAGS += -DCUPS_FONTPATH=\\\"$(datadir)/ghostscript/fonts\\\"
+
 BUILD64 = 1
 ISAEXEC = 1
 
@@ -100,6 +131,7 @@
 CONFIGURE_ARGS += --enable-dynamic
 CONFIGURE_ARGS += --with-fontpath=$(datadir)/ghostscript/fonts
 CONFIGURE_ARGS += --enable-cups
+CONFIGURE_ARGS += --with-install-cups
 
 # pentium_pro does not have SSE2 and the detection does not work
 CONFIGURE_ARGS-32-i386 += --disable-sse2

Added: csw/mgar/pkg/ghostscript/trunk/files/0001-Use-ksh-and-GNU-sed-as-reported-in-4913.patch
===================================================================
--- csw/mgar/pkg/ghostscript/trunk/files/0001-Use-ksh-and-GNU-sed-as-reported-in-4913.patch	                        (rev 0)
+++ csw/mgar/pkg/ghostscript/trunk/files/0001-Use-ksh-and-GNU-sed-as-reported-in-4913.patch	2013-06-06 10:50:04 UTC (rev 21288)
@@ -0,0 +1,120 @@
+From 120c2d04e6e3693608a686bd56f5a71a7cf1a860 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Thu, 6 Jun 2013 11:55:38 +0200
+Subject: [PATCH] Use ksh and GNU sed as reported in #4913
+
+---
+ cups/gstopxl.in | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/cups/gstopxl.in b/cups/gstopxl.in
+index 7c4fe88..4e5972b 100755
+--- a/cups/gstopxl.in
++++ b/cups/gstopxl.in
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/ksh
+ #
+ #
+ # CUPS PCL XL/PCL 6 filter script for Ghostscript.
+@@ -50,9 +50,9 @@ ps_code=
+ ppd_opts=
+ 
+ resolution=
+-eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])Resolution=([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\2}"/p')"
++eval "$(printf "%s" "$5" | /opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])Resolution=([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\2}"/p')"
+ if test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultResolution:[[:space:]]+([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\1}"/p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultResolution:[[:space:]]+([0-9.]+(x[0-9.]+)?).*/resolution="${resolution:-\1}"/p' "$PPD")"
+ fi
+ echo "DEBUG: Resolution: $resolution" >&2
+ if test -n "$resolution"; then
+@@ -60,15 +60,15 @@ if test -n "$resolution"; then
+ fi
+ 
+ pagesize=
+-eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(media|PageSize)=([^[:space:]]+).*/pagesize="${pagesize:-\3}"/p')"
++eval "$(printf "%s" "$5" | /opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(media|PageSize)=([^[:space:]]+).*/pagesize="${pagesize:-\3}"/p')"
+ if test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultPageSize:[[:space:]]+([^[:space:]]+).*/pagesize="${pagesize:-\1}"/p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultPageSize:[[:space:]]+([^[:space:]]+).*/pagesize="${pagesize:-\1}"/p' "$PPD")"
+ fi
+ echo "DEBUG: Page size: $pagesize" >&2
+ width=
+ height=
+ if test -n "$pagesize" && test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's|^\*PaperDimension[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|width="\1"; height="\2"|p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's|^\*PaperDimension[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|width="\1"; height="\2"|p' "$PPD")"
+ fi
+ echo "DEBUG: Width: $width, height: $height" >&2
+ if test -n "$width"; then
+@@ -83,7 +83,7 @@ bl_y=
+ tr_x=
+ tr_y=
+ if test -n "$pagesize" && test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's|^\*ImageableArea[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|bl_x="\1"; bl_y="\2"; tr_x="\3"; tr_y="\4"|p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's|^\*ImageableArea[[:space:]]+'"$pagesize"'/[^:]+:[[:space:]]+"([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)[[:space:]]+([^[:space:]]+)".*|bl_x="\1"; bl_y="\2"; tr_x="\3"; tr_y="\4"|p' "$PPD")"
+ fi
+ echo "DEBUG: Absolute margins: $bl_x, $bl_y, $tr_x, $tr_y" >&2
+ margin_l=
+@@ -105,14 +105,14 @@ if test -n "$margin_l" && test -n "$margin_b" && \
+ fi
+ 
+ inputslot=
+-eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(InputSlot)=([^[:space:]]+).*/inputslot="${inputslot:-\3}"/p')"
++eval "$(printf "%s" "$5" | /opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(InputSlot)=([^[:space:]]+).*/inputslot="${inputslot:-\3}"/p')"
+ if test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultInputSlot:[[:space:]]+([^[:space:]]+).*/inputslot="${inputslot:-\1}"/p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultInputSlot:[[:space:]]+([^[:space:]]+).*/inputslot="${inputslot:-\1}"/p' "$PPD")"
+ fi
+ echo "DEBUG: InputSlot: $inputslot" >&2
+ inputslot_val=
+ if test -n "$inputslot" && test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's|^\*InputSlot[[:space:]]+'"$inputslot"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/MediaPosition[[:space:]]*([0-9]+)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|inputslot_val="\1"|p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's|^\*InputSlot[[:space:]]+'"$inputslot"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/MediaPosition[[:space:]]*([0-9]+)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|inputslot_val="\1"|p' "$PPD")"
+ fi
+ echo "DEBUG: Value for MediaPosition: $inputslot_val" >&2
+ if test -n "$inputslot_val"; then
+@@ -120,9 +120,9 @@ if test -n "$inputslot_val"; then
+ fi
+ 
+ colormodel=
+-eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(ColorModel)=([^[:space:]]+).*/colormodel="${colormodel:-\3}"/p')"
++eval "$(printf "%s" "$5" | /opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(ColorModel)=([^[:space:]]+).*/colormodel="${colormodel:-\3}"/p')"
+ if test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultColorModel:[[:space:]]+([^[:space:]]+).*/colormodel="${colormodel:-\1}"/p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultColorModel:[[:space:]]+([^[:space:]]+).*/colormodel="${colormodel:-\1}"/p' "$PPD")"
+ fi
+ echo "DEBUG: ColorModel: $colormodel" >&2
+ if test "$colormodel" = "Gray"; then
+@@ -130,7 +130,7 @@ if test "$colormodel" = "Gray"; then
+ fi
+ colormodel_val=
+ if test -n "$colormodel" && test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's|^\*ColorModel[[:space:]]+'"$colormodel"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/BitsPerPixel[[:space:]]*([0-9]*)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|colormodel_val="\1"|p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's|^\*ColorModel[[:space:]]+'"$colormodel"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/BitsPerPixel[[:space:]]*([0-9]*)[[:space:]]*>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|colormodel_val="\1"|p' "$PPD")"
+ fi
+ echo "DEBUG: Value for BitsPerPixel: $colormodel_val" >&2
+ if test -n "$colormodel_val"; then
+@@ -138,15 +138,15 @@ if test -n "$colormodel_val"; then
+ fi
+ 
+ duplex=
+-eval "$(printf "%s" "$5" | sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(Duplex)=([^[:space:]]+).*/duplex="${duplex:-\3}"/p')"
++eval "$(printf "%s" "$5" | /opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/.*(^|[[:space:]])(Duplex)=([^[:space:]]+).*/duplex="${duplex:-\3}"/p')"
+ if test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultDuplex:[[:space:]]+([^[:space:]]+).*/duplex="${duplex:-\1}"/p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's/^\*DefaultDuplex:[[:space:]]+([^[:space:]]+).*/duplex="${duplex:-\1}"/p' "$PPD")"
+ fi
+ echo "DEBUG: Duplex: $duplex" >&2
+ duplex_val=
+ tumble_val=
+ if test -n "$duplex" && test -e "$PPD"; then
+-  eval "$(sed @SED_EXTENDED_REGEX_OPT@ 's|^\*Duplex[[:space:]]+'"$duplex"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/Duplex[[:space:]]*([^[:space:]]*)[[:space:]]*(/Tumble[[:space:]]*([^[:space:]]*)[[:space:]]*)?>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|duplex_val="\1"; tumble_val="\3"|p' "$PPD")"
++  eval "$(/opt/csw/bin/sed @SED_EXTENDED_REGEX_OPT@ 's|^\*Duplex[[:space:]]+'"$duplex"'/[^:]+:[[:space:]]+"[[:space:]]*<[[:space:]]*<[[:space:]]*/Duplex[[:space:]]*([^[:space:]]*)[[:space:]]*(/Tumble[[:space:]]*([^[:space:]]*)[[:space:]]*)?>[[:space:]]*>[[:space:]]*setpagedevice[[:space:]]*".*|duplex_val="\1"; tumble_val="\3"|p' "$PPD")"
+ fi
+ echo "DEBUG: Value for Duplex: $duplex_val; Value for Tumble: $tumble_val" >&2
+ if test -n "$duplex_val"; then
+-- 
+1.8.1.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list