summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Medinas <metalgod@gentoo.org>2006-01-05 02:04:56 +0000
committerLuis Medinas <metalgod@gentoo.org>2006-01-05 02:04:56 +0000
commitf8c701eccee8da65ed3288915a44b8c0457b9c02 (patch)
treec74a519ad58917c631c99b98418fca3b7d2b6fa3 /app-text
parentMasked new version of ghostscript-esp for testing. (diff)
downloadgentoo-2-f8c701eccee8da65ed3288915a44b8c0457b9c02.tar.gz
gentoo-2-f8c701eccee8da65ed3288915a44b8c0457b9c02.tar.bz2
gentoo-2-f8c701eccee8da65ed3288915a44b8c0457b9c02.zip
Version Bump. Thanks to all people involved in bug #91119.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-esp/ChangeLog14
-rw-r--r--app-text/ghostscript-esp/Manifest22
-rw-r--r--app-text/ghostscript-esp/files/digest-ghostscript-esp-8.15.13
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-badc.patch22
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-build.patch40
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-gtk2.patch11
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-noopt.patch11
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-pagesize.patch12
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-ps2epsi.patch10
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-scripts.patch37
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-split-font-configuration.patch57
-rw-r--r--app-text/ghostscript-esp/files/ghostscript-use-external-freetype.patch72
-rw-r--r--app-text/ghostscript-esp/files/gs-8.15.1destdir.patch321
-rw-r--r--app-text/ghostscript-esp/ghostscript-esp-8.15.1.ebuild137
14 files changed, 758 insertions, 11 deletions
diff --git a/app-text/ghostscript-esp/ChangeLog b/app-text/ghostscript-esp/ChangeLog
index 1f770f13c397..f44be3ea8508 100644
--- a/app-text/ghostscript-esp/ChangeLog
+++ b/app-text/ghostscript-esp/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for app-text/ghostscript
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-esp/ChangeLog,v 1.1 2006/01/05 00:00:18 metalgod Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-esp/ChangeLog,v 1.2 2006/01/05 02:04:55 metalgod Exp $
+
+*ghostscript-esp-8.15.1 (05 Jan 2006)
+
+ 05 Jan 2006; Luis Medinas <metalgod@gentoo.org>
+ +files/ghostscript-badc.patch, +files/ghostscript-build.patch,
+ +files/ghostscript-gtk2.patch, +files/ghostscript-noopt.patch,
+ +files/ghostscript-pagesize.patch, +files/ghostscript-ps2epsi.patch,
+ +files/gs-8.15.1destdir.patch, +files/ghostscript-scripts.patch,
+ +files/ghostscript-split-font-configuration.patch,
+ +files/ghostscript-use-external-freetype.patch,
+ +ghostscript-esp-8.15.1.ebuild:
+ Version Bump. Thanks to all people involved in bug #91119.
*ghostscript-esp-7.07.1-r10 (04 Jan 2006)
*ghostscript-esp-7.07.1-r8 (04 Jan 2006)
diff --git a/app-text/ghostscript-esp/Manifest b/app-text/ghostscript-esp/Manifest
index cdf9e607c21d..57685d42c069 100644
--- a/app-text/ghostscript-esp/Manifest
+++ b/app-text/ghostscript-esp/Manifest
@@ -1,10 +1,10 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 0bdb830207be3a72c5ea14d5300f7e47 ChangeLog 19299
MD5 db00eb9aaf23133f903513fea669954f files/digest-ghostscript-esp-7.07.1-r10 212
MD5 db00eb9aaf23133f903513fea669954f files/digest-ghostscript-esp-7.07.1-r7 212
MD5 db00eb9aaf23133f903513fea669954f files/digest-ghostscript-esp-7.07.1-r8 212
+MD5 d103f68902b401dd7844a93d16b174c1 files/digest-ghostscript-esp-8.15.1 212
+MD5 f3a75fcde50479b3f58871663272924c files/ghostscript-badc.patch 905
+MD5 1fa0a00ca3a3f906f0ac62dc961e78d8 files/ghostscript-build.patch 1968
MD5 fd34b2b7a029f19eab4ba3f69afe295e files/ghostscript-esp-7.05.6.man.patch 1231
MD5 f834d056ca972c457a2ff3b1e839e562 files/ghostscript-esp-7.07-bigposttable.patch 1257
MD5 55146a1eafc4ad3a26d99121ae0777fe files/ghostscript-esp-7.07-coverage-glyphcount.patch 3100
@@ -12,6 +12,14 @@ MD5 c73ad916d49df447de59358ffdc495eb files/ghostscript-esp-7.07-fix_cidfontname_
MD5 e0da7576378dc87fa53a16dfd1774789 files/ghostscript-esp-7.07-fix_rename_font_gs_cidfn.ps.patch 1611
MD5 b37c0dc9f85205da6e8675d4a8bfd21a files/ghostscript-esp-7.07-gsublookuptable.patch 3808
MD5 5b476654e84a9748e3d56d86f264b277 files/ghostscript-esp-7.07.1-64bit-cmyk.patch 1777
+MD5 e8974faf06541ccb8c271180d87175bd files/ghostscript-gtk2.patch 610
+MD5 01cfb541633de9580aa5151543a0075f files/ghostscript-noopt.patch 557
+MD5 83a8ae09246090685c93fcf85fda8301 files/ghostscript-pagesize.patch 475
+MD5 8cd1807897a48d3bfb9767309594969b files/ghostscript-ps2epsi.patch 354
+MD5 9d3484ccc9ea57948e8e54cc838938c4 files/ghostscript-scripts.patch 1038
+MD5 f4b3fd94487ade5bb11a91a4037b5e0c files/ghostscript-split-font-configuration.patch 2120
+MD5 2860ac190e2737c358b105c31152a1c8 files/ghostscript-use-external-freetype.patch 2778
+MD5 4232a57145c2eafd1d84eabd674190f9 files/gs-8.15.1destdir.patch 13364
MD5 8c6a3d7e8897b4297ef853dbd89e408b files/gs-fix-gc.patch 5627
MD5 186fc94fd3208e808026580e7436dbdc files/gs-osx-ijs.patch 1566
MD5 212a5ece7d789ef9d04e15fd7d36eea3 files/gs-osx-unix-dll.patch 1930
@@ -34,11 +42,5 @@ MD5 0201da09644874147627750546511c36 files/gs7.07.1-tempfile.patch 3125
MD5 32d445682c030ec35813551b5ddb8814 ghostscript-esp-7.07.1-r10.ebuild 6170
MD5 faaaafdb2032600cbf5d316eb56ca40b ghostscript-esp-7.07.1-r7.ebuild 4295
MD5 a233931f6f88faa6ea1dd0de7435687f ghostscript-esp-7.07.1-r8.ebuild 5500
+MD5 0d997a65b47ba060e299c4e186f20799 ghostscript-esp-8.15.1.ebuild 4137
MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFDvGGUwUpWvClEHQoRAk5CAJ0YDru5uIoJdFADdvoSagTGeBvTFgCdFmVw
-v+xha67QM2HbjOmzK7jkDew=
-=gEZG
------END PGP SIGNATURE-----
diff --git a/app-text/ghostscript-esp/files/digest-ghostscript-esp-8.15.1 b/app-text/ghostscript-esp/files/digest-ghostscript-esp-8.15.1
new file mode 100644
index 000000000000..5dca2de31e1a
--- /dev/null
+++ b/app-text/ghostscript-esp/files/digest-ghostscript-esp-8.15.1
@@ -0,0 +1,3 @@
+MD5 2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz 631653
+MD5 a3bf430a7e21cd82401258a2ec3b8afb adobe-cmaps-200204.tar.gz 4360486
+MD5 2a21136953c3559e6088522753b06b1f espgs-8.15.1-source.tar.bz2 7758723
diff --git a/app-text/ghostscript-esp/files/ghostscript-badc.patch b/app-text/ghostscript-esp/files/ghostscript-badc.patch
new file mode 100644
index 000000000000..1b85a880ba4e
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-badc.patch
@@ -0,0 +1,22 @@
+--- espgs-8.15rc3/src/gdevps.c.badc 2005-02-16 21:21:49.000000000 +0000
++++ espgs-8.15rc3/src/gdevps.c 2005-06-03 10:56:31.000000000 +0100
+@@ -1164,7 +1164,7 @@
+ gs_rect bbox;
+
+ gx_device_bbox_bbox(vdev->bbox_device, &bbox);
+- if (pdev->first_page & !vdev->in_page) {
++ if (pdev->first_page && !vdev->in_page) {
+ /* Nothing has been written. Write the file header now. */
+ code = psw_begin_file(pdev, &bbox);
+ if (code < 0)
+--- espgs-8.15rc3/src/scfd.c.badc 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15rc3/src/scfd.c 2005-06-03 10:56:31.000000000 +0100
+@@ -305,7 +305,7 @@
+ * in the string of initial zeros in the EOL. If EndOfLine
+ * is false, we aren't sure what we should do....
+ */
+- if (ss->EncodedByteAlign & !ss->EndOfLine)
++ if (ss->EncodedByteAlign && !ss->EndOfLine)
+ ss->bits_left &= ~7;
+ }
+ /* If we're between scan lines, scan for EOLs. */
diff --git a/app-text/ghostscript-esp/files/ghostscript-build.patch b/app-text/ghostscript-esp/files/ghostscript-build.patch
new file mode 100644
index 000000000000..25cf8c505f54
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-build.patch
@@ -0,0 +1,40 @@
+--- espgs-8.15rc3/src/unix-dll.mak.build 2005-06-03 12:49:36.000000000 +0100
++++ espgs-8.15rc3/src/unix-dll.mak 2005-06-03 12:49:59.000000000 +0100
+@@ -87,7 +87,7 @@
+
+ # Normal shared object
+ so: SODIRS
+- $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
++ $(MAKE) $(SODEFS) CFLAGS='$(CFLAGS_STANDARD) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS) $(ACDEFS)' prefix=$(prefix) $(GSSOC) $(GSSOX)
+
+ # Debug shared object
+ # Note that this is in the same directory as the normal shared
+--- espgs-8.15rc3/src/devs.mak.build 2005-06-03 22:41:16.000000000 +0100
++++ espgs-8.15rc3/src/devs.mak 2005-06-03 22:42:54.000000000 +0100
+@@ -457,7 +457,7 @@
+ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevx.$(OBJ) $(C_) $(GLSRC)gdevx.c
+
+ $(GLOBJ)gdevxcmp.$(OBJ) : $(GLSRC)gdevxcmp.c $(GDEVX) $(math__h)
+- $(GLCC) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
++ $(GLCCSHARED) $(XINCLUDE) $(GLO_)gdevxcmp.$(OBJ) $(C_) $(GLSRC)gdevxcmp.c
+
+ $(GLOBJ)gdevxini.$(OBJ) : $(GLSRC)gdevxini.c $(GDEVX) $(memory__h)\
+ $(gserrors_h) $(gsparamx_h) $(gxdevmem_h) $(gdevbbox_h)
+--- espgs-8.15rc3/src/lib.mak.build 2005-06-03 22:51:22.000000000 +0100
++++ espgs-8.15rc3/src/lib.mak 2005-06-03 22:52:11.000000000 +0100
+@@ -847,7 +847,7 @@
+ $(GLOBJ)gsparamx.$(OBJ) : $(GLSRC)gsparamx.c $(string__h)\
+ $(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gsparamx_h)\
+ $(gstypes_h)
+- $(GLCC) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
++ $(GLCCSHARED) $(GLO_)gsparamx.$(OBJ) $(C_) $(GLSRC)gsparamx.c
+
+ # Future replacement for gsparams.c
+ $(GLOBJ)gsparam2.$(OBJ) : $(GLSRC)gsparam2.c $(GXERR) $(memory__h)\
+
+ # Provide a mapping between StandardEncoding and ISOLatin1Encoding.
+ $(GLOBJ)gdevemap.$(OBJ) : $(GLSRC)gdevemap.c $(AK) $(std_h)
+- $(GLCC) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
++ $(GLCCSHARED) $(GLO_)gdevemap.$(OBJ) $(C_) $(GLSRC)gdevemap.c
+
+ ###### Create a pseudo-"feature" for the entire graphics library.
diff --git a/app-text/ghostscript-esp/files/ghostscript-gtk2.patch b/app-text/ghostscript-esp/files/ghostscript-gtk2.patch
new file mode 100644
index 000000000000..6a70be4c34d3
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-gtk2.patch
@@ -0,0 +1,11 @@
+--- espgs-8.15rc3/src/unix-dll.mak.gtk2 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15rc3/src/unix-dll.mak 2005-06-03 12:31:56.000000000 +0100
+@@ -67,7 +67,7 @@
+ # Build the small Ghostscript loaders, with Gtk+ and without
+
+ $(GSSOX_XE): $(GS_SO) $(GLSRC)dxmain.c
+- $(GLCC) -g `gtk-config --cflags` -o $(GSSOX_XE) $(GLSRC)dxmain.c -L$(BINDIR) -l$(GS) `gtk-config --libs`
++ $(GLCC) -g `pkg-config gtk+-2.0 --cflags` -o $(GSSOX_XE) $(GLSRC)dxmain.c -L$(BINDIR) -l$(GS) `pkg-config gtk+-2.0 --libs`
+
+ $(GSSOC_XE): $(GS_SO) $(GLSRC)dxmainc.c
+ $(GLCC) -g -o $(GSSOC_XE) $(GLSRC)dxmainc.c -L$(BINDIR) -l$(GS)
diff --git a/app-text/ghostscript-esp/files/ghostscript-noopt.patch b/app-text/ghostscript-esp/files/ghostscript-noopt.patch
new file mode 100644
index 000000000000..3a93580e0346
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-noopt.patch
@@ -0,0 +1,11 @@
+--- ghostscript-7.07/src/int.mak.noopt 2005-03-10 17:22:53.000000000 +0000
++++ ghostscript-7.07/src/int.mak 2005-03-10 17:24:10.000000000 +0000
+@@ -105,7 +105,7 @@
+ $(PSOBJ)igcref.$(OBJ) : $(PSSRC)igcref.c $(GH) $(memory__h)\
+ $(gsexit_h) $(gsstruct_h)\
+ $(iastate_h) $(idebug_h) $(igc_h) $(iname_h) $(ipacked_h) $(store_h)
+- $(PSCC) $(PSO_)igcref.$(OBJ) $(C_) $(PSSRC)igcref.c
++ $(PSCC) -O0 $(PSO_)igcref.$(OBJ) $(C_) $(PSSRC)igcref.c
+
+ $(PSOBJ)igcstr.$(OBJ) : $(PSSRC)igcstr.c $(GH) $(memory__h)\
+ $(gsmdebug_h) $(gsstruct_h) $(iastate_h) $(igcstr_h)
diff --git a/app-text/ghostscript-esp/files/ghostscript-pagesize.patch b/app-text/ghostscript-esp/files/ghostscript-pagesize.patch
new file mode 100644
index 000000000000..8e470760d168
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-pagesize.patch
@@ -0,0 +1,12 @@
+--- ghostscript-7.07/src/gdevpsu.c.pagesize 2004-06-25 17:31:43.054995862 +0100
++++ ghostscript-7.07/src/gdevpsu.c 2004-06-25 17:33:07.500857781 +0100
+@@ -273,6 +273,9 @@
+ while (p->size_name[0] == '/' &&
+ (p->width != width || p->height != height))
+ ++p;
++ /* If no match then decrement pointer back to /letter */
++ if (p->width == 0 && p->height == 0)
++ --p;
+ pprintd2(s, "%d %d ", width, height);
+ pprints1(s, "%s setpagesize\n", p->size_name);
+ }
diff --git a/app-text/ghostscript-esp/files/ghostscript-ps2epsi.patch b/app-text/ghostscript-esp/files/ghostscript-ps2epsi.patch
new file mode 100644
index 000000000000..fd000aaa11f0
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-ps2epsi.patch
@@ -0,0 +1,10 @@
+--- espgs-8.15rc3/lib/ps2epsi.ps2epsi 2005-06-02 18:13:37.000000000 +0100
++++ espgs-8.15rc3/lib/ps2epsi 2005-06-03 10:47:10.000000000 +0100
+@@ -73,6 +73,7 @@
+ BEGINEPS
+
+ cat "${infile}" |
++LC_ALL=C \
+ sed -e '/^%%BeginPreview:/,/^%%EndPreview[^!-\~]*$/d' -e '/^%!PS-Adobe/d' \
+ -e '/^%%[A-Za-z][A-Za-z]*[^!-\~]*$/d' -e '/^%%[A-Za-z][A-Za-z]*: /d'
+
diff --git a/app-text/ghostscript-esp/files/ghostscript-scripts.patch b/app-text/ghostscript-esp/files/ghostscript-scripts.patch
new file mode 100644
index 000000000000..f4d9885acb4f
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-scripts.patch
@@ -0,0 +1,37 @@
+--- espgs-8.15rc3/lib/pv.sh.scripts 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15rc3/lib/pv.sh 2005-06-02 17:40:08.000000000 +0100
+@@ -26,12 +26,17 @@
+ # the -D switch from the call of dvips below.
+ #
+ TEMPDIR=.
+-PAGE=$1
++PAGE="$1"
+ shift
+-FILE=$1
++FILE="$1"
+ shift
+-trap "rm -rf $TEMPDIR/$FILE.$$.pv" 0 1 2 15
+-#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
+-dvips -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
+-gs $FILE.$$.pv
++TEMPFILE=`mktemp "$TEMPDIR/$FILE.XXXXXX"`
++if [ $? -ne 0 ]
++then
++ exit 1
++fi
++trap 'rm -f "$TEMPFILE"' 0 1 2 15
++#dvips -R -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $FILE.$$.pv
++dvips -R -p $PAGE -n 1 "$FILE" "$@" -o "$TEMPFILE"
++gs "$TEMPFILE"
+ exit 0
+--- espgs-8.15rc3/lib/ps2epsi.scripts 2005-06-02 17:41:32.000000000 +0100
++++ espgs-8.15rc3/lib/ps2epsi 2005-06-02 17:41:50.000000000 +0100
+@@ -5,7 +5,7 @@
+ gs=gs
+ fi
+
+-tmpfile=/tmp/ps2epsi$$
++tmpfile=`mktemp ${TMPDIR-/tmp}/ps2epsi.XXXXXX`
+ rm -f $tmpfile
+ if test -e $tmpfile; then
+ echo "$0: Our temporary file $tmpfile already exists." 1>&2
diff --git a/app-text/ghostscript-esp/files/ghostscript-split-font-configuration.patch b/app-text/ghostscript-esp/files/ghostscript-split-font-configuration.patch
new file mode 100644
index 000000000000..ab1c3b031bd8
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-split-font-configuration.patch
@@ -0,0 +1,57 @@
+diff -ruN espgs-8.15rc3.orig/lib/gs_fonts.ps espgs-8.15rc3/lib/gs_fonts.ps
+--- espgs-8.15rc3.orig/lib/gs_fonts.ps 2005-02-17 06:21:49.000000000 +0900
++++ espgs-8.15rc3/lib/gs_fonts.ps 2005-07-13 20:14:12.000000000 +0900
+@@ -96,10 +96,17 @@
+ % stack: dict file fontname filename|aliasname
+ 1 index type /stringtype eq
+ 1 index type /nametype eq and 1 index xcheck and
+- 1 index /run eq 2 index /.runlibfile eq or and {
++ 1 index /run eq 2 index /.runlibfile eq 3 index /.runlibfileifexists eq or or and {
+ % This is an inclusion entry.
+- pop findlibfile { exch pop } { file } ifelse
+- 2 index exch .readFontmap pop
++ 0 index /.runlibfileifexists eq {
++ pop findlibfile {
++ exch pop
++ 2 index exch .readFontmap pop
++ } { pop } ifelse
++ } {
++ pop findlibfile { exch pop } { file } ifelse
++ 2 index exch .readFontmap pop
++ } ifelse
+ } {
+ % This is a real entry.
+ % Read and pop tokens until a semicolon.
+diff -ruN espgs-8.15rc3.orig/lib/gs_init.ps espgs-8.15rc3/lib/gs_init.ps
+--- espgs-8.15rc3.orig/lib/gs_init.ps.in 2005-07-12 11:04:36.000000000 +0900
++++ espgs-8.15rc3/lib/gs_init.ps.in 2005-07-13 20:14:12.000000000 +0900
+@@ -655,6 +655,13 @@
+ { /undefinedfilename signalerror }
+ ifelse
+ } bind def
++/runlibfileifexists
++ {
++ findlibfile
++ { exch pop /run .systemvar exec }
++ { pop }
++ ifelse
++ } bind def
+ /selectdevice
+ { finddevice setdevice .setdefaultscreen } bind def
+ /signalerror % <object> <errorname> signalerror -
+@@ -816,6 +823,7 @@
+ } bind def
+ % Temporarily substitute it for the real runlibfile.
+ /.runlibfile /runlibfile load def
++/.runlibfileifexists /runlibfileifexists load def
+ /runlibfile /runlibfile0 load def
+
+ % Create the error handling machinery.
+@@ -1655,6 +1663,7 @@
+
+ % Restore the real definition of runlibfile.
+ /runlibfile /.runlibfile load def
++/runlibfileifexists /.runlibfileifexists load def
+ currentdict /.runlibfile .undef
+
+ % Bind all the operators defined as procedures.
diff --git a/app-text/ghostscript-esp/files/ghostscript-use-external-freetype.patch b/app-text/ghostscript-esp/files/ghostscript-use-external-freetype.patch
new file mode 100644
index 000000000000..2662b402fb41
--- /dev/null
+++ b/app-text/ghostscript-esp/files/ghostscript-use-external-freetype.patch
@@ -0,0 +1,72 @@
+diff -ruN espgs-8.15rc3.orig/src/fapi_ft.c espgs-8.15rc3/src/fapi_ft.c
+--- espgs-8.15rc3.orig/src/fapi_ft.c 2005-01-19 13:08:41.000000000 +0900
++++ espgs-8.15rc3/src/fapi_ft.c 2005-07-12 11:36:32.000000000 +0900
+@@ -30,11 +30,12 @@
+ #include "math_.h"
+
+ /* FreeType headers */
+-#include "freetype/freetype.h"
+-#include "freetype/ftincrem.h"
+-#include "freetype/ftglyph.h"
+-#include "freetype/ftoutln.h"
+-#include "freetype/fttrigon.h"
++#include <ft2build.h>
++#include FT_FREETYPE_H
++#include FT_INCREMENTAL_H
++#include FT_GLYPH_H
++#include FT_OUTLINE_H
++#include FT_TRIGONOMETRY_H
+
+ #include <assert.h>
+
+diff -ruN espgs-8.15rc3.orig/src/int.mak espgs-8.15rc3/src/int.mak
+--- espgs-8.15rc3.orig/src/int.mak 2005-07-12 11:04:23.000000000 +0900
++++ espgs-8.15rc3/src/int.mak 2005-07-12 11:38:09.000000000 +0900
+@@ -1873,43 +1873,35 @@
+ # FreeType bridge :
+
+ FT_LIB=$(FT_ROOT)$(D)objs$(D)freetype214MT_D
+-FT_INC=$(I_)$(FT_ROOT)$(D)include$(_I)
+-
+ wrfont_h=$(stdpre_h) $(PSSRC)wrfont.h
+ write_t1_h=$(ifapi_h) $(PSSRC)write_t1.h
+ write_t2_h=$(ifapi_h) $(PSSRC)write_t2.h
+
+ $(PSD)fapif1.dev : $(INT_MAK) $(ECHOGS_XE) \
+- $(FT_LIB)$(FT_LIB_EXT) \
+ $(PSOBJ)fapi_ft.$(OBJ) \
+ $(PSOBJ)write_t1.$(OBJ) $(PSOBJ)write_t2.$(OBJ) $(PSOBJ)wrfont.$(OBJ)
+ $(SETMOD) $(PSD)fapif1 $(PSOBJ)fapi_ft.$(OBJ) $(PSOBJ)write_t1.$(OBJ)
+ $(ADDMOD) $(PSD)fapif1 $(PSOBJ)write_t2.$(OBJ) $(PSOBJ)wrfont.$(OBJ)
+ $(ADDMOD) $(PSD)fapif1 -plugin fapi_ft
+- $(ADDMOD) $(PSD)fapif1 -link $(FT_LIB)$(FT_LIB_EXT)
++ $(ADDMOD) $(PSD)fapif1 -lib $(FT_LIB)
+
+ $(PSOBJ)fapi_ft.$(OBJ) : $(PSSRC)fapi_ft.c $(AK)\
+ $(stdio__h) $(math__h) $(ifapi_h)\
+- $(FT_ROOT)$(D)include$(D)freetype$(D)freetype.h\
+- $(FT_ROOT)$(D)include$(D)freetype$(D)ftincrem.h\
+- $(FT_ROOT)$(D)include$(D)freetype$(D)ftglyph.h\
+- $(FT_ROOT)$(D)include$(D)freetype$(D)ftoutln.h\
+- $(FT_ROOT)$(D)include$(D)freetype$(D)fttrigon.h\
+ $(write_t1_h) $(write_t2_h)
+- $(PSCC) $(FT_CFLAGS) $(FT_INC) $(PSO_)fapi_ft.$(OBJ) $(C_) $(PSSRC)fapi_ft.c
++ $(PSCC) $(FT_CFLAGS) $(PSO_)fapi_ft.$(OBJ) $(C_) $(PSSRC)fapi_ft.c
+
+ $(PSOBJ)write_t1.$(OBJ) : $(PSSRC)write_t1.c $(AK)\
+ $(wrfont_h) $(write_t1_h)
+- $(PSCC) $(FT_CFLAGS) $(FT_INC) $(PSO_)write_t1.$(OBJ) $(C_) $(PSSRC)write_t1.c
++ $(PSCC) $(FT_CFLAGS) $(PSO_)write_t1.$(OBJ) $(C_) $(PSSRC)write_t1.c
+
+ $(PSOBJ)write_t2.$(OBJ) : $(PSSRC)write_t2.c $(AK)\
+ $(wrfont_h) $(write_t2_h) $(stdio_h)
+- $(PSCC) $(FT_CFLAGS) $(FT_INC) $(PSO_)write_t2.$(OBJ) $(C_) $(PSSRC)write_t2.c
++ $(PSCC) $(FT_CFLAGS) $(PSO_)write_t2.$(OBJ) $(C_) $(PSSRC)write_t2.c
+
+ $(PSOBJ)wrfont.$(OBJ) : $(PSSRC)wrfont.c $(AK)\
+ $(wrfont_h) $(stdio_h)
+- $(PSCC) $(FT_CFLAGS) $(FT_INC) $(PSO_)wrfont.$(OBJ) $(C_) $(PSSRC)wrfont.c
++ $(PSCC) $(FT_CFLAGS) $(PSO_)wrfont.$(OBJ) $(C_) $(PSSRC)wrfont.c
+
+ # stub for FreeType bridge :
+
diff --git a/app-text/ghostscript-esp/files/gs-8.15.1destdir.patch b/app-text/ghostscript-esp/files/gs-8.15.1destdir.patch
new file mode 100644
index 000000000000..8236c46e99ab
--- /dev/null
+++ b/app-text/ghostscript-esp/files/gs-8.15.1destdir.patch
@@ -0,0 +1,321 @@
+diff -urN espgs-8.15.1.orig/addons/addons.mak espgs-8.15.1/addons/addons.mak
+--- espgs-8.15.1.orig/addons/addons.mak 2005-08-16 10:07:21.000000000 +0000
++++ espgs-8.15.1/addons/addons.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -953,9 +953,9 @@
+ $(GLCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c
+
+ extra-dmprt-install:
+- $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(install_prefix)$(gsdatadir)$(D)lib || exit 1
+- $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(install_prefix)$(gsdatadir)$(D)lib || exit 1
+- $(INSTALL_DATA) $(JAPSRC)escp_24.src $(install_prefix)$(gsdatadir)$(D)lib || exit 1
++ $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
++ $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
++ $(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1
+
+
+
+@@ -1095,7 +1095,7 @@
+
+ extra-upp-install:
+ for f in $(ADSRC)uniprint$(D)*.upp; do \
+- $(INSTALL_DATA) $$f $(install_prefix)$(gsdatadir)$(D)lib || exit 1; \
++ $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \
+ done
+
+ ### ------------ Build/Install special features ------------ ###
+diff -urN espgs-8.15.1.orig/pstoraster/cups.mak espgs-8.15.1/pstoraster/cups.mak
+--- espgs-8.15.1.orig/pstoraster/cups.mak 2005-02-21 16:17:00.000000000 +0000
++++ espgs-8.15.1/pstoraster/cups.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -24,9 +24,9 @@
+
+ cups_= $(GLOBJ)gdevcups.$(OBJ)
+
+-CUPSSERVER= $(install_prefix)`cups-config --serverbin`
+-CUPSCONFIG= $(install_prefix)`cups-config --serverroot`
+-CUPSDATA= $(install_prefix)`cups-config --datadir`
++CUPSSERVER= $(DESTDIR)`cups-config --serverbin`
++CUPSCONFIG= $(DESTDIR)`cups-config --serverroot`
++CUPSDATA= $(DESTDIR)`cups-config --datadir`
+
+ $(DD)cups.dev: $(cups_) $(GLD)page.dev
+ $(ADDMOD) $(DD)cups -lib cupsimage -lib cups
+diff -urN espgs-8.15.1.orig/src/all-arch.mak espgs-8.15.1/src/all-arch.mak
+--- espgs-8.15.1.orig/src/all-arch.mak 2005-01-23 03:49:47.000000000 +0000
++++ espgs-8.15.1/src/all-arch.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -298,24 +298,24 @@
+ # Remove the old gs binary first, so as to preserve the previous
+ # gs-x.yy version, if any.
+ install-binary:
+- -$(RM) $(BINDIR)/$(GS)
++ -$(RM) $(DESTDIR)$(BINDIR)/$(GS)
+ @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) ; \
+ d=`pwd` ; \
+ d=`basename $$d` ; \
+ d=`echo $$d | sed -e s/gs/gs-/` ; \
+- $(RM) $(BINDIR)/$$d ; \
+- ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \
+- ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d
++ $(RM) $(DESTDIR)$(BINDIR)/$$d ; \
++ ln $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d ; \
++ ls -l $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d
+
+ install-binary-gnu-readline:
+- -$(RM) $(BINDIR)/$(GS)
++ -$(RM) $(DESTDIR)$(BINDIR)/$(GS)
+ @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) $(GNU_READLINE_ARGS) ; \
+ d=`pwd` ; \
+ d=`basename $$d` ; \
+ d=`echo $$d | sed -e s/gs/gs-/` ; \
+- $(RM) $(BINDIR)/$$d ; \
+- ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \
+- ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d
++ $(RM) $(DESTDIR)$(BINDIR)/$$d ; \
++ ln $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d ; \
++ ls -l $(DESTDIR)$(BINDIR)/$(GS) $(DESTDIR)$(BINDIR)/$$d
+
+ install-fontmap:
+ @d=`pwd` ; \
+@@ -323,14 +323,14 @@
+ d=`echo $$d | sed -e s/gs//` ; \
+ if test -f $(GS_SRC_DIR)/Fontmap.new ; \
+ then \
+- if test -f $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
++ if test -f $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
+ then \
+ true ; \
+ else \
+- mv $(GS_SHARE_DIR)/$$d/lib/Fontmap $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
++ mv $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \
+ fi ; \
+- $(CP) $(GS_SRC_DIR)/Fontmap.new $(GS_SHARE_DIR)/$$d/lib/Fontmap ; \
+- ls -l $(GS_SHARE_DIR)/$$d/lib/Fontmap* ; \
++ $(CP) $(GS_SRC_DIR)/Fontmap.new $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap ; \
++ ls -l $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/Fontmap* ; \
+ fi
+
+ install-pdfsec:
+@@ -339,9 +339,9 @@
+ d=`echo $$d | sed -e s/gs//` ; \
+ if test -f $(GS_SRC_DIR)/lib/pdf_sec.ps ; \
+ then \
+- $(MV) $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps.org ; \
+- $(CP) lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
+- $(CHMOD) 664 $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
++ $(MV) $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps.org ; \
++ $(CP) lib/pdf_sec.ps $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
++ $(CHMOD) 664 $(DESTDIR)$(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \
+ fi
+
+ #=======================================================================
+diff -urN espgs-8.15.1.orig/src/macos-fw.mak espgs-8.15.1/src/macos-fw.mak
+--- espgs-8.15.1.orig/src/macos-fw.mak 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15.1/src/macos-fw.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -103,19 +103,19 @@
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+
+ install-so: so
+- -mkdir $(prefix)
+- -mkdir $(datadir)
+- -mkdir $(gsdir)
+- -mkdir $(gsdatadir)
+- -mkdir $(bindir)
+- -mkdir $(libdir)
+- $(INSTALL_PROGRAM) $(GSSOC) $(bindir)/$(GSSOC_XENAME)
+- $(INSTALL_PROGRAM) $(GSSOX) $(bindir)/$(GSSOX_XENAME)
+- $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR_MINOR)
+- $(RM_) $(libdir)/$(GS_SONAME)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME)
+- $(RM_) $(libdir)/$(GS_SONAME_MAJOR)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR)
++ -mkdir $(DESTDIR)$(prefix)
++ -mkdir $(DESTDIR)$(datadir)
++ -mkdir $(DESTDIR)$(gsdir)
++ -mkdir $(DESTDIR)$(gsdatadir)
++ -mkdir $(DESTDIR)$(bindir)
++ -mkdir $(DESTDIR)$(libdir)
++ $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
++ $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
++ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+
+ soinstall: install-so install-scripts install-data
+
+@@ -144,8 +144,8 @@
+ cp -r doc $(GS_FRAMEWORK)/Versions/Current
+
+ framework_install : framework
+- rm -rf $(prefix)
+- cp -r $(GS_FRAMEWORK) $(prefix)
++ rm -rf $(DESTDIR)$(prefix)
++ cp -r $(GS_FRAMEWORK) $(DESTDIR)$(prefix)
+
+ # Make the build directories
+ SODIRS: STDDIRS
+diff -urN espgs-8.15.1.orig/src/unix-dll.mak espgs-8.15.1/src/unix-dll.mak
+--- espgs-8.15.1.orig/src/unix-dll.mak 2005-01-19 04:08:41.000000000 +0000
++++ espgs-8.15.1/src/unix-dll.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -96,19 +96,19 @@
+ $(MAKE) $(SODEFS) GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(CFLAGS_SO) $(GCFLAGS) $(XCFLAGS)' $(GSSOC) $(GSSOX)
+
+ install-so: so
+- -mkdir -p $(prefix)
+- -mkdir -p $(datadir)
+- -mkdir -p $(gsdir)
+- -mkdir -p $(gsdatadir)
+- -mkdir -p $(bindir)
+- -mkdir -p $(libdir)
+- $(INSTALL_PROGRAM) $(GSSOC) $(bindir)/$(GSSOC_XENAME)
+- $(INSTALL_PROGRAM) $(GSSOX) $(bindir)/$(GSSOX_XENAME)
+- $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR_MINOR)
+- $(RM_) $(libdir)/$(GS_SONAME)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME)
+- $(RM_) $(libdir)/$(GS_SONAME_MAJOR)
+- ln -s $(GS_SONAME_MAJOR_MINOR) $(libdir)/$(GS_SONAME_MAJOR)
++ -mkdir -p $(DESTDIR)$(prefix)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(bindir)
++ -mkdir -p $(DESTDIR)$(libdir)
++ $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME)
++ $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME)
++ $(INSTALL_PROGRAM) $(BINDIR)/$(SOBINRELDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME)
++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
++ ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR)
+
+ soinstall: install-so install-scripts install-data
+
+diff -urN espgs-8.15.1.orig/src/unixinst.mak espgs-8.15.1/src/unixinst.mak
+--- espgs-8.15.1.orig/src/unixinst.mak 2005-09-22 17:03:45.000000000 +0000
++++ espgs-8.15.1/src/unixinst.mak 2005-11-03 11:57:30.000000000 +0000
+@@ -28,24 +28,24 @@
+ # rules, just in case bindir or scriptdir is a subdirectory of any of these.
+
+ install-exec: STDDIRS $(GS_XE)
+- -mkdir -p $(datadir)
+- -mkdir -p $(install_prefix)$(gsdir)
+- -mkdir -p $(install_prefix)$(gsdatadir)
+- -mkdir -p $(bindir)
+- $(INSTALL_PROGRAM) $(GS_XE) $(bindir)/$(GS)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) $(GS_XE) $(DESTDIR)$(bindir)/$(GS)
+
+ install-scripts: $(PSLIBDIR)/gsnd
+- -mkdir -p $(datadir)
+- -mkdir -p $(install_prefix)$(gsdir)
+- -mkdir -p $(install_prefix)$(gsdatadir)
+- -mkdir -p $(scriptdir)
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(scriptdir)
+ $(SH) -c 'for f in \
+ gsbj gsdj gsdj500 gslj gslp gsnd \
+ bdftops dumphints dvipdf eps2eps font2c \
+ pdf2dsc pdf2ps pdfopt pf2afm pfbtopfa printafm \
+ ps2ascii ps2epsi ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr ps2ps wftopfa \
+ fixmswrd.pl lprsetup.sh pj-gs.sh pv.sh sysvlp.sh unix-lpr.sh ;\
+- do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_PROGRAM) $(PSLIBDIR)/$$f $(scriptdir); fi;\
++ do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_PROGRAM) $(PSLIBDIR)/$$f $(DESTDIR)$(scriptdir); fi;\
+ done'
+
+ PSRESDIR=$(PSLIBDIR)/../Resource
+@@ -59,10 +59,10 @@
+ # one file from each subdirectory just as a sanity check.
+
+ install-libdata:
+- -mkdir -p $(datadir)
+- -mkdir -p $(install_prefix)$(gsdir)
+- -mkdir -p $(install_prefix)$(gsdatadir)
+- -mkdir -p $(install_prefix)$(gsdatadir)/lib
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)/lib
+ $(SH) -c 'for f in \
+ Fontmap Fontmap.GS cidfmap \
+ FAPIcidfmap FAPIconfig FAPIfontmap xlatmap \
+@@ -80,24 +80,24 @@
+ winmaps.ps wftopfa.ps wrfont.ps zeroline.ps \
+ pdf2dsc.ps pdfopt.ps \
+ dmp_init.ps dmp_site.ps gdevmjc.ps escp_24.src ;\
+- do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(install_prefix)$(gsdatadir)/lib; fi;\
++ do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(DESTDIR)$(gsdatadir)/lib; fi;\
+ done'
+ $(SH) -c 'for f in $(PSLIBDIR)/gs_*.ps $(PSLIBDIR)/pdf*.ps;\
+- do $(INSTALL_DATA) $$f $(install_prefix)$(gsdatadir)/lib ;\
++ do $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)/lib ;\
+ done'
+ $(SH) -c 'for f in $(PSLIBDIR)/*.ppd $(PSLIBDIR)/*.rpd $(PSLIBDIR)/*.upp $(PSLIBDIR)/*.xbm $(PSLIBDIR)/*.xpm;\
+- do $(INSTALL_DATA) $$f $(install_prefix)$(gsdatadir)/lib ;\
++ do $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)/lib ;\
+ done'
+
+ # install the default resource files
+ # copy in every category (directory) but CVS
+ RES_CATEGORIES=`ls $(PSRESDIR) | grep -v CVS`
+ install-resdata: $(PSRESDIR)/Decoding/Unicode
+- -mkdir -p $(datadir)
+- -mkdir -p $(install_prefix)$(gsdir)
+- -mkdir -p $(install_prefix)$(gsdatadir)/Resource
++ -mkdir -p $(DESTDIR)$(datadir)
++ -mkdir -p $(DESTDIR)$(gsdir)
++ -mkdir -p $(DESTDIR)$(gsdatadir)/Resource
+ $(SH) -c 'for dir in $(RES_CATEGORIES); do \
+- rdir=$(install_prefix)$(gsdatadir)/Resource/$$dir ; \
++ rdir=$(DESTDIR)$(gsdatadir)/Resource/$$dir ; \
+ test -d $$rdir || mkdir -p $$rdir ; \
+ for file in $(PSRESDIR)/$$dir/*; do \
+ if test -f $$file; then $(INSTALL_DATA) $$file $$rdir ; fi \
+@@ -118,9 +118,9 @@
+ Psfiles.htm Public.htm Readme.htm Release.htm \
+ Source.htm Tester.htm Unix-lpr.htm Use.htm Xfonts.htm
+ install-doc: $(PSDOCDIR)/News.htm
+- -mkdir -p $(install_prefix)$(docdir)
++ -mkdir -p $(DESTDIR)$(docdir)
+ $(SH) -c 'for f in $(DOC_PAGES) ;\
+- do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(install_prefix)$(docdir); fi;\
++ do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(DESTDIR)$(docdir); fi;\
+ done'
+
+ # install the man pages for each locale
+@@ -129,9 +129,9 @@
+ MAN1_LINKS_PS2PDF=ps2pdf12 ps2pdf13
+ MAN1_LINKS_GSLP=gsbj gsdj gsdj500 gslj
+ install-man: $(PSMANDIR)/gs.1
+- $(SH) -c 'test -d $(mandir) || mkdir -p $(mandir)'
++ $(SH) -c 'test -d $(DESTDIR)$(mandir) || mkdir -p $(DESTDIR)$(mandir)'
+ $(SH) -c 'for d in $(MAN_LCDIRS) ;\
+- do man1dir=$(mandir)/$$d/man$(man1ext) ;\
++ do man1dir=$(DESTDIR)$(mandir)/$$d/man$(man1ext) ;\
+ ( test -d $$man1dir || mkdir -p $$man1dir ) ;\
+ for f in $(PSMANDIR)/$$d/*.1 ;\
+ do $(INSTALL_DATA) $$f $$man1dir ;\
+@@ -158,15 +158,15 @@
+
+ # install the example files
+ install-examples:
+- -mkdir -p $(install_prefix)$(exdir)
++ -mkdir -p $(DESTDIR)$(exdir)
+ for f in \
+ alphabet.ps colorcir.ps doretree.ps escher.ps \
+ golfer.eps grayalph.ps snowflak.ps tiger.eps vasarely.ps waterfal.ps \
+ ridt91.eps ;\
+- do $(INSTALL_DATA) $(PSEXDIR)/$$f $(install_prefix)$(exdir) ;\
++ do $(INSTALL_DATA) $(PSEXDIR)/$$f $(DESTDIR)$(exdir) ;\
+ done
+
+ install-shared: $(GS_SHARED_OBJS)
+- -mkdir -p $(gssharedir)
++ -mkdir -p $(DESTDIR)$(gssharedir)
+ $(SH) -c 'echo $(GS_SHARED_OBJS) | while read obj ; do \
+- test -z $$obj || $(INSTALL_PROGRAM) $$obj $(gssharedir)/; done'
++ test -z $$obj || $(INSTALL_PROGRAM) $$obj $(DESTDIR)$(gssharedir)/; done'
diff --git a/app-text/ghostscript-esp/ghostscript-esp-8.15.1.ebuild b/app-text/ghostscript-esp/ghostscript-esp-8.15.1.ebuild
new file mode 100644
index 000000000000..9ddb8586cfc6
--- /dev/null
+++ b/app-text/ghostscript-esp/ghostscript-esp-8.15.1.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-esp/ghostscript-esp-8.15.1.ebuild,v 1.1 2006/01/05 02:04:56 metalgod Exp $
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="ESP Ghostscript -- an enhanced version of GNU Ghostscript with better printer support"
+HOMEPAGE="http://www.cups.org/ghostscript.php"
+
+SRC_URI="http://ftp.easysw.com/pub/ghostscript/${PV}/espgs-${PV}-source.tar.bz2
+ cjk? ( http://www.matsusaka-u.ac.jp/mirror/gs-cjk/adobe-cmaps-200204.tar.gz
+ http://www.matsusaka-u.ac.jp/mirror/gs-cjk/acro5-cmaps-2001.tar.gz )"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="X cups cjk emacs gtk"
+
+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 virtual/x11 ) )
+ gtk? ( >=x11-libs/gtk+-2.0 )
+ cups? ( >=net-print/cups-1.1.20 )
+ omni? ( dev-libs/libxml2 )
+ !virtual/ghostscript"
+
+RDEPEND="${DEP}
+ cjk? ( media-fonts/arphicfonts
+ media-fonts/kochi-substitute
+ media-fonts/baekmuk-fonts )
+ media-fonts/gnu-gs-fonts-std"
+
+DEPEND="${DEP}
+ gtk? ( dev-util/pkgconfig )"
+
+# media-libs/fontconfig"
+
+PROVIDE="virtual/ghostscript"
+
+S=${WORKDIR}/espgs-8.15.1
+
+src_unpack() {
+
+ unpack ${A}
+
+ cd ${S}
+
+ append-flags "-fPIC"
+
+ epatch ${FILESDIR}/gs-${PV}destdir.patch
+ epatch ${FILESDIR}/ghostscript-build.patch
+ if use gtk;then
+ epatch ${FILESDIR}/ghostscript-gtk2.patch
+ fi
+ epatch ${FILESDIR}/ghostscript-scripts.patch
+ epatch ${FILESDIR}/ghostscript-ps2epsi.patch
+ epatch ${FILESDIR}/ghostscript-badc.patch
+ epatch ${FILESDIR}/ghostscript-pagesize.patch
+ epatch ${FILESDIR}/ghostscript-noopt.patch
+ epatch ${FILESDIR}/ghostscript-use-external-freetype.patch
+ epatch ${FILESDIR}/ghostscript-split-font-configuration.patch
+
+ # search path fix
+ sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/8.15/$(get_libdir):"\
+ Makefile.in || die "sed failed"
+ sed -i -e 's:$(gsdir)/fonts:/usr/share/fonts/default/ghostscript/:' \
+ Makefile.in || die "sed failed"
+ # Add -fPIC to build with AMD64
+ sed -i -e 's/CFLAGS=$(GCFLAGS) $(XCFLAGS) $(ACDEFS)/CFLAGS=$(GCFLAGS) $(XCFLAGS) $(ACDEFS) -fPIC/g' src/unix-gcc.mak || die
+}
+
+src_compile() {
+ local myconf
+ myconf="--with-ijs --without-gimp-print"
+ use gtk && myconf="${myconf} --with-omni" || myconf="${myconf} --without-omni"
+
+ # gs -DPARANOIDSAFER out.ps
+ myconf="${myconf} --with-fontconfig --with-fontpath=/usr/share/fonts:/usr/share/fonts/ttf/zh_TW:/usr/share/fonts/ttf/zh_CN:/usr/share/fonts/arphicfonts:/usr/share/fonts/ttf/korean/baekmuk:/usr/share/fonts/baekmuk-fonts:/usr/X11R6/lib/X11/fonts/truetype:/usr/share/fonts/kochi-substitute"
+
+ use X && myconf="${myconf} --with-x" \
+ || myconf="${myconf} --without-x"
+
+ use cups && myconf="${myconf} --enable-cups" \
+ || myconf="${myconf} --disable-cups"
+
+ eautoreconf
+ econf ${myconf} || die "econf failed"
+ emake -j1 || die "make failed"
+ emake so -j1 || die "make failed"
+
+ cd ijs
+ econf || die "econf failed"
+ emake -j1 || die "make failed"
+ cd ..
+}
+
+src_install() {
+
+# dodir /usr/share/ghostscript
+ make DESTDIR="${D}" install || die "make install failed"
+ make DESTDIR="${D}" soinstall || die "make install failed"
+
+ rm -fr ${D}/usr/share/ghostscript/8.15/doc || die
+ dodoc doc/README doc/COPYING doc/COPYING.LGPL
+ dohtml doc/*.html doc/*.htm
+
+ if use emacs; then
+ insinto /usr/share/emacs/site-lisp
+ doins doc/gsdoc.el
+ fi
+
+ if use cjk ; then
+ dodir /usr/share/ghostscript/Resource
+ dodir /usr/share/ghostscript/Resource/Font
+ dodir /usr/share/ghostscript/Resource/CIDFont
+ cd ${D}/usr/share/ghostscript/Resource
+ unpack adobe-cmaps-200204.tar.gz
+ unpack acro5-cmaps-2001.tar.gz
+ fi
+
+ # Install ijs
+ cd ${S}/ijs
+ dodir /usr/bin /usr/include /usr/$(get_libdir)
+ # This is broken - there are not even a 'install_prefix'
+ # anywhere in ${S}/ijs ...
+ einstall install_prefix=${D}
+ einstall
+ dosed "s:^prefix=.*:prefix=/usr:" /usr/bin/ijs-config
+ make DESTDIR="${D}" install || die
+
+ # bug #83876, collision with gcc
+ rm -f ${D}/usr/share/man/de/man1/ansi2knr.1
+ rm -f ${D}/usr/share/man/man1/ansi2knr.1
+}