[arch-commits] Commit in ghostscript/repos (3 files)

Andreas Radke andyrtr at archlinux.org
Thu Jan 24 17:23:06 UTC 2019


    Date: Thursday, January 24, 2019 @ 17:23:05
  Author: andyrtr
Revision: 344658

archrelease: copy trunk to testing-x86_64

Added:
  ghostscript/repos/testing-x86_64/
  ghostscript/repos/testing-x86_64/PKGBUILD
    (from rev 344657, ghostscript/trunk/PKGBUILD)
  ghostscript/repos/testing-x86_64/segfault.patch
    (from rev 344657, ghostscript/trunk/segfault.patch)

----------------+
 PKGBUILD       |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 segfault.patch |   35 +++++++++++++++++
 2 files changed, 143 insertions(+)

Copied: ghostscript/repos/testing-x86_64/PKGBUILD (from rev 344657, ghostscript/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2019-01-24 17:23:05 UTC (rev 344658)
@@ -0,0 +1,108 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+
+pkgbase=ghostscript
+pkgname=(ghostscript ghostxps ghostpcl)
+pkgver=9.26
+pkgrel=2
+pkgdesc="An interpreter for the PostScript language"
+url="https://www.ghostscript.com/"
+arch=('x86_64')
+license=('AGPL3' 'custom')
+depends=('libxt' 'libcups' 'fontconfig' 'zlib' 'libpng' 'libjpeg' 'jbig2dec'
+         'libtiff' 'lcms2' 'dbus' 'libpaper' 'ijs' 'openjpeg2' 'libidn')
+makedepends=('gtk3' 'gnutls' 'glu' 'freeglut')
+# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
+source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.gz
+        segfault.patch
+        https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs926/0001-Bug700317-Address-.force-operators-exposure.tgz)
+sha512sums=('8862a4e7328a217b383a4c38caaabcc31930d38a80c3456668bb9de3aae943dec52dfbcc5eb5c18a9987a5f9b447bd4afe0e0c2e995a7de4eafa306fe246d229'
+            '4c36dacedc38a981140d910316b1e6358882c02f86b7e8cff2addaf5c056ef7c6c6aaa1071e73cb56d781e891482da13706ca1a72b31cd7db9104dff5aad8b19'
+            '289d916a0b0da410e6f721e42bc44659c91c66ca0f7b96b1a6b010ae1c25e47788e282edc3578b4e4b120a2c684c7b1fd4cc574084bdc9cbbf6e431a01fbae0e')
+
+prepare() {
+  cd ghostpdl-${pkgver}
+
+  # force it to use system-libs
+  rm -r cups/libs expat ijs jbig2dec jpeg lcms2mt libpng openjpeg tiff zlib
+  # using tree freetype because of https://bugs.archlinux.org/task/56849
+  # lcms2mt is the new lcms2 fork aimed to replace lcms2 in a thread safe way
+
+
+  # apply upstream fix for some segfaults FS#61513
+  patch -Np1 -i ../segfault.patch
+
+  # CVE-2019-6116
+  patch -Np1 -i ../0001-Bug700317-Address-.force-operators-exposure.patch
+}
+
+build() {
+  cd ghostpdl-${pkgver}
+
+  ./configure --prefix=/usr \
+              --enable-dynamic \
+              --with-ijs \
+              --with-jbig2dec \
+              --with-x \
+              --with-drivers=ALL \
+              --with-fontpath=/usr/share/fonts/gsfonts \
+              --enable-fontconfig \
+              --enable-freetype \
+              --enable-openjpeg \
+              --without-luratech \
+              --with-system-libtiff \
+              --with-libpaper \
+              --disable-compile-inits #--help # needed for linking with system-zlib
+
+  make so-only
+}
+
+package_ghostscript() {
+  optdepends=('texlive-core:      needed for dvipdf'
+              'gtk3:              needed for gsx')
+
+  cd ghostpdl-${pkgver}
+
+  make DESTDIR="${pkgdir}" \
+       CUPSSERVERROOT="${pkgdir}$(cups-config --serverroot)" \
+       CUPSSERVERBIN="${pkgdir}$(cups-config --serverbin)" \
+       soinstall
+  ln -s gsc "${pkgdir}"/usr/bin/gs
+
+  # remove useless broken doc/ symlink - FS#59507
+  rm -f "${pkgdir}"/usr/share/ghostscript/${pkgver}/doc
+
+  # remove unwanted localized manpages
+  rm -r "${pkgdir}"/usr/share/man/de
+
+  install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostxps() {
+  pkgdesc="${pkgdesc/PostScript/XPS document}"
+  depends=("ghostscript=${pkgver}-${pkgrel}")
+
+  cd ghostpdl-${pkgver}
+
+  install -Dt "${pkgdir}"/usr/bin sobin/gxpsc
+  ln -s gxpsc "${pkgdir}"/usr/bin/gxps
+
+  install -Dt "${pkgdir}"/usr/lib sobin/libgxps.so.${pkgver%.*}
+  ln -s libgxps.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgxps.so.${pkgver%rc*}
+
+  install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostpcl() {
+  pkgdesc="${pkgdesc/PostScript/PCL 6}"
+  depends=("ghostscript=${pkgver}-${pkgrel}")
+
+  cd ghostpdl-${pkgver}
+
+  install -Dt "${pkgdir}"/usr/bin sobin/gpcl6c
+  ln -sf gpcl6c "${pkgdir}"/usr/bin/gpcl6
+
+  install -Dt "${pkgdir}"/usr/lib sobin/libgpcl6.so.${pkgver%.*}
+  ln -s libgpcl6.so.${pkgver%.*} "${pkgdir}"/usr/lib/libgpcl6.so.${pkgver%rc*}
+
+  install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}

Copied: ghostscript/repos/testing-x86_64/segfault.patch (from rev 344657, ghostscript/trunk/segfault.patch)
===================================================================
--- testing-x86_64/segfault.patch	                        (rev 0)
+++ testing-x86_64/segfault.patch	2019-01-24 17:23:05 UTC (rev 344658)
@@ -0,0 +1,35 @@
+From fae21f1668d2b44b18b84cf0923a1d5f3008a696 Mon Sep 17 00:00:00 2001
+From: Ken Sharp <ken.sharp at artifex.com>
+Date: Tue, 4 Dec 2018 21:31:31 +0000
+Subject: [PATCH] subclassing devices - fix put_image method
+
+The subclassing devices need to change the 'memory device' parameter to
+be the child device, when its the same as the subclassing device.
+
+Otherwise we end up trying to access the child device's memory pointers
+in the subclassing device, which may not contain valid copies of
+those pointers.
+---
+ base/gdevsclass.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/base/gdevsclass.c b/base/gdevsclass.c
+index d9c85d2..5109258 100644
+--- a/base/gdevsclass.c
++++ b/base/gdevsclass.c
+@@ -797,7 +797,10 @@ int default_subclass_put_image(gx_device *dev, gx_device *mdev, const byte **buf
+             int alpha_plane_index, int tag_plane_index)
+ {
+     if (dev->child)
+-        return dev_proc(dev->child, put_image)(dev->child, mdev, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
++        if (dev == mdev)
++            return dev_proc(dev->child, put_image)(dev->child, dev->child, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
++        else
++            return dev_proc(dev->child, put_image)(dev->child, mdev, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
+ 
+     return 0;
+ }
+-- 
+2.9.1
+
+



More information about the arch-commits mailing list