diff options
Diffstat (limited to 'meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb')
-rw-r--r-- | meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb b/meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb new file mode 100644 index 0000000000..1cd6bacff9 --- /dev/null +++ b/meta/recipes-extended/ghostscript/ghostscript_10.05.1.bb | |||
@@ -0,0 +1,77 @@ | |||
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 = "AGPL-3.0-or-later" | ||
14 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f98ffa763e50cded76f49bce73aade16" | ||
15 | |||
16 | DEPENDS = "tiff jpeg fontconfig cups libpng freetype zlib" | ||
17 | |||
18 | UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" | ||
19 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" | ||
20 | |||
21 | def gs_verdir(v): | ||
22 | return "".join(v.split(".")) | ||
23 | |||
24 | SRC_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${@gs_verdir("${PV}")}/${BPN}-${PV}.tar.gz \ | ||
25 | file://ghostscript-9.16-Werror-return-type.patch \ | ||
26 | file://avoid-host-contamination.patch \ | ||
27 | file://0001-Bug-708160-Fix-compatibility-with-C23-compilers.patch \ | ||
28 | " | ||
29 | |||
30 | SRC_URI[sha256sum] = "121861b6d29b2461dec6575c9f3cab665b810bd408d4ec02c86719fa708b0a49" | ||
31 | |||
32 | PACKAGECONFIG ??= "" | ||
33 | PACKAGECONFIG[gtk] = "--enable-gtk,--disable-gtk,gtk+3" | ||
34 | PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn" | ||
35 | PACKAGECONFIG[libpaper] = "--with-libpaper,--without-libpaper,libpaper" | ||
36 | PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ | ||
37 | --without-x, virtual/libx11 libxext libxt" | ||
38 | |||
39 | EXTRA_OECONF = "--with-jbig2dec \ | ||
40 | --with-fontpath=${datadir}/fonts \ | ||
41 | CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ | ||
42 | PKGCONFIG=pkg-config \ | ||
43 | " | ||
44 | |||
45 | EXTRA_OECONF:append:mipsarcho32 = " --with-large_color_index=0" | ||
46 | |||
47 | EXTRA_OECONF:append:armv7a = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
48 | EXTRA_OECONF:append:armv7ve = "${@bb.utils.contains('TUNE_FEATURES','neon','',' --disable-neon',d)}" | ||
49 | |||
50 | TARGET_CFLAGS += "-std=gnu17" | ||
51 | |||
52 | # Uses autoconf but not automake, can't do out-of-tree | ||
53 | inherit autotools-brokensep pkgconfig | ||
54 | |||
55 | # Prune the source tree of libraries that we're using our packaging of, so that | ||
56 | # ghostscript can't link to them. Can't prune zlib as that's needed for the | ||
57 | # native tools. | ||
58 | prune_sources() { | ||
59 | rm -rf ${S}/jpeg/ ${S}/libpng/ ${S}/tiff/ ${S}/expat/ ${S}/freetype/ ${S}/cups/lib | ||
60 | } | ||
61 | do_unpack[postfuncs] += "prune_sources" | ||
62 | |||
63 | do_install:append () { | ||
64 | oe_runmake DESTDIR=${D} install-so | ||
65 | oe_runmake DESTDIR=${D} install-data | ||
66 | cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/ | ||
67 | cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ | ||
68 | } | ||
69 | |||
70 | # ghostscript does not supports "arc" | ||
71 | COMPATIBLE_HOST = "^(?!arc).*" | ||
72 | |||
73 | # some entries in NVD uses gpl_ghostscript | ||
74 | CVE_PRODUCT = "ghostscript gpl_ghostscript" | ||
75 | |||
76 | CVE_STATUS[CVE-2023-38560] = "not-applicable-config: PCL isn't part of the Ghostscript release" | ||
77 | CVE_STATUS[CVE-2023-38559] = "cpe-incorrect: Issue only appears in versions before 10.02.0" | ||