ChangeLog

# ChangeLog for app-text/ghostscript-gpl
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ChangeLog,v 1.53 2008/08/14 20:59:36 tgurr Exp $

14 Aug 2008; Timo Gurr ghostscript-gpl-8.63.ebuild:
Use upstream patch for the cairo automagic.

*ghostscript-gpl-8.63 (08 Aug 2008)

08 Aug 2008; Timo Gurr -ghostscript-gpl-8.61-r2.ebuild,
-ghostscript-gpl-8.61-r3.ebuild, +ghostscript-gpl-8.63.ebuild:
Version bump. Remove old.

07 Jun 2008; Raúl Porcel
ghostscript-gpl-8.62.ebuild:
ia64/sparc stable wrt #224531

07 Jun 2008; nixnut ghostscript-gpl-8.62.ebuild:
Stable on ppc wrt bug 224531

05 Jun 2008; Tobias Klausmann
ghostscript-gpl-8.62.ebuild:
Stable on alpha, bug #224531

04 Jun 2008; Dawid Węgliński
ghostscript-gpl-8.62.ebuild:
Stable on x86/amd64 (bug #224531)

04 Jun 2008; Markus Rothe
ghostscript-gpl-8.62.ebuild:
Stable on ppc64; bug #224531

02 Jun 2008; Jeroen Roovers ghostscript-gpl-8.62.ebuild:
Stable for HPPA (bug #224531).

*ghostscript-gpl-8.62 (04 Mar 2008)

04 Mar 2008; Timo Gurr +ghostscript-gpl-8.62.ebuild:
Add ghostscript-gpl-8.62.ebuild, remove patches which got fixed upstream.
Reintroduce jasper dependency and make ghostscript use the system jasper,
thanks for the patch goes to Fedora.

01 Mar 2008; Raúl Porcel
ghostscript-gpl-8.61-r3.ebuild:
alpha/ia64 stable wrt #208999

*ghostscript-gpl-8.61-r3 (29 Feb 2008)

29 Feb 2008; +ghostscript-gpl-8.61-r3.ebuild:
Fixed security issue (CVE-2008-0411), bug #208999, thank Robert Buchholz for
report and coordination.

15 Feb 2008; Timo Gurr
-files/ghostscript-esp-8.15.2-FAPIcidfmap.cjk,
-files/ghostscript-esp-8.15.2-cidfmap.cjk,
-files/ghostscript-afpl-8.54-big-cmap-post.patch,
-files/ghostscript-afpl-8.54-cups-destdir.diff,
-files/ghostscript-afpl-8.54-cups-lib.patch,
-files/ghostscript-afpl-8.54-destdir.diff,
-files/ghostscript-afpl-8.54-gtk2.patch,
-files/ghostscript-afpl-8.54-ps2epsi-afpl.diff,
-files/ghostscript-afpl-8.54-rinkj.patch,
-files/ghostscript-afpl-8.54-segfault.patch,
-files/ghostscript-afpl-8.57-cups-lib.patch,
-files/ghostscript-8.60-fPIC.patch,
-files/ghostscript-8.60-ijs-krgb.patch,
-files/ghostscript-8.60-include.patch,
-files/ghostscript-8.60-multilib.patch,
-files/ghostscript-8.60-noopt.patch,
-files/ghostscript-8.60-scripts.patch, -files/djvu-gs-gpl-8.60.patch,
-files/ghostscript-CVE-2007-2721.patch, -files/djvu-gs-gpl.patch,
-files/gdevcups.patch, -files/gdevhl12-hl1250.mak:
Clean out old ghostscript-gpl patches, everything has been moved into a
patch tarball.

*ghostscript-gpl-8.61-r2 (15 Feb 2008)

15 Feb 2008; Timo Gurr +ghostscript-gpl-8.61-r2.ebuild:
Add ghostscript-gpl-8.61-r2.ebuild, fixes bug #197993, partially fixes bug
#206893. Bumped to the latest hpijs patch and also include a fix for
upstream bug #689577.

23 Jan 2008; Christian Faulhammer
-ghostscript-gpl-8.54.ebuild, -ghostscript-gpl-8.54-r1.ebuild,
-ghostscript-gpl-8.57-r1.ebuild, -ghostscript-gpl-8.60-r1.ebuild,
ghostscript-gpl-8.61-r1.ebuild:
clean up and readd sparc-fbsd

23 Jan 2008; Christian Faulhammer
ghostscript-gpl-8.61-r1.ebuild:
stable amd64, bug 202217

08 Jan 2008; Jeroen Roovers
ghostscript-gpl-8.61-r1.ebuild:
Stable for HPPA (bug #202217).

08 Jan 2008; Raúl Porcel
ghostscript-gpl-8.61-r1.ebuild:
alpha/ia64/sparc stable wrt #202217

03 Jan 2008; Brent Baude
ghostscript-gpl-8.61-r1.ebuild:
Marking ghostscript-gpl-8.61-r1 ppc64 for bug 202217

03 Jan 2008; Brent Baude
ghostscript-gpl-8.61-r1.ebuild:
Marking ghostscript-gpl-8.61-r1 ppc for bug 202217

03 Jan 2008; Christian Faulhammer
ghostscript-gpl-8.61-r1.ebuild:
stable x86, bug 202217

*ghostscript-gpl-8.61-r1 (03 Dec 2007)

03 Dec 2007; Timo Gurr -ghostscript-gpl-8.61.ebuild,
+ghostscript-gpl-8.61-r1.ebuild:
Add ghostscript-gpl-8.61-r1.ebuild, fixes bug #200906.

*ghostscript-gpl-8.61 (30 Nov 2007)

30 Nov 2007; Timo Gurr -ghostscript-gpl-8.60.ebuild,
+ghostscript-gpl-8.61.ebuild:
Add ghostscript-gpl-8.61.ebuild, fixes bug #200383. Remove a vulnerable 8.60
version.

10 Nov 2007; Markus Rothe
ghostscript-gpl-8.60-r1.ebuild:
Stable on ppc64; bug #197346

06 Nov 2007; Chris Gianelloni
ghostscript-gpl-8.60-r1.ebuild:
Stable on amd64 wrt bug #196860.

06 Nov 2007; Markus Rothe
ghostscript-gpl-8.60-r1.ebuild:
Added ~ppc64; bug #197346

05 Nov 2007; Tobias Scherbaum
ghostscript-gpl-8.60-r1.ebuild:
ppc stable, bug #196860

05 Nov 2007; Jeroen Roovers
ghostscript-gpl-8.60-r1.ebuild:
Stable for HPPA (bug #196860).

04 Nov 2007; Markus Meier
ghostscript-gpl-8.60-r1.ebuild:
x86 stable, security bug #196860

03 Nov 2007; Raúl Porcel
ghostscript-gpl-8.60-r1.ebuild:
alpha/ia64 stable wrt #197346

03 Nov 2007; Ferris McCormick
ghostscript-gpl-8.60-r1.ebuild:
Sparc stable --- security Bug #196860 --- no problems seen

02 Nov 2007; Lars Weiler ghostscript-gpl-8.60.ebuild:
stable ppc, bug #197346

*ghostscript-gpl-8.60-r1 (02 Nov 2007)
*ghostscript-gpl-8.57-r1 (02 Nov 2007)
*ghostscript-gpl-8.54-r1 (02 Nov 2007)

02 Nov 2007; Timo Gurr
+files/ghostscript-CVE-2007-2721.patch, +ghostscript-gpl-8.54-r1.ebuild,
-ghostscript-gpl-8.57.ebuild, +ghostscript-gpl-8.57-r1.ebuild,
+ghostscript-gpl-8.60-r1.ebuild:
Revbump adding the patch to fix CVE-2007-2721 in all available versions, see
bug #196860. Also fix bug #197818, thanks Sven for reporting.

01 Nov 2007; Christian Faulhammer
ghostscript-gpl-8.60.ebuild:
stable x86, bug 197346

31 Oct 2007; Jeroen Roovers ghostscript-gpl-8.60.ebuild:
Stable for HPPA (bug #197346).

29 Oct 2007; Daniel Gryniewicz
ghostscript-gpl-8.60.ebuild:
Marked stable on amd64 for bug #197346

29 Oct 2007; Ferris McCormick
ghostscript-gpl-8.60.ebuild:
Sparc stable --- Bug #197346 --- has been good for quite some time.

23 Oct 2007; Timo Gurr
files/ghostscript-8.60-include.patch, ghostscript-gpl-8.60.ebuild:
Add missing fontconfig dependency and fix bug #196289 with a corrected
upstream patch, thanks Sebastian for reporting.

19 Oct 2007; Timo Gurr
+files/ghostscript-8.60-include.patch, ghostscript-gpl-8.60.ebuild:
Ebuild cleanup, added missing dependency and fix bug #196289.

*ghostscript-gpl-8.60 (17 Oct 2007)

17 Oct 2007; Timo Gurr
+files/ghostscript-8.60-fPIC.patch,
+files/ghostscript-8.60-ijs-krgb.patch,
+files/ghostscript-8.60-multilib.patch,
+files/ghostscript-8.60-noopt.patch,
+files/ghostscript-8.60-scripts.patch, +files/djvu-gs-gpl-8.60.patch,
+ghostscript-gpl-8.60.ebuild:
Add ghostscript-gpl-8.60, first release with ghostscript-esp merged. Fixes
bug #187502.

15 Aug 2007; Ferris McCormick ChangeLog:
That's Bug #187280 we need the ~sparc keyword for, of course. This cures it.

15 Aug 2007; Ferris McCormick
ghostscript-gpl-8.57.ebuild:
Add ~sparc keyword. Builds as expected, gv works, and this also fixes Bug
#187502 --- needed in preparation of retiring ghostscript-esp.

13 Jul 2007; Roy Marples
ghostscript-gpl-8.57.ebuild:
Keyworded ~sparc-fbsd

04 Jul 2007; Stefan Schweizer
ghostscript-gpl-8.54.ebuild, ghostscript-gpl-8.57.ebuild:
Drop emacs support thanks opfer in bug 184167

*ghostscript-gpl-8.57 (12 Jun 2007)

12 Jun 2007; Stefan Schweizer
+files/ghostscript-afpl-8.57-cups-lib.patch, +ghostscript-gpl-8.57.ebuild:
Version bump thanks to jakub, hkbst and Timo Gurr , 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
+files/djvu-gs-gpl.patch, ghostscript-gpl-8.54.ebuild:
Add hacked up djvu fix for -gpl for bug 158079

12 Dec 2006; Stefan Schweizer
ghostscript-gpl-8.54.ebuild:
Add djvu support, fix emake -j1 bug 147998 for phreak

04 Nov 2006; Stefan Schweizer
ghostscript-gpl-8.54.ebuild:
Add missing libXext dep thanks to jkt in bug 153976

22 Sep 2006; Stefan Schweizer
ghostscript-gpl-8.54.ebuild:
automake fixes #148368.

14 Sep 2006; Stefan Schweizer
ghostscript-gpl-8.54.ebuild:
properly fix bug 142802 thanks to Nick Cunningham and
pylon in bug 145985

02 Sep 2006; Diego Pettenò
ghostscript-gpl-8.54.ebuild:
Add ~x86-fbsd keyword, fixing deptree for virtual/ghostscript.

30 Aug 2006; Stefan Schweizer
ghostscript-gpl-8.54.ebuild:
add STDDIRS to make targets to fix parallel build issues thanks to Bruno
Roggeri in bug 142802

*ghostscript-gpl-8.54 (27 Jun 2006)

27 Jun 2006; Stefan Schweizer
+files/ghostscript-esp-8.15.2-FAPIcidfmap.cjk,
+files/ghostscript-esp-8.15.2-cidfmap.cjk,
+files/ghostscript-afpl-8.54-big-cmap-post.patch,
+files/ghostscript-afpl-8.54-cups-destdir.diff,
+files/ghostscript-afpl-8.54-cups-lib.patch,
+files/ghostscript-afpl-8.54-destdir.diff,
+files/ghostscript-afpl-8.54-gtk2.patch,
+files/ghostscript-afpl-8.54-ps2epsi-afpl.diff,
+files/ghostscript-afpl-8.54-rinkj.patch,
+files/ghostscript-afpl-8.54-segfault.patch, +files/gdevcups.patch,
+files/gdevhl12-hl1250.mak, +metadata.xml, +ghostscript-gpl-8.54.ebuild:
Move ghostscript-afpl to ghostscript-gpl and change the license, thanks to
Ernst Rohlicek in bug 137289

Manifest

DIST acro5-cmaps-2001.tar.gz 631653 RMD160 c723afc2207157a434988b46bcf0a458281c29a4 SHA1 fbc8715eae880f59e2251ae8fa99f79fbcfbd3e5 SHA256 80abec481fd4b5e59ac3d3f5790542dbfabe3c9269a6ac17064160d6dab38ee4
DIST adobe-cmaps-200406.tar.gz 5001983 RMD160 284b943b3476f6f7e2bc49842fd027c6f7f57552 SHA1 b846292af4541d907dd9041e397c2f1d8c72a056 SHA256 0f397255506cda4b20e362ab5e3f6cdacba09e0a0cca7f4d93afd980977c5689
DIST ghostscript-8.61.tar.bz2 13244754 RMD160 ec217b05f62f2f268a72c073f85aa95ee6f6c2aa SHA1 b05ac61885c0370e432531ffb79de349c6e8b896 SHA256 8c3f62da38688c02442f9b94ac42c6ecefb01141c8319393e8216d8422f7aa33
DIST ghostscript-8.62.tar.bz2 15063641 RMD160 6f129fc679f4532729c07c018e82d162343f95ba SHA1 a254a3bc4ca824ac90624090d175d17c0a22fed1 SHA256 09671c76237c7b1df905697d30278a4f2cb9da238f9659f8fd1e8b2ae43ace4d
DIST ghostscript-8.63.tar.bz2 15017410 RMD160 817d5c1539d88be979c42f67a9246f690328da33 SHA1 c97159d3cccb0b1b5fc409715c6321a7256717ec SHA256 0801ec174fa8ee67679c9ae42af547f5cbc2cc98faab6268187f69c22b86b0a1
DIST ghostscript-gpl-8.61-patchset-1.tar.bz2 9620 RMD160 b7464977dfabeab461439abb93ad38856a7bc27e SHA1 2e3f246d4da0956c712be4312319606cdd45593f SHA256 f2112bcf6e837f47c035646238d255f683e54b2ee6227afe7cef2d0a8ea2705c
DIST ghostscript-gpl-8.62-patchset-1.tar.bz2 3916 RMD160 54bf5a8ec0d7dd0d52132d448ad11096c50cf86f SHA1 fb6920bf1efcfb23f1264995429c62d6195501e1 SHA256 5dead8f52cff53bb8e7793742e5d18bad78d9a1f100b9588d2825ee953df9971
DIST ghostscript-gpl-8.63-patchset-2.tar.bz2 4134 RMD160 a64e327392188b4e9cdfb7c94cbc6dc82f792c28 SHA1 08d2f279bdebe03c1889cd0b7998f4514248bef6 SHA256 dc7a4033e887109a334307bb886bed0366b649a26a308a7ae79d43c55c59a618
DIST gsdjvu-1.3.tar.gz 204330 RMD160 a6d2326ba9098e801000b957ab5508e998e17be8 SHA1 67fcbd72ae229ff68a5d0cc482d4179e3957df61 SHA256 7702fd287cd881a8b1e7911f780c10f98e332b3a6cd93dd35b245d5816b09ca2
EBUILD ghostscript-gpl-8.61-r1.ebuild 4624 RMD160 32519488a9ecdd93f2bf9796dbdfbb231cbb1488 SHA1 3bd38d98d24fea12a3d4bbdbc10d179313525658 SHA256 653c96b1efc62aee3621f170ec86c03a6dd433985b7f31a244c92690e72ed699
EBUILD ghostscript-gpl-8.62.ebuild 4854 RMD160 311126b2cafb44fab2b6a2e79ba4e427fc3deb98 SHA1 f1c0635aa1b7394d666321833d53ccfc7910808f SHA256 fd5e48752ffd92db9d7150b802c9f43225303f526a0acc007c988b7977a11706
EBUILD ghostscript-gpl-8.63.ebuild 5032 RMD160 580929ef498c2405d0a332951fa0039d180b17df SHA1 881d3965e9c3f717499a3fc025ee25f3b8758ce1 SHA256 2620098705f75f98e9264e8879e27852f0c79648ad1dd4c621672dfb79d18ecd
MISC ChangeLog 11330 RMD160 5e1ddd3aa79c02f1d8175641a7d8cc8a7ba46549 SHA1 0243b0f72d99219c599f414b1591057bfd8b4bde SHA256 724b56e8ae1a8ed0fbc6be6927b3d01dacee103f99d48007c8eec9c00e86d473
MISC metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 SHA1 209c6a46e4cdd891980115e42ba419e3799f8088 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76

ghostscript-gpl-8.61-r1.ebuild

# Copyright 1999-2008 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.61-r1.ebuild,v 1.9 2008/01/23 22:33:42 opfer Exp $

inherit autotools elisp-common eutils versionator flag-o-matic

DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
HOMEPAGE="http://ghostscript.com/"

MY_P=${P/-gpl}
GSDJVU_PV=1.3
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 ) )
mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
mirror://gentoo/${P}-patchset-1.tar.bz2"

LICENSE="GPL-2 CPL-1.0"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE="bindist cjk cups djvu gtk jpeg2k X"

COMMON_DEPEND="media-libs/fontconfig
>=media-libs/jpeg-6b
>=media-libs/libpng-1.2.5
>=media-libs/tiff-3.7
>=sys-libs/zlib-1.1.4
!bindist? ( djvu? ( app-text/djvu ) )
cups? ( >=net-print/cups-1.1.20 )
gtk? ( >=x11-libs/gtk+-2.0 )
jpeg2k? ( media-libs/jasper )
X? ( x11-libs/libXt x11-libs/libXext )
!app-text/ghostscript-esp
!app-text/ghostscript-gnu"

DEPEND="${COMMON_DEPEND}
dev-util/pkgconfig"

RDEPEND="${COMMON_DEPEND}
cjk? ( media-fonts/arphicfonts
media-fonts/kochi-substitute
media-fonts/baekmuk-fonts )
media-fonts/gnu-gs-fonts-std"

S="${WORKDIR}/${MY_P}"

src_unpack() {
unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
if use cjk ; then
cat "${WORKDIR}/patches/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
cat "${WORKDIR}/patches/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

cd "${S}"

# Fedora patches
# upstream bug http://bugs.ghostscript.com/show_bug.cgi?id=689393
epatch "${WORKDIR}/patches/${PN}-8.61-ijs-krgb.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-fPIC.patch"
epatch "${WORKDIR}/patches/${PN}-8.61-multilib.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-noopt.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-scripts.patch"

# additional Gentoo patches, compilation fixes
epatch "${WORKDIR}/patches/${PN}-8.61-rinkj.patch"

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 "${WORKDIR}/patches/${PN}-8.61-gsdjvu-1.3.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"

# install ps2utf8.ps, bug #197818
sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/src/unixinst.mak" \
|| die "sed failed"
fi

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"

cd "${S}"
eautoreconf

cd "${S}/ijs"
eautoreconf
}

src_compile() {
econf \
$(use_enable cups) \
$(use_enable gtk) \
$(use_with jpeg2k jasper) \
$(use_with X x) \
--enable-dynamic \
--enable-fontconfig \
--with-drivers=ALL,rinkj \
--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
fi

emake -j1 so all || die "emake failed"

cd "${S}/ijs"
econf || die "ijs econf failed"
emake || die "ijs emake failed"
}

src_install() {
emake DESTDIR="${D}" install-so install || die "emake install failed"

if ! use bindist && use djvu ; then
dobin gsdjvu || die "dobin gsdjvu install failed"
fi

rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
dodoc doc/README || die "dodoc install failed"

cd "${S}/ijs"
emake DESTDIR="${D}" install || die "emake ijs install failed"
}

ghostscript-gpl-8.62.ebuild

# Copyright 1999-2008 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.62.ebuild,v 1.7 2008/06/07 19:37:09 armin76 Exp $

inherit autotools elisp-common eutils versionator flag-o-matic

DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
HOMEPAGE="http://ghostscript.com/"

MY_P=${P/-gpl}
GSDJVU_PV=1.3
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 ) )
mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
mirror://gentoo/${P}-patchset-1.tar.bz2"

LICENSE="GPL-2 CPL-1.0"
SLOT="0"
KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd"
IUSE="bindist cjk cups djvu gtk jpeg2k X"

COMMON_DEPEND="media-libs/fontconfig
>=media-libs/jpeg-6b
>=media-libs/libpng-1.2.5
>=media-libs/tiff-3.7
>=sys-libs/zlib-1.1.4
!bindist? ( djvu? ( app-text/djvu ) )
cups? ( >=net-print/cups-1.1.20 )
gtk? ( >=x11-libs/gtk+-2.0 )
jpeg2k? ( media-libs/jasper )
X? ( x11-libs/libXt x11-libs/libXext )
!app-text/ghostscript-esp
!app-text/ghostscript-gnu"

DEPEND="${COMMON_DEPEND}
dev-util/pkgconfig"

RDEPEND="${COMMON_DEPEND}
cjk? ( media-fonts/arphicfonts
media-fonts/kochi-substitute
media-fonts/baekmuk-fonts )
media-fonts/gnu-gs-fonts-std"

S="${WORKDIR}/${MY_P}"

src_unpack() {
unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
if use cjk ; then
cat "${WORKDIR}/patches/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
cat "${WORKDIR}/patches/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

cd "${S}"

# remove internal copies of expat, jasper, jpeg and libpng
rm -rf "${S}/expat"
rm -rf "${S}/jasper"
rm -rf "${S}/jpeg"
rm -rf "${S}/libpng"
# remove internal urw-fonts
rm -rf "${S}/Resource/Font"

# Fedora patches
# upstream bug http://bugs.ghostscript.com/show_bug.cgi?id=689393
epatch "${WORKDIR}/patches/${PN}-8.60-fPIC.patch"
epatch "${WORKDIR}/patches/${PN}-8.61-multilib.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-noopt.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-scripts.patch"
epatch "${WORKDIR}/patches/${PN}-8.62-system-jasper.patch"

# additional Gentoo patch, compile fix
epatch "${WORKDIR}/patches/${PN}-8.61-rinkj.patch"

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 "${WORKDIR}/patches/${PN}-8.61-gsdjvu-1.3.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"

# install ps2utf8.ps, bug #197818
sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/src/unixinst.mak" \
|| die "sed failed"
fi

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"

cd "${S}"
eautoreconf

cd "${S}/ijs"
eautoreconf
}

src_compile() {
econf \
$(use_enable cups) \
$(use_enable gtk) \
$(use_with jpeg2k jasper) \
$(use_with X x) \
--disable-compile-inits \
--enable-dynamic \
--enable-fontconfig \
--with-drivers=ALL,rinkj \
--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
fi

emake -j1 so all || die "emake failed"

cd "${S}/ijs"
econf || die "ijs econf failed"
emake || die "ijs emake failed"
}

src_install() {
emake DESTDIR="${D}" install-so install || die "emake install failed"

if ! use bindist && use djvu ; then
dobin gsdjvu || die "dobin gsdjvu install failed"
fi

rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
dodoc doc/README || die "dodoc install failed"

cd "${S}/ijs"
emake DESTDIR="${D}" install || die "emake ijs install failed"
}

ghostscript-gpl-8.63.ebuild

# Copyright 1999-2008 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.63.ebuild,v 1.2 2008/08/14 20:59:36 tgurr Exp $

inherit autotools elisp-common eutils versionator flag-o-matic

DESCRIPTION="GPL Ghostscript - the most current Ghostscript, AFPL, relicensed"
HOMEPAGE="http://ghostscript.com/"

MY_P=${P/-gpl}
GSDJVU_PV=1.3
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 ) )
mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
mirror://gentoo/${P}-patchset-2.tar.bz2"

