diff options
author | davidovski <david@davidovski.xyz> | 2022-06-04 15:08:04 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-06-04 15:08:04 +0100 |
commit | 873665024ebfaa761ee49b508a79db7178aeb778 (patch) | |
tree | 6cd3b4ce3a9f4b0586ffa48e73a6ba4c8da2db43 /repo/ghostscript | |
parent | 4445f6e15185f58dc599390ab74df3ca19b437b7 (diff) |
added gnupg
Diffstat (limited to 'repo/ghostscript')
-rw-r--r-- | repo/ghostscript/fix-sprintf.patch | 17 | ||||
-rw-r--r-- | repo/ghostscript/ghostscript-system-zlib.patch | 14 | ||||
-rw-r--r-- | repo/ghostscript/ghostscript.xibuild | 70 |
3 files changed, 101 insertions, 0 deletions
diff --git a/repo/ghostscript/fix-sprintf.patch b/repo/ghostscript/fix-sprintf.patch new file mode 100644 index 0000000..5a06af5 --- /dev/null +++ b/repo/ghostscript/fix-sprintf.patch @@ -0,0 +1,17 @@ +diff --git a/cups/gdevcups.c b/cups/gdevcups.c +index c00e758..35b4035 100644 +--- a/cups/gdevcups.c ++++ b/cups/gdevcups.c +@@ -4353,10 +4353,10 @@ cups_set_color_info(gx_device *pdev) /* I - Device info */ + */ + + if (pdev->HWResolution[0] != pdev->HWResolution[1]) +- sprintf(resolution, "%.0fx%.0fdpi", pdev->HWResolution[0], ++ snprintf(resolution, sizeof(resolution), "%.0fx%.0fdpi", pdev->HWResolution[0], + pdev->HWResolution[1]); + else +- sprintf(resolution, "%.0fdpi", pdev->HWResolution[0]); ++ snprintf(resolution, sizeof(resolution), "%.0fdpi", pdev->HWResolution[0]); + + for (i = 0, profile = cups->PPD->profiles; + i < cups->PPD->num_profiles; diff --git a/repo/ghostscript/ghostscript-system-zlib.patch b/repo/ghostscript/ghostscript-system-zlib.patch new file mode 100644 index 0000000..ed6e42d --- /dev/null +++ b/repo/ghostscript/ghostscript-system-zlib.patch @@ -0,0 +1,14 @@ +diff --git a/base/lib.mak b/base/lib.mak +index e8ee4e7..4abaa05 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -589,7 +589,9 @@ srlx_h=$(GLSRC)srlx.h + sstring_h=$(GLSRC)sstring.h + strimpl_h=$(GLSRC)strimpl.h $(scommon_h) $(gstypes_h) $(gsstruct_h) + szlibx_h=$(GLSRC)szlibx.h ++ifneq ($(SHARE_ZLIB),1) + zlib_h=$(ZSRCDIR)$(D)zlib.h ++endif + # We have two of the following, for shared zlib (_1) + # and 'local' zlib (_0) + szlibxx_h_1=$(GLSRC)szlibxx.h $(szlibx_h) diff --git a/repo/ghostscript/ghostscript.xibuild b/repo/ghostscript/ghostscript.xibuild new file mode 100644 index 0000000..ed06538 --- /dev/null +++ b/repo/ghostscript/ghostscript.xibuild @@ -0,0 +1,70 @@ +#!/bin/sh + +NAME="ghostscript" +DESC="An interpreter for the PostScript language and for PDF" + +MAKEDEPS="make freetype openjpeg libpng zlib tiff cups jbig2dec" +DEPS="musl " + +PKG_VER=9.56.1 +SOURCE="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-$PKG_VER.tar.gz" +ADDITIONAL="ghostscript-system-zlib.patch fix-sprintf.patch " + +prepare () { + apply_patches + rm -r jpeg libpng zlib tiff lcms2mt cups/libs jbig2dec \ + freetype + + # fix parallel builds + sed -i -e 's/ECHO_XE/ECHOGS_XE/g' \ + -e 's/^\($(GLOBJ)md5.$(OBJ) :.*\)/\1 $(ECHOGS_XE)/' \ + base/lib.mak + aclocal && autoconf --force + + cd $BUILD_ROOT/ijs + libtoolize --force && aclocal && autoconf && automake --add-missing + update_config_sub +} + +build () { + # build ijs + cd "$BUILD_ROOT"/ijs + ./configure \ + --prefix=/usr \ + --enable-shared \ + --disable-static + make + + cd "$BUILD_ROOT" + + # --disable-compile-inits is needed to link with system-zlib + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --docdir=/usr/share/doc/ghostscript \ + --enable-dynamic \ + --with-system-libtiff \ + --with-ijs \ + --with-jbig2dec \ + --without-libpaper \ + --without-versioned-path \ + --enable-gtk \ + --with-drivers=ALL \ + --with-fontpath=/usr/share/fonts/Type1:/usr/share/fonts \ + --disable-compile-inits + make obj/arch.h # workaround parallel build issue + make so all +} + +package () { + make -j1 DESTDIR="$PKG_DEST" install soinstall + + cd "$BUILD_ROOT"/ijs + make -j1 DESTDIR="$PKG_DEST" install + cd .. + + # create empty dir for future fonts + mkdir -p "$PKG_DEST"/usr/share/fonts/Type1 +} |