diff options
Diffstat (limited to 'meta/recipes-extended/ghostscript')
10 files changed, 80 insertions, 447 deletions
diff --git a/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch deleted file mode 100644 index a9afb9948c..0000000000 --- a/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2adaa7366064a8f18af864eda74e52877a89620c Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Mon, 18 Jan 2016 01:00:30 -0500 -Subject: [PATCH] configure.ac: do not check local png source - -In oe-core, it did not need to compile local libpng -source in ghostscript, so do not check local png -source, and directly check the existance of shared -libpng library. - -Upstream-Status: Inappropriate [OE-Core specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 698abd3..e65ac8b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1241,7 +1241,7 @@ else - PNGDEVS='' - PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha' - AC_MSG_CHECKING([for local png library source]) -- if test -f $srcdir/libpng/pngread.c; then -+ if false; then - AC_MSG_RESULT([yes]) - SHARE_LIBPNG=0 - LIBPNGDIR=$srcdir/libpng diff --git a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch index e8cb16c36b..67f14bd368 100644 --- a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch +++ b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch @@ -1,12 +1,11 @@ -From 0ccbaa134093bf6afc79f2d20d061bca5a8754ed Mon Sep 17 00:00:00 2001 +From b36713c8f1ba0e5755b78845a433354a63663b1a Mon Sep 17 00:00:00 2001 From: Kai Kang <kai.kang@windriver.com> Date: Thu, 29 Mar 2018 16:02:05 +0800 -Subject: [PATCH 04/10] avoid host contamination +Subject: [PATCH] avoid host contamination Remove hardcode path refer to host to avoid host contamination. -Upstream-Status: Inappropriate [embedded specific] - +Upstream-Status: Pending Signed-off-by: Kai Kang <kai.kang@windriver.com> Rebase to 9.23 @@ -16,10 +15,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/devs.mak b/devices/devs.mak -index 846aa50..9570182 100644 +index 186f704..88ab8c9 100644 --- a/devices/devs.mak +++ b/devices/devs.mak -@@ -393,7 +393,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ +@@ -397,7 +397,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) @@ -28,6 +27,3 @@ index 846aa50..9570182 100644 ###### --------------- Memory-buffered printer devices --------------- ###### --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch deleted file mode 100644 index 7d80066a80..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 9ca6f795409b988d38dd98bc2a6ecb68a9392312 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 29 Mar 2018 16:37:40 +0800 -Subject: [PATCH 10/10] base/genht.c: add a preprocessor define to allow fopen - calling - -The commit in upstream: -http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 - -Replace all fopen calls with gp_fopen and add a preprocessor define so -that any unintential calls directly to fopen will cause an error. - -Only exceptions are those in the platform specific code, and mkromfs.c. -This patch add a preprocessor define to allow fopen calling in -base/genht.c. - -Upstream-Status: Pending - -Rebase to 9.23 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - base/genht.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/base/genht.c b/base/genht.c -index e597e72..e96bfb5 100644 ---- a/base/genht.c -+++ b/base/genht.c -@@ -16,6 +16,10 @@ - - /* Generate C code for compiling halftones into ROM. */ - #include "malloc_.h" -+ -+/* prevent gp.h from defining fopen */ -+#define fopen fopen -+ - #include "stdio_.h" - #include "string_.h" - #include "gscdefs.h" --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch deleted file mode 100644 index 4c9bb22fa2..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 9129eb7fa9dc160d64a7d9df9279a3b1dae4d793 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Thu, 29 Mar 2018 16:16:18 +0800 -Subject: [PATCH 08/10] cups no gcrypt - -Don't build-depend on libgcrypt, as nothing is used from it - -Backported from -http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch - -This addresses the cryto dependency seen during build. - -Upstream-Status: Backport - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> - -Rebase to 9.23 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - cups/libs/cups/http-private.h | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h -index 99a85c3..a674852 100644 ---- a/cups/libs/cups/http-private.h -+++ b/cups/libs/cups/http-private.h -@@ -80,7 +80,6 @@ typedef int socklen_t; - # elif defined HAVE_GNUTLS - # include <gnutls/gnutls.h> - # include <gnutls/x509.h> --# include <gcrypt.h> - # elif defined(HAVE_CDSASSL) - # include <CoreFoundation/CoreFoundation.h> - # include <Security/Security.h> --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch deleted file mode 100644 index 5b57da2a97..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 04a86a613e0f9bfbbad99874f72217f75e8c53a3 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Thu, 29 Mar 2018 15:59:05 +0800 -Subject: [PATCH] contrib.mak: fix for parallel build - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - -Rebase to 9.23 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - contrib/contrib.mak | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/contrib/contrib.mak b/contrib/contrib.mak -index 2edee7a..c9100e8 100644 ---- a/contrib/contrib.mak -+++ b/contrib/contrib.mak -@@ -1241,6 +1241,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ - ### ----------------- Additional .upp files ---------------- ### - - extra-upp-install: install-libdata -+ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib - for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \ - $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \ - done diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch deleted file mode 100644 index a382c7f891..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0124b1c29b9cfe46d73ae82ce023dd7c5b055744 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 29 Mar 2018 16:36:12 +0800 -Subject: [PATCH 09/10] ghostscript-native:fix disable-system-libtiff - -Modify configure to add the check to make sure -ghostscrip could work while system-libtiff is -disabled. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - -Rebase to ghostscript 9.25. - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - configure.ac | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 80a60b1..f3e9efb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1319,6 +1319,7 @@ AC_TRY_COMPILE([], [return 0;], - CFLAGS=$CGLAGS_STORE - - if test x"$SHARE_LIBTIFF" = x"0" ; then -+ if test -e $LIBTIFFDIR/configure; then - echo "Running libtiff configure script..." - olddir=`pwd` - if ! test -d "$LIBTIFFCONFDIR" ; then -@@ -1337,6 +1338,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then - - echo - echo "Continuing with Ghostscript configuration..." -+ else -+ AC_MSG_NOTICE([Could not find local copy of libtiff. -+Disabling tiff output devices.]) -+ fi - fi - - AC_SUBST(SHARE_LIBTIFF) --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch deleted file mode 100644 index c76915fb81..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 239d681306a8d97ed10954788d32ba2f4b55f77c Mon Sep 17 00:00:00 2001 -From: Kang Kai <kai.kang@windriver.com> -Date: Thu, 29 Mar 2018 16:10:16 +0800 -Subject: [PATCH 06/10] prevent recompiling - -Just use commands provided by ghostscript-native, preventing recompile -them when compile ghostscript. Way to enable cross compile. - -Upstream-Status: Pending - -Signed-off-by: Kang Kai <kai.kang@windriver.com> -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> - -Rebase to 9.25 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> -Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> ---- - base/unix-aux.mak | 44 -------------------------------------------- - 1 file changed, 44 deletions(-) - -diff --git a/base/unix-aux.mak b/base/unix-aux.mak -index 5bf72e9..9cb39d7 100644 ---- a/base/unix-aux.mak -+++ b/base/unix-aux.mak -@@ -54,50 +54,6 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia. - $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h) $(UNIX_AUX_MAK) $(MAKEDIRS) - $(GLCCAUX) $(AUXO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c - --# -------------------------- Auxiliary programs --------------------------- # -- --$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) -- --$(PACKPS_XE): $(GLSRC)pack_ps.c $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(PACKPS_XE) $(GLSRC)pack_ps.c $(AUXEXTRALIBS) -- --# On the RS/6000 (at least), compiling genarch.c with gcc with -O --# produces a buggy executable. --$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) -- --$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) -- --$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) -- --$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) -- --# To get GS to use the system zlib, you remove/hide the gs/zlib directory --# which means that the mkromfs build can't find the zlib source it needs. --# So it's split into two targets, one using the zlib source directly..... --MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) -- --$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) -- --# .... and one using the zlib library linked via the command line --MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ -- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ -- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ -- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) -- --$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) -- --$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) -- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) -- - # Query the environment to construct gconfig_.h. - # These are all defined conditionally (except the JasPER one), so that - # they can be overridden by settings from the configure script. --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch b/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch deleted file mode 100644 index 3e6d3e3c48..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2b23026f8e2a352417fb1c4da94bf69b19bef267 Mon Sep 17 00:00:00 2001 -From: Joe Slater <joe.slater@windriver.com> -Date: Thu, 29 Mar 2018 16:04:32 +0800 -Subject: [PATCH 05/10] ghostscript: allow directories to be created more than - once - -When doing parallel builds, we might try to create directories -more than once. This should not cause an error. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - -Rebase to 9.23 -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - base/unix-end.mak | 17 ++++++++--------- - 1 file changed, 8 insertions(+), 9 deletions(-) - -diff --git a/base/unix-end.mak b/base/unix-end.mak -index 9ce599a..feff5a6 100644 ---- a/base/unix-end.mak -+++ b/base/unix-end.mak -@@ -17,15 +17,14 @@ - UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES) - # Define the rule for building standard configurations. - directories: $(UNIX_END_MAK) -- @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir $(BINDIR); fi -- @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi -- @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi -- @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir $(DEVGENDIR); fi -- @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir $(DEVOBJDIR); fi -- @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir $(AUXDIR); fi -- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi -- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi -- @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi -+ @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir -p $(BINDIR); fi -+ @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi -+ @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi -+ @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p $(DEVGENDIR); fi -+ @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p $(DEVOBJDIR); fi -+ @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir -p $(AUXDIR); fi -+ @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p $(PSGENDIR)/cups; fi -+ @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi - - - gs: .gssubtarget $(UNIX_END_MAK) --- -1.8.3.1 - diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.03.1.bb b/meta/recipes-extended/ghostscript/ghostscript_10.03.1.bb new file mode 100644 index 0000000000..0504f5244f --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript_10.03.1.bb @@ -0,0 +1,75 @@ +SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter" +DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \ +a back-end to a program such as ghostview, it can display PostScript and PDF \ +documents in an X11 environment. \ +\ +Furthermore, it can render PostScript and PDF files as graphics to be printed \ +on non-PostScript printers. Supported printers include common \ +dot-matrix, inkjet and laser models. \ +" +HOMEPAGE = "http://www.ghostscript.com" +SECTION = "console/utils" + +LICENSE = "AGPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f98ffa763e50cded76f49bce73aade16" + +DEPENDS = "tiff jpeg fontconfig cups libpng freetype zlib" + +UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" + +def gs_verdir(v): + return "".join(v.split(".")) + + +SRC_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \ + file://ghostscript-9.16-Werror-return-type.patch \ + file://avoid-host-contamination.patch \ + " + +SRC_URI[sha256sum] = "31cd01682ad23a801cc3bbc222a55f07c4ea3e068bdfb447792d54db21a2e8ad" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3" +PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn" +PACKAGECONFIG[libpaper] = "--with-libpaper,--without-libpaper,libpaper" +PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ + --without-x, virtual/libx11 libxext libxt" + +EXTRA_OECONF = "--with-jbig2dec \ + --with-fontpath=${datadir}/fonts \ + CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ + PKGCONFIG=pkg-config \ + " + +EXTRA_OECONF:append:mipsarcho32 = " --with-large_color_index=0" + +EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" +EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" + +# Uses autoconf but not automake, can't do out-of-tree +inherit autotools-brokensep pkgconfig + +# Prune the source tree of libraries that we're using our packaging of, so that +# ghostscript can't link to them. Can't prune zlib as that's needed for the +# native tools. +prune_sources() { + rm -rf ${S}/jpeg/ ${S}/libpng/ ${S}/tiff/ ${S}/expat/ ${S}/freetype/ ${S}/cups/lib +} +do_unpack[postfuncs] += "prune_sources" + +do_install:append () { + oe_runmake DESTDIR=${D} install-so + oe_runmake DESTDIR=${D} install-data + cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/ + cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ +} + +# ghostscript does not supports "arc" +COMPATIBLE_HOST = "^(?!arc).*" + +# some entries in NVD uses gpl_ghostscript +CVE_PRODUCT = "ghostscript gpl_ghostscript" + +CVE_STATUS[CVE-2023-38560] = "not-applicable-config: PCL isn't part of the Ghostscript release" +CVE_STATUS[CVE-2023-38559] = "cpe-incorrect: Issue only appears in versions before 10.02.0" diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.53.3.bb b/meta/recipes-extended/ghostscript/ghostscript_9.53.3.bb deleted file mode 100644 index cbf60c8c85..0000000000 --- a/meta/recipes-extended/ghostscript/ghostscript_9.53.3.bb +++ /dev/null @@ -1,125 +0,0 @@ -SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter" -DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \ -a back-end to a program such as ghostview, it can display PostScript and PDF \ -documents in an X11 environment. \ -\ -Furthermore, it can render PostScript and PDF files as graphics to be printed \ -on non-PostScript printers. Supported printers include common \ -dot-matrix, inkjet and laser models. \ -" -HOMEPAGE = "http://www.ghostscript.com" -SECTION = "console/utils" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://LICENSE;md5=70dc2bac4d0ce4448da873cd86b123fc" - -DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng" -DEPENDS_class-native = "libpng-native" - -UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" -UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" - -def gs_verdir(v): - return "".join(v.split(".")) - - -SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \ - file://ghostscript-9.15-parallel-make.patch \ - file://ghostscript-9.16-Werror-return-type.patch \ - file://do-not-check-local-libpng-source.patch \ - file://avoid-host-contamination.patch \ - file://mkdir-p.patch \ -" - -SRC_URI = "${SRC_URI_BASE} \ - file://ghostscript-9.21-prevent_recompiling.patch \ - file://cups-no-gcrypt.patch \ - " - -SRC_URI_class-native = "${SRC_URI_BASE} \ - file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \ - file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ - " - -SRC_URI[sha256sum] = "6eaf422f26a81854a230b80fd18aaef7e8d94d661485bd2e97e695b9dce7bf7f" - -# Put something like -# -# PACKAGECONFIG_append_pn-ghostscript = " x11" -# -# in local.conf to enable building with X11. Be careful. The order -# of the overrides matters! -# -#PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" -PACKAGECONFIG_class-native = "" - -PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ - --without-x, virtual/libx11 libxext libxt gtk+3\ - " - -EXTRA_OECONF = "--without-libpaper --with-system-libtiff --without-jbig2dec \ - --with-fontpath=${datadir}/fonts \ - --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ - --with-cups-datadir=${datadir}/cups \ - CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ - " - -EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0" - -# Explicity disable libtiff, fontconfig, -# freetype, cups for ghostscript-native -EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ - --without-jbig2dec --without-libpaper \ - --with-fontpath=${datadir}/fonts \ - --without-libidn --disable-fontconfig \ - --enable-freetype --disable-cups " - -# This has been fixed upstream but for now we need to subvert the check for time.h -# http://bugs.ghostscript.com/show_bug.cgi?id=692443 -# http://bugs.ghostscript.com/show_bug.cgi?id=692426 -CFLAGS += "-DHAVE_SYS_TIME_H=1" -BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" - -inherit autotools-brokensep - -do_configure_prepend_class-target () { - rm -rf ${S}/jpeg/ -} - -do_configure_append () { - # copy tools from the native ghostscript build - if [ "${PN}" != "ghostscript-native" ]; then - mkdir -p obj/aux soobj - for i in genarch genconf mkromfs echogs gendev genht packps; do - cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i - done - fi -} - -do_install_append () { - mkdir -p ${D}${datadir}/ghostscript/${PV}/ - cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/ - cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ -} - -do_compile_class-native () { - mkdir -p obj - for i in genarch genconf mkromfs echogs gendev genht packps; do - oe_runmake obj/aux/$i - done -} - -do_install_class-native () { - install -d ${D}${bindir}/ghostscript-${PV} - for i in genarch genconf mkromfs echogs gendev genht packps; do - install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i - done -} - -BBCLASSEXTEND = "native" - -# ghostscript does not supports "arc" -COMPATIBLE_HOST = "^(?!arc).*" - -# some entries in NVD uses gpl_ghostscript -CVE_PRODUCT = "ghostscript gpl_ghostscript" |