Files
poky/meta/recipes-extended/ghostscript/ghostscript_10.01.1.bb
Ross Burton 6a7a4e40d5 ghostscript: mostly rewrite recipe
This started as a patch cleanup but escalated rapidly.

Remove unneeded patches:
- mkdir-p.patch isn't needed now the Makefiles appear to have the correct
  dependencies.
- ghostscript-9.15-parallel-make.patch appears to be unneeded for the same
  reason
- base-genht.c-add-a-preprocessor-define-to-allow-fope.patch isn't needed
- cups-no-gcrypt.patch isn't needed
- do-not-check-local-libpng-source.patch can be replaced by deleting
  the libpng/ directory, as is already done for jpeg/
- ghostscript-9.21-native-fix-disable-system-libtiff.patch is not needed
  when we stop doing native builds (see below)

Remove the need for ghostscript-native to build and install tools that
are needed at target build-time: ghostscript can do this itself.  Remove
the BBCLASSEXTEND and all of the native overrides.

Inherit pkgconfig and explicitly tell configure to use the pkgconfig
binary: unless told otherwise this configure will refuse to use an
unprefixed pkgconfig in cross builds.

Review DEPENDS and add missing freetype and zlib dependencies.

Ghostcript will use the embedded copies of libraries over system
libraries, so extend the deletion of jpeg and libpng to include expat,
freetype, and cups as we want to link to our build of those. We can't
delete zlib as it is explicitly used when building the native tools.

Add PACKAGECONFIGs for optional libidn and libpaper dependencies.

Remove HAVE_SYS_TIME_H assignments, the upstream bug was fixed in 2011.

Clean up comments: there's no need to explain how to use PACKAGECONFIG,
and justify the use of autotools-brokensep.

(From OE-Core rev: b62e6d676ce2075a52eea729957f186cfb3bd42b)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-20 23:24:26 +01:00

72 lines
2.6 KiB
BlitzBasic

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 = "GPL-3.0-only"
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"
# We use a system libjpeg-turbo which has this fix
CVE_CHECK_IGNORE += "CVE-2013-6629"
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] = "4df18a808cd4369f25e02dbcec2f133cb6d674627b2c6b1502020e58d43e32ce"
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"
# 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 () {
mkdir -p ${D}${datadir}/ghostscript/${PV}/
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"