summaryrefslogtreecommitdiff
path: root/app-text/ghostscript-gpl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-16 22:05:01 +0100
commitcc4618c9ba3d974948ebf340b542d8cb01db2f55 (patch)
tree125ee67bb9e0d548771cf7b61d04bb1f0dc57687 /app-text/ghostscript-gpl
parent677b7ba5c317778df2ad7e70df94b9b7eec4adbc (diff)
gentoo resync : 16.09.2021
Diffstat (limited to 'app-text/ghostscript-gpl')
-rw-r--r--app-text/ghostscript-gpl/Manifest4
-rw-r--r--app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch213
-rw-r--r--app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild191
-rw-r--r--app-text/ghostscript-gpl/metadata.xml2
4 files changed, 408 insertions, 2 deletions
diff --git a/app-text/ghostscript-gpl/Manifest b/app-text/ghostscript-gpl/Manifest
index c73de23f41c8..ced4056f8dc9 100644
--- a/app-text/ghostscript-gpl/Manifest
+++ b/app-text/ghostscript-gpl/Manifest
@@ -1,5 +1,6 @@
AUX ghostscript-gpl-9.53.3-fix-ps2epsi.patch 537 BLAKE2B fe6bf851c52751e3653e8e7cfac4b5e5e85ec3b9c9a125e5c7e0ca3aeca5cbe0b1ffe068633dd091755bfba410476b1328abbd94af7c90637541215f484e2413 SHA512 901a8a3b2ef645cd1e61f7596aa0f71921d480ebd48249b3d4e0e07dcfc33bb92ba484a28e952575c33062b3f429d8d60b43aeba8ea59a0623b18405dc27515a
AUX ghostscript-gpl-9.53.3-freetype-2.10.3.patch 508 BLAKE2B 8819f3be84b556adde4808509a1199d08b059a77abeafb6d95076194093a3223cc8c8b7032124eaeaa98dedb237dd94632cb374cb854f7d1594a80b82df79173 SHA512 43bb10cbf6b316d59a616f986fe8bea87af1313ca71138ecdeb531ea2a689c64718c44d0a81f69bdf30e3814fec3b36866c2249d26c6d45c58bd121accc7f8d4
+AUX ghostscript-gpl-9.54.0-CVE-2021-3781.patch 7824 BLAKE2B 3e02e0085175054bb11dd392489ccd52cfe2d9b8b63430db55f54f95e13c1965f685eed2ccea367335565a0cfe2b35884a6da6d7465eeaf32442ec7680839917 SHA512 d00fccab57efbf2256d1c87f18e915a4c4dfc9a2c2a7bbaf9206c0a1fa72479402ded34b6b669ab2979cc637ac18181cbc3fe81ad18c2a3a4e5611f7d34da554
DIST ghostscript-9.52.tar.xz 39711040 BLAKE2B 317042ae7e2bfdeded2ae9d9a1bd1521422d1ce1dd6b9b2cdedf4c503cce1285684d5329663dc8ee7263591761c33254827d16b1a93f8c10aad4baab1d859f93 SHA512 4c4a33884e1138bad553eee61fac1a72158297ad5c2ce46a4b36150848dea8158affaf2b902f4ff03e4f72ebc8154c198b618112624f409230a610b7648faa67
DIST ghostscript-9.53.3.tar.xz 41368160 BLAKE2B 6b5840a420d7527c7155bfb707fe19b3412bdd3a6707f44d058c20f607e6695cfc878cf5df4c4528686c1c1f488b2dbdb81ef5fdf38b950eb15751d2ebafb0a9 SHA512 eb832c27eecd30f15e346408c592d7096fd23ef0a6fa59bd50ca327578915434530a4868e69249c2594def0910c527302e99d54f0877f726a8ca8bea6f0f17b7
DIST ghostscript-9.54.0.tar.xz 56001768 BLAKE2B 4a98b1af74c4b4caf8d263cd5529059304a76884418c90401b0fc9a89e0f5de5417a439f6e08b95374e62158eec65528ef5f949497d5050a6408fb7c87e54aa9 SHA512 a3c96925f4dbf5e276fc543b88df185a0435c68166db15ac532094329ba8db314d739a292da18be7954daaafeeb290e641ea03edf888854d7e752998ec6062cc
@@ -8,5 +9,6 @@ DIST ghostscript-gpl-9.53-patchset-01.tar.xz 2340 BLAKE2B 55d82c88f1b57c08431883
DIST ghostscript-gpl-9.54-patchset-01.tar.xz 2600 BLAKE2B e89f16f149ba3c46b1e81d774a3dca8345dfb60ec959249292cc0f3d8bc811ac169e232e3fb85de9d0ce65dd41453f90461798007b8b9fdd2c6e44d55e7a9d10 SHA512 0c49fbe6ece86b0c7729421cf06a6a210341fbe676efd89c0f97c96a426d3156e6a8ee596e050b8ee6a1af7a94ea8d1d54a6166f020a7d40fec95949cd7f3b12
EBUILD ghostscript-gpl-9.52-r1.ebuild 5176 BLAKE2B db5d5ca4785c48ca75d55c980f9e1aae1132f3e68dd52e2443fe8bf0202b7c82367893167a8cc8a700c7ef12ff9d8743eb41732b8ba450b9fd9606a274210a36 SHA512 44a43ed682065164dafcfe7eb62918fb9906197569be216bfcc800d232d2ffc33702090844ad8b10f65492c60cb90a5b162560ad26b828973ca46ea85f993a8c
EBUILD ghostscript-gpl-9.53.3-r5.ebuild 5297 BLAKE2B 2e113f1d62339e4f09612787a016bcb67fa12cb93e40480a536d621fe4530005dd5827cd6141bd9cbab739fdf5870522ff7082faef73ef3fa955c98b50e6603c SHA512 0ed8f0571efe2853937ec4fe79c6f875728721a1b66d29df5f2e99de329e54354243c148a64493d969ac64b82bf56ba4333fe43cc93f3f1e27dea9fe955ec33b
+EBUILD ghostscript-gpl-9.54.0-r1.ebuild 5180 BLAKE2B 761fee44bfa6108187c3ff7c533ea9d7e08adedecd947924a0d01737c4603d5fd9c7504b5450db576b23b3c4ba315fea03ca9ba0148f2bdfd6638d86f05206f7 SHA512 a08aa7301628c345a95c684bc21ed54ffb5caf191997b4ff6977f9c23e324a9b58c62cbd75083ce7d8748f7a867b3c734db93ff091929aad5eb6e5ac3e8cd030
EBUILD ghostscript-gpl-9.54.0.ebuild 5143 BLAKE2B d9f1444bc320b4c7747722ffafdf5b8d47edc9ec60abc682d0ce91c53d8ff3e047b51a06af5d3acf2d09603b775bce0a199c9647f3ba2a61b3a249891327b29e SHA512 a6a5623daad8e504a8afe6e18a1fc9783ce9eb6dc2b8504eaa161d4d51dfedda2a45c85802eb72519ddb47fa2278c104946fc66dd9feafd763fc999d54e90be6
-MISC metadata.xml 764 BLAKE2B 9e484085e597e1e465a5092d57ab3ab46b428d016db7ac6780b62c06bd27754079eb38d6fc2b2fac5cb8577cb75b4c3fde6a2d410c40b6fce9b6ef6fcdc8b005 SHA512 f410375fc8a20c69e1b6859054d2776826392048b321912ec8f4ed9a6e6651b824f8ad12d1e74c6a12bbe57126bc9123680b23a7d2edf6d2ee28fffdd906eaa2
+MISC metadata.xml 765 BLAKE2B dc8466ca08f1fa1891cc60e886bfdd4cccc517c4b355ba6d7697acdece16657982adbfbd4f5709b3850dfba1293ce269b17f9c05bb92f5e5531f3c7debd13613 SHA512 7f4dba7c256642b532cb7418507169a2554e0c4058011ff8dba802f93d677a824b8ae7896840369f06c801ca4a7d27fda86f8c6a344127f65f61ca6e3a02c0ee
diff --git a/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
new file mode 100644
index 000000000000..779bedad4bde
--- /dev/null
+++ b/app-text/ghostscript-gpl/files/ghostscript-gpl-9.54.0-CVE-2021-3781.patch
@@ -0,0 +1,213 @@
+https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=a9bd3dec9fde03327a4a2c69dad1036bf9632e20
+https://bugs.gentoo.org/812509
+
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Tue, 7 Sep 2021 20:36:12 +0100
+Subject: [PATCH 1/1] Bug 704342: Include device specifier strings in access
+ validation
+
+for the "%pipe%", %handle%" and %printer% io devices.
+
+We previously validated only the part after the "%pipe%" Postscript device
+specifier, but this proved insufficient.
+
+This rebuilds the original file name string, and validates it complete. The
+slight complication for "%pipe%" is it can be reached implicitly using
+"|" so we have to check both prefixes.
+
+Addresses CVE-2021-3781
+--- a/base/gdevpipe.c
++++ b/base/gdevpipe.c
+@@ -72,8 +72,28 @@ pipe_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ #else
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ /* The pipe device can be reached in two ways, explicltly with %pipe%
++ or implicitly with "|", so we have to check for both
++ */
++ char f[gp_file_name_sizeof];
++ const char *pipestr = "|";
++ const size_t pipestrlen = strlen(pipestr);
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
++ int code1;
++
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(f, iodev->dname, preflen);
++ memcpy(f + preflen, fname, nlen + 1);
++
++ code1 = gp_validate_path(mem, f, access);
++
++ memcpy(f, pipestr, pipestrlen);
++ memcpy(f + pipestrlen, fname, nlen + 1);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (code1 != 0 && gp_validate_path(mem, f, access) != 0 )
+ return gs_error_invalidfileaccess;
+
+ /*
+--- a/base/gp_mshdl.c
++++ b/base/gp_mshdl.c
+@@ -95,8 +95,17 @@ mswin_handle_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ long hfile; /* Correct for Win32, may be wrong for Win64 */
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ char f[gp_file_name_sizeof];
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(f, iodev->dname, preflen);
++ memcpy(f + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, f, access) != 0)
+ return gs_error_invalidfileaccess;
+
+ /* First we try the open_handle method. */
+--- a/base/gp_msprn.c
++++ b/base/gp_msprn.c
+@@ -168,8 +168,16 @@ mswin_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ uintptr_t *ptid = &((tid_t *)(iodev->state))->tid;
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ const size_t preflen = strlen(iodev->dname);
++ const size_t nlen = strlen(fname);
+
+- if (gp_validate_path(mem, fname, access) != 0)
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(pname, iodev->dname, preflen);
++ memcpy(pname + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, pname, access) != 0)
+ return gs_error_invalidfileaccess;
+
+ /* First we try the open_printer method. */
+--- a/base/gp_os2pr.c
++++ b/base/gp_os2pr.c
+@@ -107,9 +107,20 @@ os2_printer_fopen(gx_io_device * iodev, const char *fname, const char *access,
+ FILE ** pfile, char *rfname, uint rnamelen)
+ {
+ os2_printer_t *pr = (os2_printer_t *)iodev->state;
+- char driver_name[256];
++ char driver_name[gp_file_name_sizeof];
+ gs_lib_ctx_t *ctx = mem->gs_lib_ctx;
+ gs_fs_list_t *fs = ctx->core->fs;
++ const size_t preflen = strlen(iodev->dname);
++ const int size_t = strlen(fname);
++
++ if (preflen + nlen >= gp_file_name_sizeof)
++ return_error(gs_error_invalidaccess);
++
++ memcpy(driver_name, iodev->dname, preflen);
++ memcpy(driver_name + preflen, fname, nlen + 1);
++
++ if (gp_validate_path(mem, driver_name, access) != 0)
++ return gs_error_invalidfileaccess;
+
+ /* First we try the open_printer method. */
+ /* Note that the loop condition here ensures we don't
+--- a/base/gslibctx.c
++++ b/base/gslibctx.c
+@@ -655,82 +655,39 @@ rewrite_percent_specifiers(char *s)
+ int
+ gs_add_outputfile_control_path(gs_memory_t *mem, const char *fname)
+ {
+- char *fp, f[gp_file_name_sizeof];
+- const int pipe = 124; /* ASCII code for '|' */
+- const int len = strlen(fname);
+- int i, code;
++ char f[gp_file_name_sizeof];
++ int code;
+
+ /* Be sure the string copy will fit */
+- if (len >= gp_file_name_sizeof)
++ if (strlen(fname) >= gp_file_name_sizeof)
+ return gs_error_rangecheck;
+ strcpy(f, fname);
+- fp = f;
+ /* Try to rewrite any %d (or similar) in the string */
+ rewrite_percent_specifiers(f);
+- for (i = 0; i < len; i++) {
+- if (f[i] == pipe) {
+- fp = &f[i + 1];
+- /* Because we potentially have to check file permissions at two levels
+- for the output file (gx_device_open_output_file and the low level
+- fopen API, if we're using a pipe, we have to add both the full string,
+- (including the '|', and just the command to which we pipe - since at
+- the pipe_fopen(), the leading '|' has been stripped.
+- */
+- code = gs_add_control_path(mem, gs_permit_file_writing, f);
+- if (code < 0)
+- return code;
+- code = gs_add_control_path(mem, gs_permit_file_control, f);
+- if (code < 0)
+- return code;
+- break;
+- }
+- if (!IS_WHITESPACE(f[i]))
+- break;
+- }
+- code = gs_add_control_path(mem, gs_permit_file_control, fp);
++
++ code = gs_add_control_path(mem, gs_permit_file_control, f);
+ if (code < 0)
+ return code;
+- return gs_add_control_path(mem, gs_permit_file_writing, fp);
++ return gs_add_control_path(mem, gs_permit_file_writing, f);
+ }
+
+ int
+ gs_remove_outputfile_control_path(gs_memory_t *mem, const char *fname)
+ {
+- char *fp, f[gp_file_name_sizeof];
+- const int pipe = 124; /* ASCII code for '|' */
+- const int len = strlen(fname);
+- int i, code;
++ char f[gp_file_name_sizeof];
++ int code;
+
+ /* Be sure the string copy will fit */
+- if (len >= gp_file_name_sizeof)
++ if (strlen(fname) >= gp_file_name_sizeof)
+ return gs_error_rangecheck;
+ strcpy(f, fname);
+- fp = f;
+ /* Try to rewrite any %d (or similar) in the string */
+- for (i = 0; i < len; i++) {
+- if (f[i] == pipe) {
+- fp = &f[i + 1];
+- /* Because we potentially have to check file permissions at two levels
+- for the output file (gx_device_open_output_file and the low level
+- fopen API, if we're using a pipe, we have to add both the full string,
+- (including the '|', and just the command to which we pipe - since at
+- the pipe_fopen(), the leading '|' has been stripped.
+- */
+- code = gs_remove_control_path(mem, gs_permit_file_writing, f);
+- if (code < 0)
+- return code;
+- code = gs_remove_control_path(mem, gs_permit_file_control, f);
+- if (code < 0)
+- return code;
+- break;
+- }
+- if (!IS_WHITESPACE(f[i]))
+- break;
+- }
+- code = gs_remove_control_path(mem, gs_permit_file_control, fp);
++ rewrite_percent_specifiers(f);
++
++ code = gs_remove_control_path(mem, gs_permit_file_control, f);
+ if (code < 0)
+ return code;
+- return gs_remove_control_path(mem, gs_permit_file_writing, fp);
++ return gs_remove_control_path(mem, gs_permit_file_writing, f);
+ }
+
+ int
diff --git a/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
new file mode 100644
index 000000000000..26de70cf7a7c
--- /dev/null
+++ b/app-text/ghostscript-gpl/ghostscript-gpl-9.54.0-r1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Interpreter for the PostScript language and PDF"
+HOMEPAGE="https://ghostscript.com/"
+
+MY_PN=${PN/-gpl}
+MY_P="${MY_PN}-${PV/_}"
+PVM=$(ver_cut 1-2)
+PVM_S=$(ver_rs 1-2 "")
+
+MY_PATCHSET="ghostscript-gpl-9.54-patchset-01.tar.xz"
+
+SRC_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${PVM_S}/${MY_P}.tar.xz"
+
+if [[ -n "${MY_PATCHSET}" ]] ; then
+ SRC_URI+=" https://dev.gentoo.org/~whissi/dist/ghostscript-gpl/${MY_PATCHSET}"
+fi
+
+LICENSE="AGPL-3 CPL-1.0"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="cups dbus gtk +jpeg2k l10n_de static-libs unicode X"
+
+LANGS="ja ko zh-CN zh-TW"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} l10n_${X}"
+done
+
+DEPEND="
+ app-text/libpaper
+ media-libs/fontconfig
+ >=media-libs/freetype-2.4.9:2=
+ >=media-libs/jbig2dec-0.19:=
+ >=media-libs/lcms-2.6:2
+ >=media-libs/libpng-1.6.2:0=
+ >=media-libs/tiff-4.0.1:0=
+ >=sys-libs/zlib-1.2.7
+ virtual/jpeg:0
+ cups? ( >=net-print/cups-1.3.8 )
+ dbus? ( sys-apps/dbus )
+ gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2= )
+ unicode? ( net-dns/libidn:0= )
+ X? ( x11-libs/libXt x11-libs/libXext )
+"
+BDEPEND="virtual/pkgconfig"
+RDEPEND="${DEPEND}
+ app-text/poppler-data
+ >=media-fonts/urw-fonts-2.4.9
+ l10n_ja? ( media-fonts/kochi-substitute )
+ l10n_ko? ( media-fonts/baekmuk-fonts )
+ l10n_zh-CN? ( media-fonts/arphicfonts )
+ l10n_zh-TW? ( media-fonts/arphicfonts )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ if [[ -n "${MY_PATCHSET}" ]] ; then
+ # apply various patches, many borrowed from Fedora
+ # https://src.fedoraproject.org/rpms/ghostscript
+ # and Debian
+ # https://salsa.debian.org/printing-team/ghostscript/-/tree/debian/latest/debian/patches
+ eapply "${WORKDIR}/patches/"*.patch
+ fi
+
+ eapply "${FILESDIR}"/${P}-CVE-2021-3781.patch
+
+ default
+
+ # remove internal copies of various libraries
+ rm -r cups/libs || die
+ rm -r freetype || die
+ rm -r jbig2dec || die
+ rm -r jpeg || die
+ rm -r lcms2mt || die
+ rm -r libpng || die
+ rm -r tiff || die
+ rm -r zlib || die
+ rm -r openjpeg || die
+ # remove internal CMaps (CMaps from poppler-data are used instead)
+ rm -r Resource/CMap || die
+
+ if ! use gtk ; then
+ sed -e "s:\$(GSSOX)::" \
+ -e "s:.*\$(GSSOX_XENAME)$::" \
+ -i base/unix-dll.mak || die "sed failed"
+ fi
+
+ # Force the include dirs to a neutral location.
+ sed -e "/^ZLIBDIR=/s:=.*:=${T}:" \
+ -i configure.ac || die
+ # Some files depend on zlib.h directly. Redirect them. #573248
+ # Also make sure to not define OPJ_STATIC to avoid linker errors due to
+ # hidden symbols (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203327#c1)
+ sed -e '/^zlib_h/s:=.*:=:' \
+ -e 's|-DOPJ_STATIC ||' \
+ -i base/lib.mak || die
+
+ # search path fix
+ # put LDFLAGS after BINDIR, bug #383447
+ sed -e "s:\$\(gsdatadir\)/lib:@datarootdir@/ghostscript/${PV}/$(get_libdir):" \
+ -e "s:exdir=.*:exdir=@datarootdir@/doc/${PF}/examples:" \
+ -e "s:docdir=.*:docdir=@datarootdir@/doc/${PF}/html:" \
+ -e "s:GS_DOCDIR=.*:GS_DOCDIR=@datarootdir@/doc/${PF}/html:" \
+ -e 's:-L$(BINDIR):& $(LDFLAGS):g' \
+ -i Makefile.in base/*.mak || die "sed failed"
+
+ # remove incorrect symlink, bug 590384
+ rm ijs/ltmain.sh || die
+ eautoreconf
+
+ cd ijs || die
+ eautoreconf
+}
+
+src_configure() {
+ local FONTPATH
+ for path in \
+ "${EPREFIX}"/usr/share/fonts/urw-fonts \
+ "${EPREFIX}"/usr/share/fonts/Type1 \
+ "${EPREFIX}"/usr/share/fonts \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-CNS1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-GB1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan1 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Japan2 \
+ "${EPREFIX}"/usr/share/poppler/cMap/Adobe-Korea1
+ do
+ FONTPATH="$FONTPATH${FONTPATH:+:}${EPREFIX}$path"
+ done
+
+ PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
+ econf \
+ --enable-dynamic \
+ --enable-freetype \
+ --enable-fontconfig \
+ $(use_enable jpeg2k openjpeg) \
+ --disable-compile-inits \
+ --with-drivers=ALL \
+ --with-fontpath="$FONTPATH" \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-libpaper \
+ --with-system-libtiff \
+ $(use_enable cups) \
+ $(use_enable dbus) \
+ $(use_enable gtk) \
+ $(use_with cups pdftoraster) \
+ $(use_with unicode libidn) \
+ $(use_with X x) \
+ DARWIN_LDFLAGS_SO_PREFIX="${EPREFIX}/usr/lib/"
+
+ cd "${S}/ijs" || die
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ emake so all
+
+ cd ijs || die
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install-so install
+
+ # move gsc to gs, bug #343447
+ # gsc collides with gambit, bug #253064
+ mv -f "${ED}"/usr/bin/{gsc,gs} || die
+
+ cd "${S}/ijs" || die
+ emake DESTDIR="${D}" install
+
+ # install the CMaps from poppler-data properly, bug #409361
+ dosym ../../../poppler/cMaps "/usr/share/ghostscript/${PV}/Resource/CMap"
+
+ if ! use static-libs; then
+ find "${ED}" -name '*.la' -delete || die
+ fi
+
+ if ! use l10n_de; then
+ rm -r "${ED}"/usr/share/man/de || die
+ fi
+}
diff --git a/app-text/ghostscript-gpl/metadata.xml b/app-text/ghostscript-gpl/metadata.xml
index aa055c05a0b5..9da8ae5ef674 100644
--- a/app-text/ghostscript-gpl/metadata.xml
+++ b/app-text/ghostscript-gpl/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>codec@gentoo.org</email>