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