Date: Wednesday, March 8, 2023 @ 19:10:36
Author: andyrtr
Revision: 470435
archrelease: copy trunk to extra-x86_64
Added:
ghostscript/repos/extra-x86_64/0001_Catch_and_act_on_error_code_during_PCL5_init.diff
(from rev 470434,
ghostscript/trunk/0001_Catch_and_act_on_error_code_during_PCL5_init.diff)
ghostscript/repos/extra-x86_64/2010_add_build_timestamp_setting.patch
(from rev 470434, ghostscript/trunk/2010_add_build_timestamp_setting.patch)
ghostscript/repos/extra-x86_64/PKGBUILD
(from rev 470434, ghostscript/trunk/PKGBUILD)
Deleted:
ghostscript/repos/extra-x86_64/2010_add_build_timestamp_setting.patch
ghostscript/repos/extra-x86_64/PKGBUILD
--------------------------------------------------------+
0001_Catch_and_act_on_error_code_during_PCL5_init.diff | 36 ++
2010_add_build_timestamp_setting.patch | 238 ++++++-------
PKGBUILD | 268 +++++++--------
3 files changed, 291 insertions(+), 251 deletions(-)
Copied:
ghostscript/repos/extra-x86_64/0001_Catch_and_act_on_error_code_during_PCL5_init.diff
(from rev 470434,
ghostscript/trunk/0001_Catch_and_act_on_error_code_during_PCL5_init.diff)
===================================================================
--- 0001_Catch_and_act_on_error_code_during_PCL5_init.diff
(rev 0)
+++ 0001_Catch_and_act_on_error_code_during_PCL5_init.diff 2023-03-08
19:10:36 UTC (rev 470435)
@@ -0,0 +1,36 @@
+From: Chris Liddell <[email protected]>
+Date: Tue, 31 Jan 2023 10:16:45 +0000 (+0000)
+Subject: Bug 706360: Catch and act on error code during PCL5 init
+X-Git-Tag: rjw-test~16
+X-Git-Url:
https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=936d966618c8
+
+Bug 706360: Catch and act on error code during PCL5 init
+
+Missing fonts is a fatal error, and we were ignoring the error from
+pcl_do_resets() due to "missing" fonts (i.e. non-romfs configs not supported).
+---
+
+diff --git a/pcl/pcl/pctop.c b/pcl/pcl/pctop.c
+index 224614d5d..38732d5e2 100644
+--- a/pcl/pcl/pctop.c
++++ b/pcl/pcl/pctop.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2001-2022 Artifex Software, Inc.
++/* Copyright (C) 2001-2023 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+@@ -281,8 +281,11 @@
pcl_impl_allocate_interp_instance(pl_interp_implementation_t *impl,
+ /* Return success */
+ impl->interp_client_data = pcli;
+ /* Initial reset for the PCL interpreter */
+- pcl_do_resets(&pcli->pcs, pcl_reset_initial);
+- return 0;
++ code = pcl_do_resets(&pcli->pcs, pcl_reset_initial);
++ if (code < 0) {
++ (void)impl->proc_deallocate_interp_instance(impl);
++ }
++ return code;
+ }
+
+ /* if the device option string PCL is not given, the default
Deleted: 2010_add_build_timestamp_setting.patch
===================================================================
--- 2010_add_build_timestamp_setting.patch 2023-03-08 19:10:24 UTC (rev
470434)
+++ 2010_add_build_timestamp_setting.patch 2023-03-08 19:10:36 UTC (rev
470435)
@@ -1,119 +0,0 @@
-Description: Allow the build timestamp to be externally set
- In order to make Ghostscript output reproducible, we need a way to
- set the build timestamp to other values than the current time.
- We now consistently use gp_get_realtime() instead of directly calling
- time() or gp_get_usertime() and make gp_get_realtime() use the value
- found in the SOURCE_DATE_EPOCH environment variable if set. Also,
- environment timezone is fixed to UTC if SOURCE_DATE_EPOCH is used to
- avoid variations.
-Author: Eduard Sanou <[email protected]>
-Author: Peter De Wachter <[email protected]>
-Bug-Debian: https://bugs.debian.org/794004
-Last-Update: 2015-07-30
----
-This patch header follows DEP-3: https://dep.debian.net/deps/dep3/
---- a/base/gp_unix.c
-+++ b/base/gp_unix.c
-@@ -19,6 +19,7 @@
- #ifdef __MINGW32__
- # include "windows_.h"
- #endif
-+#include "errno_.h"
- #include "pipe_.h"
- #include "string_.h"
- #include "time_.h"
-@@ -148,6 +149,7 @@
- gp_get_realtime(long *pdt)
- {
- struct timeval tp;
-+ const char *env;
-
- #if gettimeofday_no_timezone /* older versions of SVR4 */
- {
-@@ -167,6 +169,26 @@
- }
- #endif
-
-+ env = getenv("SOURCE_DATE_EPOCH");
-+ if (env) {
-+ char *end;
-+ long timestamp;
-+
-+ errno = 0;
-+ timestamp = strtol(env, &end, 10);
-+ if (env == end || *end || errno != 0) {
-+ lprintf("Ghostscript: SOURCE_DATE_EPOCH is not a number!\n");
-+ timestamp = 0;
-+ }
-+
-+ tp.tv_sec = timestamp;
-+ tp.tv_usec = 0;
-+
-+ /* We need to fix the environment timezone to get reproducible */
-+ /* results when parsing the result of gp_get_realtime. */
-+ setenv("TZ", "UTC", 1);
-+ }
-+
- /* tp.tv_sec is #secs since Jan 1, 1970 */
- pdt[0] = tp.tv_sec;
-
---- a/devices/vector/gdevpdf.c
-+++ b/devices/vector/gdevpdf.c
-@@ -427,6 +427,7 @@
- */
- {
- struct tm tms;
-+ long secs_ns[2];
- time_t t;
- char buf[1+2+4+2+2+2+2+2+1+2+1+2+1+1+1]; /*
(D:yyyymmddhhmmssZhh'mm')\0 */
- int timeoffset;
-@@ -438,7 +439,8 @@
- timesign = 'Z';
- timeoffset = 0;
- #else
-- time(&t);
-+ gp_get_realtime(secs_ns);
-+ t = secs_ns[0];
- tms = *gmtime(&t);
- tms.tm_isdst = -1;
- timeoffset = (int)difftime(t, mktime(&tms)); /* tz+dst in seconds */
---- a/devices/vector/gdevpdfe.c
-+++ b/devices/vector/gdevpdfe.c
-@@ -199,6 +199,7 @@
- {
- /* We don't write a day time because we don't have a time zone. */
- struct tm tms;
-+ long secs_ns[2];
- time_t t;
- char buf1[4+1+2+1+2+1]; /* yyyy-mm-dd\0 */
-
-@@ -206,7 +207,8 @@
- memset(&t, 0, sizeof(t));
- memset(&tms, 0, sizeof(tms));
- #else
-- time(&t);
-+ gp_get_realtime(secs_ns);
-+ t = secs_ns[0];
- tms = *localtime(&t);
- #endif
- gs_sprintf(buf1,
---- a/devices/vector/gdevpsu.c
-+++ b/devices/vector/gdevpsu.c
-@@ -183,6 +183,7 @@
- fprintf(f, "%%%%Creator: %s %ld (%s)\n", gs_product, (long)gs_revision,
- dev->dname);
- {
-+ long secs_ns[2];
- time_t t;
- struct tm tms;
-
-@@ -190,7 +191,8 @@
- memset(&t, 0, sizeof(t));
- memset(&tms, 0, sizeof(tms));
- #else
-- time(&t);
-+ gp_get_realtime(secs_ns);
-+ t = secs_ns[0];
- tms = *localtime(&t);
- #endif
- fprintf(f, "%%%%CreationDate: %d/%02d/%02d %02d:%02d:%02d\n",
Copied: ghostscript/repos/extra-x86_64/2010_add_build_timestamp_setting.patch
(from rev 470434, ghostscript/trunk/2010_add_build_timestamp_setting.patch)
===================================================================
--- 2010_add_build_timestamp_setting.patch (rev 0)
+++ 2010_add_build_timestamp_setting.patch 2023-03-08 19:10:36 UTC (rev
470435)
@@ -0,0 +1,119 @@
+Description: Allow the build timestamp to be externally set
+ In order to make Ghostscript output reproducible, we need a way to
+ set the build timestamp to other values than the current time.
+ We now consistently use gp_get_realtime() instead of directly calling
+ time() or gp_get_usertime() and make gp_get_realtime() use the value
+ found in the SOURCE_DATE_EPOCH environment variable if set. Also,
+ environment timezone is fixed to UTC if SOURCE_DATE_EPOCH is used to
+ avoid variations.
+Author: Eduard Sanou <[email protected]>
+Author: Peter De Wachter <[email protected]>
+Bug-Debian: https://bugs.debian.org/794004
+Last-Update: 2015-07-30
+---
+This patch header follows DEP-3: https://dep.debian.net/deps/dep3/
+--- a/base/gp_unix.c
++++ b/base/gp_unix.c
+@@ -19,6 +19,7 @@
+ #ifdef __MINGW32__
+ # include "windows_.h"
+ #endif
++#include "errno_.h"
+ #include "pipe_.h"
+ #include "string_.h"
+ #include "time_.h"
+@@ -148,6 +149,7 @@
+ gp_get_realtime(long *pdt)
+ {
+ struct timeval tp;
++ const char *env;
+
+ #if gettimeofday_no_timezone /* older versions of SVR4 */
+ {
+@@ -167,6 +169,26 @@
+ }
+ #endif
+
++ env = getenv("SOURCE_DATE_EPOCH");
++ if (env) {
++ char *end;
++ long timestamp;
++
++ errno = 0;
++ timestamp = strtol(env, &end, 10);
++ if (env == end || *end || errno != 0) {
++ lprintf("Ghostscript: SOURCE_DATE_EPOCH is not a number!\n");
++ timestamp = 0;
++ }
++
++ tp.tv_sec = timestamp;
++ tp.tv_usec = 0;
++
++ /* We need to fix the environment timezone to get reproducible */
++ /* results when parsing the result of gp_get_realtime. */
++ setenv("TZ", "UTC", 1);
++ }
++
+ /* tp.tv_sec is #secs since Jan 1, 1970 */
+ pdt[0] = tp.tv_sec;
+
+--- a/devices/vector/gdevpdf.c
++++ b/devices/vector/gdevpdf.c
+@@ -427,6 +427,7 @@
+ */
+ {
+ struct tm tms;
++ long secs_ns[2];
+ time_t t;
+ char buf[1+2+4+2+2+2+2+2+1+2+1+2+1+1+1]; /*
(D:yyyymmddhhmmssZhh'mm')\0 */
+ int timeoffset;
+@@ -438,7 +439,8 @@
+ timesign = 'Z';
+ timeoffset = 0;
+ #else
+- time(&t);
++ gp_get_realtime(secs_ns);
++ t = secs_ns[0];
+ tms = *gmtime(&t);
+ tms.tm_isdst = -1;
+ timeoffset = (int)difftime(t, mktime(&tms)); /* tz+dst in seconds */
+--- a/devices/vector/gdevpdfe.c
++++ b/devices/vector/gdevpdfe.c
+@@ -199,6 +199,7 @@
+ {
+ /* We don't write a day time because we don't have a time zone. */
+ struct tm tms;
++ long secs_ns[2];
+ time_t t;
+ char buf1[4+1+2+1+2+1]; /* yyyy-mm-dd\0 */
+
+@@ -206,7 +207,8 @@
+ memset(&t, 0, sizeof(t));
+ memset(&tms, 0, sizeof(tms));
+ #else
+- time(&t);
++ gp_get_realtime(secs_ns);
++ t = secs_ns[0];
+ tms = *localtime(&t);
+ #endif
+ gs_sprintf(buf1,
+--- a/devices/vector/gdevpsu.c
++++ b/devices/vector/gdevpsu.c
+@@ -183,6 +183,7 @@
+ fprintf(f, "%%%%Creator: %s %ld (%s)\n", gs_product, (long)gs_revision,
+ dev->dname);
+ {
++ long secs_ns[2];
+ time_t t;
+ struct tm tms;
+
+@@ -190,7 +191,8 @@
+ memset(&t, 0, sizeof(t));
+ memset(&tms, 0, sizeof(tms));
+ #else
+- time(&t);
++ gp_get_realtime(secs_ns);
++ t = secs_ns[0];
+ tms = *localtime(&t);
+ #endif
+ fprintf(f, "%%%%CreationDate: %d/%02d/%02d %02d:%02d:%02d\n",
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-03-08 19:10:24 UTC (rev 470434)
+++ PKGBUILD 2023-03-08 19:10:36 UTC (rev 470435)
@@ -1,132 +0,0 @@
-# Maintainer: AndyRTR <[email protected]>
-
-pkgbase=ghostscript
-pkgname=(ghostscript ghostxps ghostpcl)
-pkgver=10.0.0
-pkgrel=5
-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'
'poppler-data')
-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.xz
-
#https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/ghostpdl-${pkgver/.0//}/ghostpdl-${pkgver}.tar.xz
- 2010_add_build_timestamp_setting.patch)
-#
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs1000/SHA512SUMS
-sha512sums=('89b5a0bf6098c765c972aa1d1d524a4cb7682c20a87c176adb920ff7d4b92d557e1adcf8f10e8a805655c034b1966caf4b2cfc7ef5d75e5930f8ea8043011b16'
-
'cd7794ee4f28b11177021b950196385200b610127ed6cb94a45e3202b690b721a0dfcc0276ff39448d4dab64c1b31a76e6c323696a8315aad9edc22077f18a3d')
-
-
-### update jbig2dec first! ###
-
-
-prepare() {
- cd ghostpdl-${pkgver}
-
- # *** remove after final decision ***
- # new in 9.54.0:
- # https://www.ghostscript.com/doc/9.54.0/News.htm
-
- # 1) inclusion of the tesseract/leptonica sources for OCR capabilities
- # at the moment we do not support linking with tesseract/leptonica shared
libraries.
- # As is normal with such included libraries, deleting those directories and
(re)running
- # configure (on Unix like systems) will automatically build without the OCR
functionality.
- # increases package size ghostpcl 2.7->4.9MB | ghostscript 18->23MB |
ghostxps 2,7->4.9MB
- # https://www.ghostscript.com/doc/9.54.0/VectorDevices.htm#UseOCR -
- # this doesn't seem to be worth to keep enabled until linking with shared
libs is supported
- rm -r tesseract leptonica
-
- # 2) new directory addition in the source tree: "extract/".
- # It contains the implementation for the writing of docx format files used
by the
- # new "docxwrite" device. This is *not* a "thirdparty library".
- # For distribution package maintainers, if you want your packaged
Ghostscript to include
- # the "docxwrite" device, do not delete this directory.
- # ^ this one doesn't affect package size - so let's keep it
-
- # 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
-
- #
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=40dc5b409c6262b18b4bf5386b5482ead4c511e3
- # libs link unwanted to libgpdl that isn't installed
- rm -rf gpdl
-
- # Remove internal CMaps (CMaps from poppler-data are used instead)
- rm -r Resource/CMap
-
- # Debian: # allow the build timestamp to be externally set
- patch -Np1 -i ../2010_add_build_timestamp_setting.patch
-}
-
-build() {
- cd ghostpdl-${pkgver}
- ./configure --prefix=/usr \
- --with-ijs \
- --with-jbig2dec \
- --with-x \
- --with-drivers=ALL \
- --with-fontpath=/usr/share/fonts/gsfonts \
- --without-versioned-path \
- --enable-fontconfig \
- --enable-freetype \
- --enable-openjpeg \
- --with-system-libtiff \
- --with-libpaper \
- --disable-compile-inits #--help # needed for linking with
system-zlib
- make so
-}
-
-package_ghostscript() {
- optdepends=('texlive-core: needed for dvipdf'
- 'gtk3: needed for gsx')
-
- cd ghostpdl-${pkgver}
- make -j1 DESTDIR="${pkgdir}" soinstall
- # split pkg cleanup
- rm -v "${pkgdir}"/usr/bin/{gpcl6*,gxps*}
- rm -v "${pkgdir}"/usr/lib/{libgpcl6*,libgxps.so*}
-
- # gsc collides with gambit gambit-c
- mv "${pkgdir}"/usr/bin/{gsc,gs}
- ln -s gs "${pkgdir}"/usr/bin/ghostscript
- ln -s /usr/share/man/man1/gs.1.gz
"${pkgdir}"/usr/share/man/man1/ghostscript.1
-
- # remove unwanted localized manpages
- rm -rv "${pkgdir}"/usr/share/man/de
- # remove obsolete lpr bsd/Unix related files
- rm -rv "${pkgdir}"/usr/bin/{lprsetup.sh,unix-lpr.sh}
-
- # install the CMaps from poppler-data
- ln -s /usr/share/poppler/cMap "${pkgdir}"/usr/share/ghostscript/Resource/CMap
-
- install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
-}
-
-package_ghostxps() {
- pkgdesc="${pkgdesc/PostScript/XPS document}"
- depends=("ghostscript=${pkgver}-${pkgrel}")
-
- cd ghostpdl-${pkgver}
- make DESTDIR="${pkgdir}" install-gxps install-so-gxps
- rm -r "${pkgdir}"/usr/include
-
- # fix file conflict - FS#70238
- rm -r "${pkgdir}"/usr/lib/libgxps.so
-
- install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
-}
-
-package_ghostpcl() {
- pkgdesc="${pkgdesc/PostScript/PCL 6}"
- depends=("ghostscript=${pkgver}-${pkgrel}")
-
- cd ghostpdl-${pkgver}
- make DESTDIR="${pkgdir}" install-gpcl6 install-so-gpcl6
- rm -r "${pkgdir}"/usr/include
-
- install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
-}
Copied: ghostscript/repos/extra-x86_64/PKGBUILD (from rev 470434,
ghostscript/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-03-08 19:10:36 UTC (rev 470435)
@@ -0,0 +1,136 @@
+# Maintainer: AndyRTR <[email protected]>
+
+pkgbase=ghostscript
+pkgname=(ghostscript ghostxps ghostpcl)
+pkgver=10.0.0
+pkgrel=6
+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'
'poppler-data')
+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.xz
+
#https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/ghostpdl-${pkgver/.0//}/ghostpdl-${pkgver}.tar.xz
+ 2010_add_build_timestamp_setting.patch
+ 0001_Catch_and_act_on_error_code_during_PCL5_init.diff)
+#
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs1000/SHA512SUMS
+sha512sums=('89b5a0bf6098c765c972aa1d1d524a4cb7682c20a87c176adb920ff7d4b92d557e1adcf8f10e8a805655c034b1966caf4b2cfc7ef5d75e5930f8ea8043011b16'
+
'cd7794ee4f28b11177021b950196385200b610127ed6cb94a45e3202b690b721a0dfcc0276ff39448d4dab64c1b31a76e6c323696a8315aad9edc22077f18a3d'
+
'edba514969e18756b9a4f1839aea5fc77a67fa390db3ec39451b855d945bbaa27a0245cd5c2ff6d5a092fe9ddcd3185afa18fcc29bf87b3ec776d620a6e04c3b')
+
+### update jbig2dec first! ###
+
+
+prepare() {
+ cd ghostpdl-${pkgver}
+
+ # *** remove after final decision ***
+ # new in 9.54.0:
+ # https://www.ghostscript.com/doc/9.54.0/News.htm
+
+ # 1) inclusion of the tesseract/leptonica sources for OCR capabilities
+ # at the moment we do not support linking with tesseract/leptonica shared
libraries.
+ # As is normal with such included libraries, deleting those directories and
(re)running
+ # configure (on Unix like systems) will automatically build without the OCR
functionality.
+ # increases package size ghostpcl 2.7->4.9MB | ghostscript 18->23MB |
ghostxps 2,7->4.9MB
+ # https://www.ghostscript.com/doc/9.54.0/VectorDevices.htm#UseOCR -
+ # this doesn't seem to be worth to keep enabled until linking with shared
libs is supported
+ rm -r tesseract leptonica
+
+ # 2) new directory addition in the source tree: "extract/".
+ # It contains the implementation for the writing of docx format files used
by the
+ # new "docxwrite" device. This is *not* a "thirdparty library".
+ # For distribution package maintainers, if you want your packaged
Ghostscript to include
+ # the "docxwrite" device, do not delete this directory.
+ # ^ this one doesn't affect package size - so let's keep it
+
+ # 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
+
+ #
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=40dc5b409c6262b18b4bf5386b5482ead4c511e3
+ # libs link unwanted to libgpdl that isn't installed
+ rm -rf gpdl
+
+ # Remove internal CMaps (CMaps from poppler-data are used instead)
+ rm -r Resource/CMap
+
+ # Debian: # allow the build timestamp to be externally set
+ patch -Np1 -i ../2010_add_build_timestamp_setting.patch
+
+ # FS#77261 - https://bugs.ghostscript.com/show_bug.cgi?id=706360
+ patch -Np1 -i ../0001_Catch_and_act_on_error_code_during_PCL5_init.diff
+}
+
+build() {
+ cd ghostpdl-${pkgver}
+ ./configure --prefix=/usr \
+ --with-ijs \
+ --with-jbig2dec \
+ --with-x \
+ --with-drivers=ALL \
+ --with-fontpath=/usr/share/fonts/gsfonts \
+ --without-versioned-path \
+ --enable-fontconfig \
+ --enable-freetype \
+ --enable-openjpeg \
+ --with-system-libtiff \
+ --with-libpaper \
+ --disable-compile-inits #--help # needed for linking with
system-zlib
+ make so
+}
+
+package_ghostscript() {
+ optdepends=('texlive-core: needed for dvipdf'
+ 'gtk3: needed for gsx')
+
+ cd ghostpdl-${pkgver}
+ make -j1 DESTDIR="${pkgdir}" soinstall
+ # split pkg cleanup
+ rm -v "${pkgdir}"/usr/bin/{gpcl6*,gxps*}
+ rm -v "${pkgdir}"/usr/lib/{libgpcl6*,libgxps.so*}
+
+ # gsc collides with gambit gambit-c
+ mv "${pkgdir}"/usr/bin/{gsc,gs}
+ ln -s gs "${pkgdir}"/usr/bin/ghostscript
+ ln -s /usr/share/man/man1/gs.1.gz
"${pkgdir}"/usr/share/man/man1/ghostscript.1
+
+ # remove unwanted localized manpages
+ rm -rv "${pkgdir}"/usr/share/man/de
+ # remove obsolete lpr bsd/Unix related files
+ rm -rv "${pkgdir}"/usr/bin/{lprsetup.sh,unix-lpr.sh}
+
+ # install the CMaps from poppler-data
+ ln -s /usr/share/poppler/cMap "${pkgdir}"/usr/share/ghostscript/Resource/CMap
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostxps() {
+ pkgdesc="${pkgdesc/PostScript/XPS document}"
+ depends=("ghostscript=${pkgver}-${pkgrel}")
+
+ cd ghostpdl-${pkgver}
+ make DESTDIR="${pkgdir}" install-gxps install-so-gxps
+ rm -r "${pkgdir}"/usr/include
+
+ # fix file conflict - FS#70238
+ rm -r "${pkgdir}"/usr/lib/libgxps.so
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}
+
+package_ghostpcl() {
+ pkgdesc="${pkgdesc/PostScript/PCL 6}"
+ depends=("ghostscript=${pkgver}-${pkgrel}")
+
+ cd ghostpdl-${pkgver}
+ make DESTDIR="${pkgdir}" install-gpcl6 install-so-gpcl6
+ rm -r "${pkgdir}"/usr/include
+
+ install -Dt "${pkgdir}"/usr/share/licenses/${pkgname} -m644 LICENSE
+}