summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-text/ghostscript-gpl/Manifest2
-rw-r--r--app-text/ghostscript-gpl/ghostscript-gpl-9.06.ebuild191
2 files changed, 193 insertions, 0 deletions
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
new file mode 100644
index 000000000..613dddde4
--- /dev/null
+++ b/app-text/ghostscript-gpl/Manifest
@@ -0,0 +1,2 @@
+DIST ghostscript-9.06.tar.bz2 29246039 SHA256 05acd1b576899572ef8ecbc25637cf73cbd0be267e651732db3012db33088e04 SHA512 99f7a56316bf96d55c0cd7b07c0791ad4e6ee0d3a8f3bfa04ea28890ea9ed822ebcd7084cc8118cc38dc5def27c91c24eebc08a20a630463a9bf9d0193d0923b WHIRLPOOL a44e19c15440b3fa43233f05b3236ea6834a9f6ac2e7be5174685e6a377ad4a4e7a7cc58fa3df7072ed893d0d76e4bb83b0e890a2d8c45f496c753cb958c7b32
+DIST ghostscript_9.06~dfsg-2+deb8u4.debian.tar.xz 97044 SHA256 63ffe4addaba5429fcb85dd2a806cad87261d9b509962377f880214ad840968e SHA512 ac783d3f19be8814df7695e0edf72c5a68afee604fae83b058d2b822cfe195d3243385d0f8ffdbcf345225bf8f9aa54c57554b68a812ca9e6ef5983b9646f607 WHIRLPOOL a1dc28a6b0b0718cefcbdc3c8c6b07a650d155e1e1c5e262769514301db9902a98724468dae16210a64d753f9bba374f880a1e52d80376734eb63084f88ebbef
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.06.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.06.ebuild
new file mode 100644
index 000000000..54f74f761
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.06.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/ghostscript-gpl/Attic/ghostscript-gpl-9.06.ebuild,v 1.5 2013/08/27 14:58:36 kensington Exp $
+
+EAPI=4
+
+inherit autotools eutils multilib 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="
+ mirror://sourceforge/ghostscript/${MY_P}.tar.bz2
+ http://security.debian.org/debian-security/pool/updates/main/g/ghostscript/ghostscript_${PV}~dfsg-2+deb8u4.debian.tar.xz"
+
+LICENSE="GPL-3 CPL-1.0"
+SLOT="0"
+KEYWORDS="alpha arm ~mips ppc ppc64 sparc64 x86 x86_64"
+IUSE="+cups +dbus gtk idn +jpeg2k linguas_de static-libs +X"
+
+COMMON_DEPEND="
+ !app-text/ijs
+ app-text/libpaper
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.2:2
+ media-libs/jbig2dec
+ media-libs/lcms:2
+ media-libs/libpng:0
+ media-libs/tiff:0
+ >=sys-libs/zlib-1.2.3
+ virtual/jpeg:0
+ cups? ( >=net-print/cups-1.3.8 )
+ dbus? ( sys-apps/dbus )
+ gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
+ idn? ( net-dns/libidn )
+ jpeg2k? ( >=media-libs/openjpeg-1.5.0:0 )
+ X? ( x11-libs/libXt x11-libs/libXext )"
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/poppler-data-0.4.5-r1
+ >=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 )
+ !!media-fonts/gnu-gs-fonts-std
+ !!media-fonts/gnu-gs-fonts-other
+"
+
+S="${WORKDIR}/${MY_P}"
+
+LANGS="ja ko zh_CN zh_TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} linguas_${X}"
+done
+
+src_prepare() {
+ # remove internal copies of various libraries
+ rm -rf "${S}"/expat
+ rm -rf "${S}"/freetype
+ rm -rf "${S}"/jasper
+ rm -rf "${S}"/jbig2dec
+ rm -rf "${S}"/jpeg
+ rm -rf "${S}"/lcms{,2}
+ rm -rf "${S}"/libpng
+ rm -rf "${S}"/openjpeg
+ 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
+
+ # remove unnecessary multiarch support patch
+ rm -rf "${WORKDIR}"/debian/patches/2003_support_multiarch.patch
+ # remove reference to subpkg that we include in base
+ rm -rf "${WORKDIR}"/debian/patches/2008_mention_ghostscript-x_in_docs.patch
+ # this depends on CVE-2013-5653.patch being applied first; since Portage
+ # applies patches in alphabetical order, this is close enough
+ mv "${WORKDIR}"/debian/patches/840691-Fix-.locksafe.patch "${WORKDIR}"/debian/patches/Debian-840691-Fix-.locksafe.patch
+ # apply various patches from Debian Security
+ EPATCH_SUFFIX="patch" EPATCH_FORCE="yes"
+ EPATCH_SOURCE="${WORKDIR}/debian/patches/"
+ epatch
+
+ 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"
+
+ # bug 467100
+ sed -i -e '/AM_PROG_CC_STDC/d' ijs/configure.ac || die "sed failed"
+
+ cd "${S}"
+ 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-jasper \
+ --without-lcms \
+ --without-luratech \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable gtk) \
+ $(use_enable jpeg2k openjpeg ) \
+ $(use_with cups install-cups) \
+ $(use_with cups pdftoraster) \
+ $(use_with idn libidn) \
+ $(use_with X x)
+
+ cd "${S}/ijs"
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ # workaround: -j1 -> see bug #234378
+ emake -j1 so all
+
+ cd "${S}/ijs"
+ emake
+}
+
+src_install() {
+ # workaround: -j1 -> see bug #356303
+ emake -j1 DESTDIR="${D}" install-so install
+
+ # workaround: some printer drivers still require pstoraster, bug #383831
+ use cups && dosym /usr/libexec/cups/filter/gstoraster /usr/libexec/cups/filter/pstoraster
+ # workaround: do the same for pstopxl as of gs 9.05
+ use cups && dosym /usr/libexec/cups/filter/gstopxl /usr/libexec/cups/filter/pstopxl
+
+ # 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
+
+ cd "${S}/ijs"
+ emake DESTDIR="${D}" install
+
+ # install the CMaps from poppler-data properly, bug 409361
+ dosym /usr/share/poppler/cMaps /usr/share/ghostscript/${PVM}/Resource/CMap
+
+ use static-libs || find "${D}" -name '*.la' -delete
+
+ use linguas_de || rm -r "${D}"/usr/share/man/de
+}