summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2011-11-03 15:34:30 +0100
committerSven Eden <sven.eden@gmx.de>2011-11-03 15:34:30 +0100
commited44a853d04cfb7132c19cdd941d8959849d1637 (patch)
tree494f6d6854be3f05a51904296d73f3b8f19e1740 /app-text
parentPatched and added ebuilds for swt-3.7.1 and eclipse-sdk-3.7.1 (diff)
downloadseden-ed44a853d04cfb7132c19cdd941d8959849d1637.tar.gz
seden-ed44a853d04cfb7132c19cdd941d8959849d1637.tar.bz2
seden-ed44a853d04cfb7132c19cdd941d8959849d1637.zip
Added ghostscript-9.04-r5.ebuild with a patch from bugs.ghostscript.com
to fix an issue with PDF/A generation
Diffstat (limited to 'app-text')
-rw-r--r--app-text/ghostscript-gpl/ChangeLog9
-rw-r--r--app-text/ghostscript-gpl/Manifest7
-rw-r--r--app-text/ghostscript-gpl/files/gs9.04-fix-invalid-uuid-generation.patch29
-rw-r--r--app-text/ghostscript-gpl/ghostscript-gpl-9.04-r5.ebuild213
-rw-r--r--app-text/ghostscript-gpl/metadata.xml8
5 files changed, 266 insertions, 0 deletions
diff --git a/app-text/ghostscript-gpl/ChangeLog b/app-text/ghostscript-gpl/ChangeLog
new file mode 100644
index 0000000..d609d9c
--- /dev/null
+++ b/app-text/ghostscript-gpl/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for app-text/ghostscript
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*ghostscript-gpl-9.04-r5.ebuild (03 Nov 2011)
+
+ 03 Nov 2011; Sven Eden <sven.eden@gmx.de> +ghostscript-gpl-9.04-r5.ebuild :
+ Added a patch files/gs9.04-fix-invalid-uuid-generation.patch taken from
+ bugs.ghostscript.com to fix a PDF/A issue
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
new file mode 100644
index 0000000..779da14
--- /dev/null
+++ b/app-text/ghostscript-gpl/Manifest
@@ -0,0 +1,7 @@
+AUX gs9.04-fix-invalid-uuid-generation.patch 1443 RMD160 d8a91be84ec9f136a82d2524a680998bbe4110c5 SHA1 01f97353f796518bd658b779df4e1727fc61d46a SHA256 aef6b2abbf9e7732ec5c458c3f1e3b4e2c2aa69d3d7a0a2614d054cd1b0efb12
+DIST ghostscript-9.04.tar.bz2 29869900 RMD160 916bcacac247241fcf6ba02e90dc7e28040ba65e SHA1 df9c9e1924038da071d0ffbaddf42a75ecbc1e83 SHA256 f82c20b44ad3c204e2b78afbcd03a32dd523d26f5e18bf4508f3dfcbbfd30bc4
+DIST ghostscript-gpl-9.04-patchset-3.tar.bz2 7760 RMD160 43a38afd1e8de506db70a58d0fa3168dba3c3a6e SHA1 03b27dad2e4cbec045f2264885bf366526e2db00 SHA256 b3c20adc111b8ddf3bc7d60a01fa1b31eadb9d6d9eb8ac474d9aa1604bd51b6f
+DIST gsdjvu-1.5.tar.gz 207583 RMD160 010be2cd791d5e2814c1f6554150bfd7c34222c0 SHA1 c7d0677dae5fe644cf3d714c04b3c2c343906342 SHA256 d4f01d605ff086835005e79d5fcead2def8aafafc106e170dc5f2dc618593ab4
+EBUILD ghostscript-gpl-9.04-r5.ebuild 6181 RMD160 cd4bf849519a5467204a64e31a2f6c21cc10db51 SHA1 75d32124144e166f6a2f8b0fcc1085ae24429bcf SHA256 eba5428a50e225697a287281d47fd411a4390191918b749dd8df5a09820240d3
+MISC ChangeLog 364 RMD160 b81dfe436ee868d19643bc5f462b37a9ce5f56ba SHA1 3d81e2b0b437ed4954c7576ffbd475ba3b3041ad SHA256 677f3dfa9089c538058836f76652bf6b87cada89887fab4ca00dfc0601994b72
+MISC metadata.xml 284 RMD160 df1ccfc8195a57d367d5cb80ae86d4d95084234e SHA1 c6afd0be31143d4bab2720ac199d10cc1bafedef SHA256 48aa4ca7adac201df7ab07ee8d590d13aa5c6d8684487d2bbbf1433f268e90e1
diff --git a/app-text/ghostscript-gpl/files/gs9.04-fix-invalid-uuid-generation.patch b/app-text/ghostscript-gpl/files/gs9.04-fix-invalid-uuid-generation.patch
new file mode 100644
index 0000000..4927b57
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/gs9.04-fix-invalid-uuid-generation.patch
@@ -0,0 +1,29 @@
+--- a/gs/base/gdevpdfe.c
++++ b/gs/base/gdevpdfe.c
+@@ -485,7 +485,7 @@ static void writehex(char **p, ulong v, int l)
+ static void
+ pdf_make_uuid(const byte node[6], uint64_t uuid_time, ulong time_seq, char *buf, int buf_length)
+ {
+- char b[40], *p = b;
++ char b[45], *p = b;
+ ulong uuid_time_lo = (ulong)(uuid_time & 0xFFFFFFFF); /* MSVC 7.1.3088 */
+ ushort uuid_time_md = (ushort)((uuid_time >> 32) & 0xFFFF); /* cannot compile this */
+ ushort uuid_time_hi = (ushort)((uuid_time >> 48) & 0x0FFF); /* as function arguments. */
+@@ -521,7 +521,7 @@ pdf_make_instance_uuid(gx_device_pdf *pdev, const byte digest[6], char *buf, int
+ memcpy(buf+5, pdev->InstanceUUID.data, l);
+ buf[l] = 0;
+ } else
+- pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf, buf_length - 5);
++ pdf_make_uuid(digest, pdf_uuid_time(pdev), pdev->DocumentTimeSeq, buf+5, buf_length - 5);
+ return 0;
+ }
+
+@@ -549,7 +549,7 @@ static const char dd[]={'\'', '\357', '\273', '\277', '\'', 0};
+ static int
+ pdf_write_document_metadata(gx_device_pdf *pdev, const byte digest[6])
+ {
+- char instance_uuid[40], document_uuid[40], cre_date_time[40], mod_date_time[40], date_time_buf[40];
++ char instance_uuid[45], document_uuid[45], cre_date_time[40], mod_date_time[40], date_time_buf[40];
+ int cre_date_time_len, mod_date_time_len;
+ int code;
+ stream *s = pdev->strm;
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.04-r5.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.04-r5.ebuild
new file mode 100644
index 0000000..adf679c
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.04-r5.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/ghostscript-gpl-9.04-r4.ebuild,v 1.2 2011/10/31 06:07:23 armin76 Exp $
+
+EAPI=3
+inherit autotools eutils versionator flag-o-matic
+
+DESCRIPTION="Ghostscript is an interpreter for the PostScript language and for PDF"
+HOMEPAGE="http://ghostscript.com/"
+
+MY_P=${P/-gpl}
+GSDJVU_PV=1.5
+PVM=$(get_version_component_range 1-2)
+SRC_URI="!bindist? ( djvu? ( mirror://sourceforge/djvu/gsdjvu-${GSDJVU_PV}.tar.gz ) )
+ mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
+ mirror://gentoo/${P}-patchset-3.tar.bz2"
+
+LICENSE="GPL-3 CPL-1.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
+IUSE="bindist cups dbus djvu gtk idn jpeg2k static-libs X"
+
+COMMON_DEPEND="app-text/libpaper
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/lcms:0
+ >=media-libs/libpng-1.2.42
+ >=media-libs/tiff-3.9.2
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg
+ !bindist? ( djvu? ( app-text/djvu ) )
+ cups? ( >=net-print/cups-1.3.8 )
+ dbus? ( sys-apps/dbus )
+ gtk? ( x11-libs/gtk+:2 )
+ idn? ( net-dns/libidn )
+ jpeg2k? ( media-libs/jasper )
+ X? ( x11-libs/libXt x11-libs/libXext )"
+
+DEPEND="${COMMON_DEPEND}
+ dev-util/pkgconfig"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/poppler-data-0.4.4
+ >=media-fonts/urw-fonts-2.4.9
+ linguas_ja? ( media-fonts/kochi-substitute )
+ linguas_ko? ( media-fonts/baekmuk-fonts )
+ linguas_zh_CN? ( media-fonts/arphicfonts )
+ linguas_zh_TW? ( media-fonts/arphicfonts )"
+
+S="${WORKDIR}/${MY_P}"
+
+LANGS="ja ko zh_CN zh_TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} linguas_${X}"
+done
+
+pkg_setup() {
+ 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
+}
+
+src_prepare() {
+ # remove internal copies of various libraries
+ rm -rf "${S}"/expat
+ rm -rf "${S}"/freetype
+ rm -rf "${S}"/jasper
+ rm -rf "${S}"/jpeg
+ rm -rf "${S}"/lcms{,2}
+ rm -rf "${S}"/libpng
+ rm -rf "${S}"/tiff
+ rm -rf "${S}"/zlib
+ # remove internal urw-fonts
+ rm -rf "${S}"/Resource/Font
+ # remove internal CMaps (CMaps from poppler-data are used instead)
+ rm -rf "${S}"/Resource/CMap
+
+ # Add a patch from http://bugs.ghostscript.com, Bug #692422
+ epatch "${FILESDIR}/gs9.04-fix-invalid-uuid-generation.patch"
+
+ # apply various patches, many borrowed from Fedora
+ # http://pkgs.fedoraproject.org/gitweb/?p=ghostscript.git
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
+ EPATCH_SOURCE="${WORKDIR}/patches/"
+ epatch
+
+ 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}/base"
+ epatch "${WORKDIR}/patches-gsdjvu/gsdjvu-1.3-${PN}-8.64.patch"
+ cp gsdjvu-${GSDJVU_PV}/ps2utf8.ps "${S}/lib"
+ cp "${S}/base/contrib.mak" "${S}/base/contrib.mak.gsdjvu"
+ grep -q djvusep "${S}/base/contrib.mak" || \
+ cat gsdjvu-${GSDJVU_PV}/gsdjvu.mak >> "${S}/base/contrib.mak"
+
+ # install ps2utf8.ps, bug #197818
+ sed -i -e '/$(EXTRA_INIT_FILES)/ a\ps2utf8.ps \\' "${S}/base/unixinst.mak" \
+ || die "sed failed"
+ fi
+
+ if ! use gtk ; then
+ sed -i "s:\$(GSSOX)::" base/*.mak || die "gsx sed failed"
+ sed -i "s:.*\$(GSSOX_XENAME)$::" base/*.mak || die "gsxso sed failed"
+ fi
+
+ # search path fix
+ sed -i -e "s:\$\(gsdatadir\)/lib:/usr/share/ghostscript/${PVM}/$(get_libdir):" \
+ -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:" \
+ -e 's:-L$(BINDIR):$(LDFLAGS) &:g' \
+ base/Makefile.in base/*.mak || die "sed failed"
+
+ cd "${S}"
+ eautoreconf
+
+ cd "${S}/jbig2dec"
+ eautoreconf
+
+ cd "${S}/ijs"
+ eautoreconf
+}
+
+src_configure() {
+ local FONTPATH
+ for path in \
+ /usr/share/fonts/urw-fonts \
+ /usr/share/fonts/Type1 \
+ /usr/share/fonts \
+ /usr/share/poppler/cMap/Adobe-CNS1 \
+ /usr/share/poppler/cMap/Adobe-GB1 \
+ /usr/share/poppler/cMap/Adobe-Japan1 \
+ /usr/share/poppler/cMap/Adobe-Japan2 \
+ /usr/share/poppler/cMap/Adobe-Korea1
+ do
+ FONTPATH="$FONTPATH${FONTPATH:+:}$path"
+ done
+
+ econf \
+ --enable-dynamic \
+ --enable-freetype \
+ --enable-fontconfig \
+ --disable-compile-inits \
+ --with-drivers=ALL \
+ --with-fontpath="$FONTPATH" \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-libpaper \
+ --with-system-libtiff \
+ --without-luratech \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable gtk) \
+ $(use_with cups install-cups) \
+ $(use_with cups pdftoraster) \
+ $(use_with idn libidn) \
+ $(use_with jpeg2k jasper) \
+ $(use_with X x)
+
+ if ! use bindist && use djvu ; then
+ sed -i -e 's!$(DD)bbox.dev!& $(DD)djvumask.dev $(DD)djvusep.dev!g' Makefile
+ fi
+
+ cd "${S}/ijs"
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake -j1 so all || die "emake failed"
+
+ cd "${S}/ijs"
+ emake || die "ijs emake failed"
+}
+
+src_install() {
+ # -j1 -> see bug #356303
+ emake -j1 DESTDIR="${D}" install-so install || die "emake install failed"
+
+ # some printer drivers still require pstoraster, bug #383831
+ use cups && dosym /usr/libexec/cups/filter/gstoraster /usr/libexec/cups/filter/pstoraster
+
+ if ! use bindist && use djvu ; then
+ dobin gsdjvu || die "dobin gsdjvu install failed"
+ fi
+
+ # remove gsc in favor of gambit, bug #253064
+ rm -rf "${D}/usr/bin/gsc"
+
+ rm -rf "${D}/usr/share/doc/${PF}/html/"{README,PUBLIC}
+ dodoc doc/GS9_Color_Management.pdf || die "dodoc install failed"
+
+ cd "${S}/ijs"
+ emake DESTDIR="${D}" install || die "emake ijs install failed"
+
+ # rename the original cidfmap to cidfmap.GS
+ mv "${D}/usr/share/ghostscript/${PVM}/Resource/Init/cidfmap"{,.GS} || die
+
+ # install our own cidfmap to handle CJK fonts
+ insinto "/usr/share/ghostscript/${PVM}/Resource/Init"
+ doins "${WORKDIR}/fontmaps/CIDFnmap" || die "doins CIDFnmap failed"
+ doins "${WORKDIR}/fontmaps/cidfmap" || die "doins cidfmap failed"
+ for X in ${LANGS} ; do
+ if use linguas_${X} ; then
+ doins "${WORKDIR}/fontmaps/cidfmap.${X}" || die "doins cidfmap.${X} failed"
+ fi
+ done
+
+ use static-libs || find "${D}" -name '*.la' -delete
+}
diff --git a/app-text/ghostscript-gpl/metadata.xml b/app-text/ghostscript-gpl/metadata.xml
new file mode 100644
index 0000000..592b146
--- /dev/null
+++ b/app-text/ghostscript-gpl/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>printing</herd>
+ <use>
+ <flag name="bindist">Disable dejavu support for binary distribution because of licensing issue</flag>
+ </use>
+</pkgmetadata>