summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2007-06-12 16:04:38 +0000
committerStefan Schweizer <genstef@gentoo.org>2007-06-12 16:04:38 +0000
commit308cce9561d97480ae41448a8c0d3e0def575088 (patch)
tree78db599599634caaa1f5fc09ffa7df15d5282996 /app-text
parentCorrected last bash specific part. (diff)
downloadhistorical-308cce9561d97480ae41448a8c0d3e0def575088.tar.gz
historical-308cce9561d97480ae41448a8c0d3e0def575088.tar.bz2
historical-308cce9561d97480ae41448a8c0d3e0def575088.zip
Version bump thanks to jakub, hkbst and Timo Gurr <psy@monsterserver.de>, see bug 171847 - only build djvu support w/ USE="-bindist" (see http://djvu.sourceforge.net/gsdjvu/COPYING for reasons), adjust LICENSE accordingly, adjust IUSE accordingly - Fix SRC_URI and S for new tarball name - add loads of quoting all over the place
Package-Manager: portage-2.1.2.9
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-gpl/ChangeLog35
-rw-r--r--app-text/ghostscript-gpl/Manifest30
-rw-r--r--app-text/ghostscript-gpl/files/digest-ghostscript-gpl-8.5718
-rw-r--r--app-text/ghostscript-gpl/files/ghostscript-afpl-8.57-cups-lib.patch100
-rw-r--r--app-text/ghostscript-gpl/ghostscript-gpl-8.57.ebuild163
5 files changed, 330 insertions, 16 deletions
diff --git a/app-text/ghostscript-gpl/ChangeLog b/app-text/ghostscript-gpl/ChangeLog
index be5fb9d8343d..8638b789f4c9 100644
--- a/app-text/ghostscript-gpl/ChangeLog
+++ b/app-text/ghostscript-gpl/ChangeLog
@@ -1,6 +1,37 @@
# ChangeLog for app-text/ghostscript-gpl
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.9 2006/12/14 19:13:36 genstef Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.10 2007/06/12 16:04:38 genstef Exp $
+
+*ghostscript-gpl-8.57 (12 Jun 2007)
+
+ 12 Jun 2007; Stefan Schweizer <genstef@gentoo.org>
+ +files/ghostscript-afpl-8.57-cups-lib.patch, +ghostscript-gpl-8.57.ebuild:
+ Version bump thanks to jakub, hkbst and Timo Gurr <psy@monsterserver.de>, see bug 171847
+
+ - only build djvu support w/ USE="-bindist" (see
+ http://djvu.sourceforge.net/gsdjvu/COPYING for reasons), adjust LICENSE
+ accordingly, adjust IUSE accordingly
+ - Fix SRC_URI and S for new tarball name
+ - add loads of quoting all over the place
+
+ fixed upstream:
+ ghostscript-afpl-8.54-ps2epsi-afpl.diff - fixed in 8.57
+ ghostscript-afpl-8.54-destdir.diff - fixed in 8.57
+ ghostscript-afpl-8.54-segfault.patch - fixed in 8.57
+ ghostscript-afpl-8.54-gtk2.patch - seems to be fixed in 8.57
+
+ updated/still needed patches:
+ ghostscript-afpl-8.56-cups-lib.patch - updated patch
+ ghostscript-afpl-8.54-rinkj.patch - not fixed, still needed
+
+ still needed addon patches
+ ghostscript-afpl-8.54-cups-destdir.diff - still needed
+ gdevcups.patch - still needed
+ djvu-gs-gpl.patch - still needed
+
+ failing/commented out patches:
+ ghostscript-afpl-8.54-big-cmap-post.patch - does not apply, couldn't find any
+ references on http://bugs.ghostscript.com/ about what this patch is good for
14 Dec 2006; Stefan Schweizer <genstef@gentoo.org>
+files/djvu-gs-gpl.patch, ghostscript-gpl-8.54.ebuild:
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
index 4b2fd2b53704..2ec4955fa0b2 100644
--- a/app-text/ghostscript-gpl/Manifest
+++ b/app-text/ghostscript-gpl/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX djvu-gs-gpl.patch 2565 RMD160 cd398bf51e1279628c52138da75a555021fedf12 SHA1 7e82d3067de1e871283e736676fb73c1f4d61f6e SHA256 7c76e41416845b1497ddb38898f89ce3e645dcd77c93551cc4d8db47e799116d
MD5 d2d2cc58946c5956c12ea2979ffec99a files/djvu-gs-gpl.patch 2565
RMD160 cd398bf51e1279628c52138da75a555021fedf12 files/djvu-gs-gpl.patch 2565
@@ -45,6 +42,10 @@ AUX ghostscript-afpl-8.54-segfault.patch 505 RMD160 c02811990117b8b78934ba9b6360
MD5 f343c63f09ff29ea27783b73e202f823 files/ghostscript-afpl-8.54-segfault.patch 505
RMD160 c02811990117b8b78934ba9b636007c782bb29f7 files/ghostscript-afpl-8.54-segfault.patch 505
SHA256 63e75cf1815cc19529d02be94d3eba5be5f5a1d6e3f20cf680e2e4b5bd1c35e0 files/ghostscript-afpl-8.54-segfault.patch 505
+AUX ghostscript-afpl-8.57-cups-lib.patch 3539 RMD160 936a4abfe9a9b9f9701741a200117a0ff1e79c8a SHA1 1ff8d2e5c3d9ab71d0385fb7c6ab472f61a3f38e SHA256 e1d02d333046d2277808b14a1dc05de1aed811ebe3c65cad933edccb8135c9a5
+MD5 9682aaa6078e2b61f6e2b34a97979729 files/ghostscript-afpl-8.57-cups-lib.patch 3539
+RMD160 936a4abfe9a9b9f9701741a200117a0ff1e79c8a files/ghostscript-afpl-8.57-cups-lib.patch 3539
+SHA256 e1d02d333046d2277808b14a1dc05de1aed811ebe3c65cad933edccb8135c9a5 files/ghostscript-afpl-8.57-cups-lib.patch 3539
AUX ghostscript-esp-8.15.2-FAPIcidfmap.cjk 2902 RMD160 a248b8db74aefe41d548c3712dc6603975a09698 SHA1 8a63a7cbe94414343154594a709c886b3c0ab712 SHA256 3ec8e039c1cbb94043d2b79e7d3d84016595804f27d67bb251eba2c33611ccab
MD5 ddd297dd9f783163b0f13ec97dcb13bc files/ghostscript-esp-8.15.2-FAPIcidfmap.cjk 2902
RMD160 a248b8db74aefe41d548c3712dc6603975a09698 files/ghostscript-esp-8.15.2-FAPIcidfmap.cjk 2902
@@ -58,15 +59,20 @@ DIST adobe-cmaps-200406.tar.gz 5001983 RMD160 284b943b3476f6f7e2bc49842fd027c6f7
DIST cups-1.1.23-source.tar.bz2 8705521 RMD160 255ec4c22422b14f2367d69f3ec7e590dc46bea5 SHA1 32d5bfb44c4edc1b54ccb014b5a44499295c6c5c SHA256 87da0f7b1e03236e183045f1e787957132658ead56c4b0f80ac7f86c1574a85e
DIST gdevhl12.c.gz 7613 RMD160 3adffbf7df824abd02242dadf847b09246f411bb SHA1 b5ac9ebe654b0ace453f1aec501dd363311efeed SHA256 3905677ab494a1b82ee2a6cc78975a5fdc08d81a65c12af35746bb3d2889b3e2
DIST ghostscript-8.54-gpl.tar.bz2 12365361 RMD160 f61f6da568ffe440a466cd0d7b5871a3d87d1116 SHA1 5da69b04ddc8a4660a2c40b0e561a358c737c310 SHA256 64f43553223390a3e519efed2b3dfee8a4c79df5a373a0e96861483565957e1b
+DIST ghostscript-8.57.tar.bz2 11934408 RMD160 034331d9713cb551e1081c6bd53dbe4c983c2908 SHA1 17975b561a05b036fe06c96e8efdc512b9960062 SHA256 29c4cbf8bd95a14046d72eba7edbec60ffd25c37b3b3427f7c8ad5f81636ab15
DIST gsdjvu-1.1.tar.gz 214364 RMD160 aa1ff4a80b02b16e43bf8e14719613f98bdf13c6 SHA1 cc33916f86a0f826159e5afed43d7fae722b3133 SHA256 39f32b9946a65cbe8d5b7c2882ef0e82d5858e78e04b568bb525d2c4e2d6ce78
EBUILD ghostscript-gpl-8.54.ebuild 5607 RMD160 7a95a834b7da2bd6221c5b704c99b233d3c157e8 SHA1 5505cfe0b4be358f110e1be9b9b332cec2e4fa31 SHA256 e287f8d4d694e6a24b1f1b28107629b4c3cd0674a1308c64558d9e46c8a43b54
MD5 6a225e803aa48e996843299053215a56 ghostscript-gpl-8.54.ebuild 5607
RMD160 7a95a834b7da2bd6221c5b704c99b233d3c157e8 ghostscript-gpl-8.54.ebuild 5607
SHA256 e287f8d4d694e6a24b1f1b28107629b4c3cd0674a1308c64558d9e46c8a43b54 ghostscript-gpl-8.54.ebuild 5607
-MISC ChangeLog 2118 RMD160 711d9e1b434306e41979f085909be1a92cfadbce SHA1 da646b35a42c7b35918f4ed99746d5a40ac96184 SHA256 338359bad101f4ad702890f53daa62564d36eae367bcf10ba8432120f303f20c
-MD5 9114710be68c9ca5589c9fdc7aaf3a3d ChangeLog 2118
-RMD160 711d9e1b434306e41979f085909be1a92cfadbce ChangeLog 2118
-SHA256 338359bad101f4ad702890f53daa62564d36eae367bcf10ba8432120f303f20c ChangeLog 2118
+EBUILD ghostscript-gpl-8.57.ebuild 5563 RMD160 3eb8e10802c8465c08cbd9d120413e9a6b75eb1c SHA1 ed8589b2416deb2b4e2ead2dd77bd802cf64229a SHA256 dfbb6ab939f1061cbd81a40d7e97d354a0783a9f1d4f27d5cb4dcba2fcb1b195
+MD5 0d46937aecb7d38415bf14c1ff3978be ghostscript-gpl-8.57.ebuild 5563
+RMD160 3eb8e10802c8465c08cbd9d120413e9a6b75eb1c ghostscript-gpl-8.57.ebuild 5563
+SHA256 dfbb6ab939f1061cbd81a40d7e97d354a0783a9f1d4f27d5cb4dcba2fcb1b195 ghostscript-gpl-8.57.ebuild 5563
+MISC ChangeLog 3383 RMD160 cc6109ff04bc76900d36561934d59b081242788f SHA1 482295f9944058711d5720d823d57982f6dae668 SHA256 39d61936974968a455508b9435d4236e00b6c25742aa3845290ae9034fa89cd5
+MD5 32541b84393938ed0dbf97e1eedd8077 ChangeLog 3383
+RMD160 cc6109ff04bc76900d36561934d59b081242788f ChangeLog 3383
+SHA256 39d61936974968a455508b9435d4236e00b6c25742aa3845290ae9034fa89cd5 ChangeLog 3383
MISC metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 SHA1 209c6a46e4cdd891980115e42ba419e3799f8088 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76
MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161
RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 metadata.xml 161
@@ -74,10 +80,6 @@ SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76 metadata
MD5 72fa7407fadfed6cddb7ba1e3699e1e8 files/digest-ghostscript-gpl-8.54 1488
RMD160 46ca437705ffcb2a1489ad1b541222493b273c34 files/digest-ghostscript-gpl-8.54 1488
SHA256 0c2f61b7b0575c76d83fbfd9ddddb87b151118444609d0f3ae55fba35587f7c4 files/digest-ghostscript-gpl-8.54 1488
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.3 (GNU/Linux)
-
-iD8DBQFGF3xm8bi6rjpTunYRAnpWAJsG1AXcv1ZzFOWB2FUmnNN5dHHPggCgzvE9
-zJGl6XjoDoJRj9MDbaufrFw=
-=XCiA
------END PGP SIGNATURE-----
+MD5 55331e222ea7c63743453ec4aee0658a files/digest-ghostscript-gpl-8.57 1476
+RMD160 ac943d61c81167cab7007e993f56b663057059f4 files/digest-ghostscript-gpl-8.57 1476
+SHA256 173e6238b3990e0e9b71b04d108159d2fb6457f866be92571aa810360a2c0b0a files/digest-ghostscript-gpl-8.57 1476
diff --git a/app-text/ghostscript-gpl/files/digest-ghostscript-gpl-8.57 b/app-text/ghostscript-gpl/files/digest-ghostscript-gpl-8.57
new file mode 100644
index 000000000000..d3683e037e1b
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/digest-ghostscript-gpl-8.57
@@ -0,0 +1,18 @@
+MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653
+RMD160 c723afc2207157a434988b46bcf0a458281c29a4 acro5-cmaps-2001.tar.gz 631653
+SHA256 80abec481fd4b5e59ac3d3f5790542dbfabe3c9269a6ac17064160d6dab38ee4 acro5-cmaps-2001.tar.gz 631653
+MD5 dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz 5001983
+RMD160 284b943b3476f6f7e2bc49842fd027c6f7f57552 adobe-cmaps-200406.tar.gz 5001983
+SHA256 0f397255506cda4b20e362ab5e3f6cdacba09e0a0cca7f4d93afd980977c5689 adobe-cmaps-200406.tar.gz 5001983
+MD5 4ce09b1dce09b6b9398af0daae9adf63 cups-1.1.23-source.tar.bz2 8705521
+RMD160 255ec4c22422b14f2367d69f3ec7e590dc46bea5 cups-1.1.23-source.tar.bz2 8705521
+SHA256 87da0f7b1e03236e183045f1e787957132658ead56c4b0f80ac7f86c1574a85e cups-1.1.23-source.tar.bz2 8705521
+MD5 ecf57b4597f1d8c54ba8e6068a9119ab gdevhl12.c.gz 7613
+RMD160 3adffbf7df824abd02242dadf847b09246f411bb gdevhl12.c.gz 7613
+SHA256 3905677ab494a1b82ee2a6cc78975a5fdc08d81a65c12af35746bb3d2889b3e2 gdevhl12.c.gz 7613
+MD5 cc8368863fe6b666aaf13beb83ba300a ghostscript-8.57.tar.bz2 11934408
+RMD160 034331d9713cb551e1081c6bd53dbe4c983c2908 ghostscript-8.57.tar.bz2 11934408
+SHA256 29c4cbf8bd95a14046d72eba7edbec60ffd25c37b3b3427f7c8ad5f81636ab15 ghostscript-8.57.tar.bz2 11934408
+MD5 46bce036ad0b9b284f4c8f3530f7c684 gsdjvu-1.1.tar.gz 214364
+RMD160 aa1ff4a80b02b16e43bf8e14719613f98bdf13c6 gsdjvu-1.1.tar.gz 214364
+SHA256 39f32b9946a65cbe8d5b7c2882ef0e82d5858e78e04b568bb525d2c4e2d6ce78 gsdjvu-1.1.tar.gz 214364
diff --git a/app-text/ghostscript-gpl/files/ghostscript-afpl-8.57-cups-lib.patch b/app-text/ghostscript-gpl/files/ghostscript-afpl-8.57-cups-lib.patch
new file mode 100644
index 000000000000..6712311416c6
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-afpl-8.57-cups-lib.patch
@@ -0,0 +1,100 @@
+diff -u lib/gs_init.ps.orig lib/gs_init.ps
+--- lib/gs_init.ps.orig 2006-02-21 22:29:07.000000000 +0100
++++ lib/gs_init.ps 2006-05-17 22:31:11.000000000 +0200
+@@ -152,6 +152,7 @@
+ currentdict /NOFONTPATH known /NOFONTPATH exch def
+ currentdict /NOGC known /NOGC exch def
+ currentdict /NOINTERPOLATE .knownget { /INTERPOLATE exch not def } if
++currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def
+ currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def
+ currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def
+ currentdict /NOPAUSE known /NOPAUSE exch def
+diff -u lib/gs_setpd.ps.orig lib/gs_setpd.ps
+--- lib/gs_setpd.ps.orig 2005-12-28 20:56:24.000000000 +0100
++++ lib/gs_setpd.ps 2006-05-17 22:33:54.000000000 +0200
+@@ -375,21 +375,42 @@
+ } bind
+ .dicttomark readonly def
+
+-% Define the keys used in input attribute matching.
+-/.inputattrkeys [
+- /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet /ManualFeed
+- % The following are documented in Adobe's supplement for v2017.
+- /LeadingEdge /MediaClass
+-] readonly def
+-% Define other keys used in media selection.
+-/.inputselectionkeys [
+- /MediaPosition /Orientation
+-] readonly def
+-
+-% Define the keys used in output attribute matching.
+-/.outputattrkeys [
+- /OutputType
+-] readonly def
++% M. Sweet, Easy Software Products:
++%
++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
++% selection policies for setpagedevice. This is used by CUPS to support
++% the standard Adobe media attributes.
++NOMEDIAATTRS {
++ % Define only PageSize for input attribute matching.
++ /.inputattrkeys [
++ /PageSize
++ ] readonly def
++ % Define no other keys used in media selection.
++ /.inputselectionkeys [
++ /noInputSelectionsKeys
++ ] readonly def
++
++ % Define no keys used in output attribute matching.
++ /.outputattrkeys [
++ /noOutputAttrKeys
++ ] readonly def
++} {
++ % Define the keys used in input attribute matching.
++ /.inputattrkeys [
++ /PageSize /MediaColor /MediaWeight /MediaType /InsertSheet /ManualFeed
++ % The following are documented in Adobe's supplement for v2017.
++ /LeadingEdge /MediaClass
++ ] readonly def
++ % Define other keys used in media selection.
++ /.inputselectionkeys [
++ /MediaPosition /Orientation
++ ] readonly def
++
++ % Define the keys used in output attribute matching.
++ /.outputattrkeys [
++ /OutputType
++ ] readonly def
++} ifelse
+
+ % Define all the parameters that should always be copied to the merged
+ % dictionary.
+@@ -499,11 +526,23 @@
+ % They are expected to consume the top 2 operands.
+ % NOTE: we currently treat all values other than 0, 1, or 7 (for PageSize)
+ % the same as 0, i.e., we signal an error.
++%
++% M. Sweet, Easy Software Products:
++%
++% Define NOMEDIAATTRS to turn off the default (but unimplementable) media
++% selection policies for setpagedevice. This is used by CUPS to support
++% the standard Adobe media attributes.
++ SETPDDEBUG { (Rolling back.) = pstack flush } if
+ 0 { % Set errorinfo and signal a configurationerror.
+- pop dup 4 index exch get 2 array astore
+- $error /errorinfo 3 -1 roll put
+- cleartomark
++ NOMEDIAATTRS {
++ % NOMEDIAATTRS means that the default policy is 7...
++ pop 2 index exch 7 put
++ } {
++ pop dup 4 index exch get 2 array astore
++ $error /errorinfo 3 -1 roll put
++ cleartomark
+ /setpagedevice .systemvar /configurationerror signalerror
++ } ifelse
+ } bind
+ 1 { % Roll back the failed request to its previous status.
+ SETPDDEBUG { (Rolling back.) = pstack flush } if
+
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-8.57.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-8.57.ebuild
new file mode 100644
index 000000000000..5f60e89897f2
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-8.57.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-8.57.ebuild,v 1.1 2007/06/12 16:04:38 genstef Exp $
+
+WANT_AUTOMAKE=1.6
+
+inherit autotools elisp-common eutils versionator flag-o-matic
+
+DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
+HOMEPAGE="http://ghostscript.com"
+
+GSDJVU_PV=1.1
+CUPS_PV=1.1.23
+PVM=$(get_version_component_range 1-2)
+SRC_URI="cjk? ( ftp://ftp.gyve.org/pub/gs-cjk/adobe-cmaps-200406.tar.gz
+ ftp://ftp.gyve.org/pub/gs-cjk/acro5-cmaps-2001.tar.gz )
+ !bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
+ cups? ( mirror://gentoo/cups-${CUPS_PV}-source.tar.bz2 )
+ mirror://sourceforge/ghostscript/${P/-gpl}.tar.bz2
+ mirror://gentoo/gdevhl12.c.gz"
+
+LICENSE="GPL-2 CPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86 ~x86-fbsd"
+IUSE="X bindist cups cjk djvu emacs gtk jpeg2k"
+
+DEP="virtual/libc
+ >=media-libs/jpeg-6b
+ >=media-libs/libpng-1.2.5
+ >=sys-libs/zlib-1.1.4
+ >=media-libs/tiff-3.7
+ X? ( x11-libs/libXt x11-libs/libXext )
+ !bindist? ( djvu? ( app-text/djvu ) )
+ gtk? ( >=x11-libs/gtk+-2.0 )
+ cups? ( >=net-print/cups-1.1.20 )
+ jpeg2k? ( media-libs/jasper )
+ !app-text/ghostscript-esp
+ !app-text/ghostscript-gnu"
+
+RDEPEND="${DEP}
+ cjk? ( media-fonts/arphicfonts
+ media-fonts/kochi-substitute
+ media-fonts/baekmuk-fonts )
+ media-fonts/gnu-gs-fonts-std"
+
+DEPEND="${DEP}
+ dev-util/pkgconfig"
+
+S=${WORKDIR}/${P/-gpl}
+
+src_unpack() {
+ unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
+ if use cjk; then
+ cat "${FILESDIR}"/ghostscript-esp-8.15.2-cidfmap.cjk >> ${S}/lib/cidfmap
+ cat "${FILESDIR}"/ghostscript-esp-8.15.2-FAPIcidfmap.cjk >> ${S}/lib/FAPIcidfmap
+ cd "${S}"/Resource
+ unpack adobe-cmaps-200406.tar.gz
+ unpack acro5-cmaps-2001.tar.gz
+ cd ${WORKDIR}
+ fi
+
+ # cups support
+ if use cups; then
+ cp -r cups-${CUPS_PV}/pstoraster "${S}"
+ cd "${S}"/pstoraster
+ sed -e 's:@prefix@:/usr:' -e 's:@exec_prefix@:${prefix}:' -e \
+ 's:@bindir@:${exec_prefix}/bin:' -e 's:@GS@:gs:' \
+ pstopxl.in > pstopxl || die "pstopxlsed failed"
+ sed -i -e 's:OUTPUTFILE="%stdout" $profile $6$:\0 -:' \
+ -e 's:/usr/local:/usr:' pstoraster || die "pstorastersed failed"
+ sed -i -e "s:pstopcl6:pstopxl:" cups.mak || die "cupssed failed"
+ cd ..
+ epatch "${FILESDIR}"/gdevcups.patch
+ epatch "${FILESDIR}"/ghostscript-afpl-8.54-cups-destdir.diff
+
+ echo 'include pstoraster/cups.mak' >> src/Makefile.in
+ sed -i -e 's:DEVICE_DEVS17=:\0$(DD)cups.dev:' src/Makefile.in || die "sed failed"
+ sed -i -e 's:EXTRALIBS=.*:\0 -lcups -lcupsimage:' src/Makefile.in || die "sed failed"
+ fi
+ cd "${S}"
+
+ if use bindist && use djvu ; then
+ ewarn "You have bindist in your USE, djvu support will NOT be compiled!"
+ ewarn "See http://djvu.sourceforge.net/gsdjvu/COPYING for details on licensing issues."
+ fi
+
+ if ! use bindist && use djvu; then
+ unpack gsdjvu-${GSDJVU_PV}.tar.gz
+ cp gsdjvu-${GSDJVU_PV}/gsdjvu "${S}"
+ cp gsdjvu-${GSDJVU_PV}/gdevdjvu.c "${S}"/src
+ epatch "${FILESDIR}"/djvu-gs-gpl.patch
+ cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}"/lib
+ cp "${S}"/src/contrib.mak "${S}"/src/contrib.mak.gsdjvu
+ grep -q djvusep "${S}"/src/contrib.mak || \
+ cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}"/src/contrib.mak
+ fi
+
+ epatch "${FILESDIR}"/ghostscript-afpl-8.57-cups-lib.patch
+# epatch "${FILESDIR}"/ghostscript-afpl-8.54-big-cmap-post.patch
+
+ # enable cfax device (bug #56704) and rinkj device
+ sed -i -e 's:DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev:\0 $(DD)cfax.dev $(DD)rinkj.dev:' \
+ "${S}"/src/Makefile.in || die "sed failed"
+
+ # http://www.linuxprinting.org/download/printing/ghostscript-8.x/drivers/hl1250
+ # http://bugs.ghostscript.com/show_bug.cgi?id=687484
+ cp ${WORKDIR}/gdevhl12.c "${S}"/src/gdevhl12.c || die
+ cat "${FILESDIR}"/gdevhl12-hl1250.mak >> "${S}"/src/contrib.mak || die
+ sed -e 's#^\(DEVICE_DEVS6=.*\)$#\1 $(DD)hl1240.dev $(DD)hl1250.dev#' \
+ -i "${S}"/src/Makefile.in || die
+ sed -i -e "s:#if 1:#if 0:" "${S}"/src/gdevhl12.c || die
+
+ epatch "${FILESDIR}"/ghostscript-afpl-8.54-rinkj.patch
+
+ if ! use gtk; then
+ sed -i "s:\$(GSSOX)::" src/*.mak || die "gsx sed failed"
+ sed -i "s:.*\$(GSSOX_XENAME)$::" src/*.mak || die "gsxso sed failed"
+ fi
+
+ # search path fix
+ sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
+ -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
+ -e "s:exdir=.*:exdir=/usr/share/doc/${PF}/examples:" \
+ -e "s:docdir=.*:docdir=/usr/share/doc/${PF}/html:" \
+ -e "s:GS_DOCDIR=.*:GS_DOCDIR=/usr/share/doc/${PF}/html:" \
+ src/Makefile.in src/*.mak || die "sed failed"
+}
+
+src_compile() {
+ econf $(use_with X x) \
+ $(use_with jpeg2k jasper) \
+ --with-ijs \
+ --with-jbig2dec || die "econf failed"
+
+ if ! use bindist && use djvu; then
+ sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
+ sed -i -e 's:(/\(Resource/[a-zA-Z/]*\)):(\1) findlibfile {pop} {pop &}
+ ifelse:' lib/gs_res.ps
+ fi
+
+ emake -j1 so all || die "emake failed"
+
+ cd ijs
+ econf || die "ijs econf failed"
+ emake || die "ijs emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+# emake DESTDIR="${D}" soinstall || die "emake soinstall failed"
+
+ if ! use bindist && use djvu ; then
+ dobin gsdjvu
+ fi
+
+ rm -fr "${D}"/usr/share/doc/${PF}/html/{README,PUBLIC}
+ dodoc doc/README
+ use emacs && elisp-site-file-install doc/gsdoc.el
+
+ cd ${S}/ijs
+ emake DESTDIR="${D}" install || die "emake ijs install failed"
+}
+