LICENSE="GPL-2 CPL-1.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
IUSE="bindist cairo cjk cups djvu gtk jpeg2k X"

COMMON_DEPEND="media-libs/fontconfig
>=media-libs/jpeg-6b
>=media-libs/libpng-1.2.5
>=media-libs/tiff-3.7
>=sys-libs/zlib-1.1.4
!bindist? ( djvu? ( app-text/djvu ) )
cairo? ( x11-libs/cairo )
cups? ( >=net-print/cups-1.1.20 )
gtk? ( >=x11-libs/gtk+-2.0 )
jpeg2k? ( media-libs/jasper )
X? ( x11-libs/libXt x11-libs/libXext )
!app-text/ghostscript-esp
!app-text/ghostscript-gnu"

DEPEND="${COMMON_DEPEND}
dev-util/pkgconfig"

RDEPEND="${COMMON_DEPEND}
cjk? ( media-fonts/arphicfonts
media-fonts/kochi-substitute
media-fonts/baekmuk-fonts )
media-fonts/gnu-gs-fonts-std"

S="${WORKDIR}/${MY_P}"

src_unpack() {
unpack ${A/adobe-cmaps-200406.tar.gz acro5-cmaps-2001.tar.gz}
if use cjk ; then
cat "${WORKDIR}/patches/ghostscript-esp-8.15.2-cidfmap.cjk" >> "${S}/lib/cidfmap"
cat "${WORKDIR}/patches/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

cd "${S}"

# remove internal copies of expat, jasper, jpeg, libpng and zlib
rm -rf "${S}/expat"
rm -rf "${S}/jasper"
rm -rf "${S}/jpeg"
rm -rf "${S}/libpng"
rm -rf "${S}/zlib"
# remove internal urw-fonts
rm -rf "${S}/Resource/Font"

# Fedora patches
# http://cvs.fedora.redhat.com/viewcvs/devel/ghostscript/
epatch "${WORKDIR}/patches/${PN}-8.60-fPIC.patch"
epatch "${WORKDIR}/patches/${PN}-8.61-multilib.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-noopt.patch"
epatch "${WORKDIR}/patches/${PN}-8.60-scripts.patch"
epatch "${WORKDIR}/patches/${PN}-8.62-system-jasper.patch"
epatch "${WORKDIR}/patches/${PN}-8.62-pksmraw.patch"

# Gentoo patches
# Upstream bug #689999, already fixed in ghostscript trunk.
epatch "${WORKDIR}/patches/${PN}-8.63-cairo-automagic.patch"

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 "${WORKDIR}/patches/${PN}-8.61-gsdjvu-1.3.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"

# install ps2utf8.ps, bug #197818
sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/src/unixinst.mak" \
|| die "sed failed"
fi

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"

cd "${S}"
eautoreconf

cd "${S}/ijs"
eautoreconf
}

src_compile() {
econf \
$(use_enable cairo) \
$(use_enable cups) \
$(use_enable gtk) \
$(use_with jpeg2k jasper) \
$(use_with X x) \
--disable-compile-inits \
--enable-dynamic \
--enable-fontconfig \
--with-drivers=ALL \
--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
fi

emake -j1 so all || die "emake failed"

cd "${S}/ijs"
econf || die "ijs econf failed"
emake || die "ijs emake failed"
}

src_install() {
emake DESTDIR="${D}" install-so install || die "emake install failed"

if ! use bindist && use djvu ; then
dobin gsdjvu || die "dobin gsdjvu install failed"
fi

rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
dodoc doc/README || die "dodoc install failed"

cd "${S}/ijs"
emake DESTDIR="${D}" install || die "emake ijs install failed"
}

metadata.xml




printing