summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript_9.21.bb')
-rw-r--r--meta/recipes-extended/ghostscript/ghostscript_9.21.bb117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
new file mode 100644
index 0000000000..ed0fd431a7
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -0,0 +1,117 @@
1SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
2DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \
3a back-end to a program such as ghostview, it can display PostScript and PDF \
4documents in an X11 environment. \
5\
6Furthermore, it can render PostScript and PDF files as graphics to be printed \
7on non-PostScript printers. Supported printers include common \
8dot-matrix, inkjet and laser models. \
9"
10HOMEPAGE = "http://www.ghostscript.com"
11SECTION = "console/utils"
12
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=70dc2bac4d0ce4448da873cd86b123fc"
15
16DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
17DEPENDS_class-native = "libpng-native"
18
19UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases"
20UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
21
22SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921/${BPN}-${PV}.tar.gz \
23 file://ghostscript-9.15-parallel-make.patch \
24 file://ghostscript-9.16-Werror-return-type.patch \
25 file://png_mak.patch \
26 file://do-not-check-local-libpng-source.patch \
27 file://avoid-host-contamination.patch \
28 file://mkdir-p.patch \
29"
30
31SRC_URI = "${SRC_URI_BASE} \
32 file://ghostscript-9.21-prevent_recompiling.patch \
33 file://ghostscript-9.02-genarch.patch \
34 file://objarch.h \
35 file://cups-no-gcrypt.patch \
36 file://CVE-2016-7977.patch \
37 file://CVE-2017-7207.patch \
38 file://CVE-2017-5951.patch \
39 file://CVE-2017-7975.patch \
40 file://CVE-2017-9216.patch \
41 "
42
43SRC_URI_class-native = "${SRC_URI_BASE} \
44 file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \
45 file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
46 "
47
48SRC_URI[md5sum] = "5f213281761d2750fcf27476c404d17f"
49SRC_URI[sha256sum] = "02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85"
50
51EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
52 --with-fontpath=${datadir}/fonts \
53 --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
54 --with-cups-datadir=${datadir}/cups \
55 CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \
56 "
57
58EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0"
59
60# Explicity disable libtiff, fontconfig,
61# freetype, cups for ghostscript-native
62EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
63 --without-jbig2dec \
64 --with-fontpath=${datadir}/fonts \
65 --without-libidn --disable-fontconfig \
66 --disable-freetype --disable-cups"
67
68# This has been fixed upstream but for now we need to subvert the check for time.h
69# http://bugs.ghostscript.com/show_bug.cgi?id=692443
70# http://bugs.ghostscript.com/show_bug.cgi?id=692426
71CFLAGS += "-DHAVE_SYS_TIME_H=1"
72BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
73
74inherit autotools
75
76do_configure_prepend () {
77 mkdir -p obj
78 mkdir -p soobj
79 if [ -e ${WORKDIR}/objarch.h ]; then
80 cp ${WORKDIR}/objarch.h obj/arch.h
81 fi
82}
83
84do_configure_append () {
85 # copy tools from the native ghostscript build
86 if [ "${PN}" != "ghostscript-native" ]; then
87 mkdir -p obj/aux soobj
88 for i in genarch genconf mkromfs echogs gendev genht; do
89 cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
90 done
91 fi
92}
93
94do_install_append () {
95 mkdir -p ${D}${datadir}/ghostscript/${PV}/
96 cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
97 cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
98}
99
100do_compile_class-native () {
101 mkdir -p obj
102 for i in genarch genconf mkromfs echogs gendev genht; do
103 oe_runmake obj/aux/$i
104 done
105}
106
107do_install_class-native () {
108 install -d ${D}${bindir}/ghostscript-${PV}
109 for i in genarch genconf mkromfs echogs gendev genht; do
110 install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
111 done
112}
113
114BBCLASSEXTEND = "native"
115
116# ghostscript does not supports "arc"
117COMPATIBLE_HOST = "^(?!arc).*"