summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch3
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch42
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch37
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/do-not-check-local-libpng-source.patch31
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch28
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch47
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch50
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb97
8 files changed, 21 insertions, 314 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
index e8cb16c36b..15c7eb5a77 100644
--- a/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
+++ b/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch
@@ -5,8 +5,7 @@ Subject: [PATCH 04/10] avoid host contamination
5 5
6Remove hardcode path refer to host to avoid host contamination. 6Remove hardcode path refer to host to avoid host contamination.
7 7
8Upstream-Status: Inappropriate [embedded specific] 8Upstream-Status: Pending
9
10Signed-off-by: Kai Kang <kai.kang@windriver.com> 9Signed-off-by: Kai Kang <kai.kang@windriver.com>
11 10
12Rebase to 9.23 11Rebase to 9.23
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 @@
1From 9ca6f795409b988d38dd98bc2a6ecb68a9392312 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 29 Mar 2018 16:37:40 +0800
4Subject: [PATCH 10/10] base/genht.c: add a preprocessor define to allow fopen
5 calling
6
7The commit in upstream:
8http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643
9
10Replace all fopen calls with gp_fopen and add a preprocessor define so
11that any unintential calls directly to fopen will cause an error.
12
13Only exceptions are those in the platform specific code, and mkromfs.c.
14This patch add a preprocessor define to allow fopen calling in
15base/genht.c.
16
17Upstream-Status: Pending
18
19Rebase to 9.23
20Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21---
22 base/genht.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/base/genht.c b/base/genht.c
26index e597e72..e96bfb5 100644
27--- a/base/genht.c
28+++ b/base/genht.c
29@@ -16,6 +16,10 @@
30
31 /* Generate C code for compiling halftones into ROM. */
32 #include "malloc_.h"
33+
34+/* prevent gp.h from defining fopen */
35+#define fopen fopen
36+
37 #include "stdio_.h"
38 #include "string_.h"
39 #include "gscdefs.h"
40--
411.8.3.1
42
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 @@
1From 9129eb7fa9dc160d64a7d9df9279a3b1dae4d793 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Thu, 29 Mar 2018 16:16:18 +0800
4Subject: [PATCH 08/10] cups no gcrypt
5
6Don't build-depend on libgcrypt, as nothing is used from it
7
8Backported from
9http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch
10
11This addresses the cryto dependency seen during build.
12
13Upstream-Status: Backport
14
15Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
16
17Rebase to 9.23
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19---
20 cups/libs/cups/http-private.h | 1 -
21 1 file changed, 1 deletion(-)
22
23diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h
24index 99a85c3..a674852 100644
25--- a/cups/libs/cups/http-private.h
26+++ b/cups/libs/cups/http-private.h
27@@ -80,7 +80,6 @@ typedef int socklen_t;
28 # elif defined HAVE_GNUTLS
29 # include <gnutls/gnutls.h>
30 # include <gnutls/x509.h>
31-# include <gcrypt.h>
32 # elif defined(HAVE_CDSASSL)
33 # include <CoreFoundation/CoreFoundation.h>
34 # include <Security/Security.h>
35--
361.8.3.1
37
diff --git a/meta/recipes-extended/ghostscript/ghostscript/do-not-check-local-libpng-source.patch b/meta/recipes-extended/ghostscript/ghostscript/do-not-check-local-libpng-source.patch
deleted file mode 100644
index 13e71c824f..0000000000
--- a/meta/recipes-extended/ghostscript/ghostscript/do-not-check-local-libpng-source.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 108a7d3f79af8c669af129bd87401402e76edfa9 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 18 Jan 2016 01:00:30 -0500
4Subject: [PATCH] configure.ac: do not check local png source
5
6In oe-core, it did not need to compile local libpng
7source in ghostscript, so do not check local png
8source, and directly check the existance of shared
9libpng library.
10
11Upstream-Status: Inappropriate [OE-Core specific]
12
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14
15---
16 configure.ac | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index bb57825..389c473 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -1441,7 +1441,7 @@ else
24 PNGDEVS=''
25 PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha png16malpha'
26 AC_MSG_CHECKING([for local png library source])
27- if test -f $srcdir/libpng/pngread.c; then
28+ if false; then
29 AC_MSG_RESULT([yes])
30 SHARE_LIBPNG=0
31 LIBPNGDIR=$srcdir/libpng
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 @@
1From 04a86a613e0f9bfbbad99874f72217f75e8c53a3 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 29 Mar 2018 15:59:05 +0800
4Subject: [PATCH] contrib.mak: fix for parallel build
5
6Upstream-Status: Pending
7
8Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
9
10Rebase to 9.23
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12
13---
14 contrib/contrib.mak | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/contrib/contrib.mak b/contrib/contrib.mak
18index 2edee7a..c9100e8 100644
19--- a/contrib/contrib.mak
20+++ b/contrib/contrib.mak
21@@ -1241,6 +1241,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \
22 ### ----------------- Additional .upp files ---------------- ###
23
24 extra-upp-install: install-libdata
25+ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib
26 for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \
27 $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \
28 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 @@
1From 0124b1c29b9cfe46d73ae82ce023dd7c5b055744 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 29 Mar 2018 16:36:12 +0800
4Subject: [PATCH 09/10] ghostscript-native:fix disable-system-libtiff
5
6Modify configure to add the check to make sure
7ghostscrip could work while system-libtiff is
8disabled.
9
10Upstream-Status: Pending
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13
14Rebase to ghostscript 9.25.
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
18---
19 configure.ac | 5 +++++
20 1 file changed, 5 insertions(+)
21
22diff --git a/configure.ac b/configure.ac
23index 80a60b1..f3e9efb 100644
24--- a/configure.ac
25+++ b/configure.ac
26@@ -1319,6 +1319,7 @@ AC_TRY_COMPILE([], [return 0;],
27 CFLAGS=$CGLAGS_STORE
28
29 if test x"$SHARE_LIBTIFF" = x"0" ; then
30+ if test -e $LIBTIFFDIR/configure; then
31 echo "Running libtiff configure script..."
32 olddir=`pwd`
33 if ! test -d "$LIBTIFFCONFDIR" ; then
34@@ -1337,6 +1338,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then
35
36 echo
37 echo "Continuing with Ghostscript configuration..."
38+ else
39+ AC_MSG_NOTICE([Could not find local copy of libtiff.
40+Disabling tiff output devices.])
41+ fi
42 fi
43
44 AC_SUBST(SHARE_LIBTIFF)
45--
461.8.3.1
47
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 @@
1From 2b23026f8e2a352417fb1c4da94bf69b19bef267 Mon Sep 17 00:00:00 2001
2From: Joe Slater <joe.slater@windriver.com>
3Date: Thu, 29 Mar 2018 16:04:32 +0800
4Subject: [PATCH 05/10] ghostscript: allow directories to be created more than
5 once
6
7When doing parallel builds, we might try to create directories
8more than once. This should not cause an error.
9
10Upstream-Status: Pending
11
12Signed-off-by: Joe Slater <joe.slater@windriver.com>
13
14Rebase to 9.23
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16---
17 base/unix-end.mak | 17 ++++++++---------
18 1 file changed, 8 insertions(+), 9 deletions(-)
19
20diff --git a/base/unix-end.mak b/base/unix-end.mak
21index 9ce599a..feff5a6 100644
22--- a/base/unix-end.mak
23+++ b/base/unix-end.mak
24@@ -17,15 +17,14 @@
25 UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES)
26 # Define the rule for building standard configurations.
27 directories: $(UNIX_END_MAK)
28- @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir $(BINDIR); fi
29- @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi
30- @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi
31- @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir $(DEVGENDIR); fi
32- @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir $(DEVOBJDIR); fi
33- @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir $(AUXDIR); fi
34- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi
35- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi
36- @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi
37+ @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir -p $(BINDIR); fi
38+ @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi
39+ @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi
40+ @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p $(DEVGENDIR); fi
41+ @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p $(DEVOBJDIR); fi
42+ @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir -p $(AUXDIR); fi
43+ @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p $(PSGENDIR)/cups; fi
44+ @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi
45
46
47 gs: .gssubtarget $(UNIX_END_MAK)
48--
491.8.3.1
50
diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb b/meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb
index 5d4b8cdc91..f03ebf4478 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb
@@ -13,91 +13,50 @@ SECTION = "console/utils"
13LICENSE = "GPL-3.0-only" 13LICENSE = "GPL-3.0-only"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=f98ffa763e50cded76f49bce73aade16" 14LIC_FILES_CHKSUM = "file://LICENSE;md5=f98ffa763e50cded76f49bce73aade16"
15 15
16DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng" 16DEPENDS = "tiff jpeg fontconfig cups libpng freetype zlib"
17DEPENDS:class-native = "libpng-native"
18 17
19UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" 18UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
20UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" 19UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
21 20
22# As of ghostscript 9.54.0 the jpeg issue in the CVE is present in the gs jpeg sources 21# We use a system libjpeg-turbo which has this fix
23# however we use an external jpeg which doesn't have the issue.
24CVE_CHECK_IGNORE += "CVE-2013-6629" 22CVE_CHECK_IGNORE += "CVE-2013-6629"
25 23
26def gs_verdir(v): 24def gs_verdir(v):
27 return "".join(v.split(".")) 25 return "".join(v.split("."))
28 26
29 27
30SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \ 28SRC_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \
31 file://ghostscript-9.15-parallel-make.patch \ 29 file://ghostscript-9.16-Werror-return-type.patch \
32 file://ghostscript-9.16-Werror-return-type.patch \ 30 file://avoid-host-contamination.patch \
33 file://do-not-check-local-libpng-source.patch \
34 file://avoid-host-contamination.patch \
35 file://mkdir-p.patch \
36" 31"
37 32
38SRC_URI = "${SRC_URI_BASE} \
39 file://cups-no-gcrypt.patch \
40 "
41
42SRC_URI:class-native = "${SRC_URI_BASE} \
43 file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \
44 file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
45 "
46
47SRC_URI[sha256sum] = "4df18a808cd4369f25e02dbcec2f133cb6d674627b2c6b1502020e58d43e32ce" 33SRC_URI[sha256sum] = "4df18a808cd4369f25e02dbcec2f133cb6d674627b2c6b1502020e58d43e32ce"
48 34
49# Put something like 35PACKAGECONFIG ??= ""
50# 36PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3"
51# PACKAGECONFIG:append:pn-ghostscript = " x11" 37PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
52# 38PACKAGECONFIG[libpaper] = "--with-libpaper,--without-libpaper,libpaper"
53# in local.conf to enable building with X11. Be careful. The order
54# of the overrides matters!
55#
56#PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
57PACKAGECONFIG:class-native = ""
58
59PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ 39PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \
60 --without-x, virtual/libx11 libxext libxt gtk+3\ 40 --without-x, virtual/libx11 libxext libxt"
61 "
62 41
63EXTRA_OECONF = "--without-libpaper --with-system-libtiff --with-jbig2dec \ 42EXTRA_OECONF = "--with-jbig2dec \
64 --with-fontpath=${datadir}/fonts \ 43 --with-fontpath=${datadir}/fonts \
65 --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
66 --with-cups-datadir=${datadir}/cups \
67 CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ 44 CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
45 PKGCONFIG=pkg-config \
68 " 46 "
69 47
70EXTRA_OECONF:append:mipsarcho32 = " --with-large_color_index=0" 48EXTRA_OECONF:append:mipsarcho32 = " --with-large_color_index=0"
71 49
72# Explicity disable libtiff, fontconfig, 50# Uses autoconf but not automake, can't do out-of-tree
73# freetype, cups for ghostscript-native 51inherit autotools-brokensep pkgconfig
74EXTRA_OECONF:class-native = "--without-x --with-system-libtiff=no \
75 --without-libpaper \
76 --with-fontpath=${datadir}/fonts \
77 --without-libidn --disable-fontconfig \
78 --enable-freetype --disable-cups "
79
80# This has been fixed upstream but for now we need to subvert the check for time.h
81# http://bugs.ghostscript.com/show_bug.cgi?id=692443
82# http://bugs.ghostscript.com/show_bug.cgi?id=692426
83CFLAGS += "-DHAVE_SYS_TIME_H=1"
84BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
85
86inherit autotools-brokensep
87
88do_configure:prepend:class-target () {
89 rm -rf ${S}/jpeg/
90}
91 52
92do_configure:append () { 53# Prune the source tree of libraries that we're using our packaging of, so that
93 # copy tools from the native ghostscript build 54# ghostscript can't link to them. Can't prune zlib as that's needed for the
94 if [ "${PN}" != "ghostscript-native" ]; then 55# native tools.
95 mkdir -p obj/aux soobj 56prune_sources() {
96 for i in genarch genconf mkromfs echogs gendev genht packps; do 57 rm -rf ${S}/jpeg/ ${S}/libpng/ ${S}/tiff/ ${S}/expat/ ${S}/freetype/ ${S}/cups/lib
97 cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
98 done
99 fi
100} 58}
59do_unpack[postfuncs] += "prune_sources"
101 60
102do_install:append () { 61do_install:append () {
103 mkdir -p ${D}${datadir}/ghostscript/${PV}/ 62 mkdir -p ${D}${datadir}/ghostscript/${PV}/
@@ -105,22 +64,6 @@ do_install:append () {
105 cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ 64 cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
106} 65}
107 66
108do_compile:class-native () {
109 mkdir -p obj
110 for i in genarch genconf mkromfs echogs gendev genht packps; do
111 oe_runmake obj/aux/$i
112 done
113}
114
115do_install:class-native () {
116 install -d ${D}${bindir}/ghostscript-${PV}
117 for i in genarch genconf mkromfs echogs gendev genht packps; do
118 install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
119 done
120}
121
122BBCLASSEXTEND = "native"
123
124# ghostscript does not supports "arc" 67# ghostscript does not supports "arc"
125COMPATIBLE_HOST = "^(?!arc).*" 68COMPATIBLE_HOST = "^(?!arc).*"
126 69