blob: 22de3d54412725047aeb8dfe6c0934b8ace2a614 [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001DESCRIPTION = "CUPS backends, filters, and other software"
2HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters"
3
Andrew Geissler9aee5002022-03-30 16:27:02 +00004LICENSE = "GPL-2.0-only & LGPL-2.0-only & MIT & GPL-2.0-or-later & GPL-3.0-only"
Andrew Geissler595f6302022-01-24 19:11:47 +00005LIC_FILES_CHKSUM = "file://COPYING;md5=2d77679ce6a2cc4d873d4ebbf2a401e6"
Brad Bishope42b3e32020-01-15 22:08:42 -05006
7SECTION = "console/utils"
8
Patrick Williams864cc432023-02-09 14:54:44 -06009DEPENDS = "cups glib-2.0 glib-2.0-native dbus dbus-glib lcms ghostscript poppler qpdf libpng libexif"
Patrick Williams213cb262021-08-07 19:21:33 -050010DEPENDS:class-native = "poppler-native glib-2.0-native dbus-native pkgconfig-native gettext-native libpng-native"
Brad Bishope42b3e32020-01-15 22:08:42 -050011
Patrick Williams864cc432023-02-09 14:54:44 -060012SRC_URI = "https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \
13 file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch"
14SRC_URI[sha256sum] = "270a3752a960368aa99d431fb5d34f4039b2ac943c576d840612d1d8185c9bb9"
Brad Bishope42b3e32020-01-15 22:08:42 -050015
Patrick Williams864cc432023-02-09 14:54:44 -060016inherit autotools-brokensep gettext pkgconfig github-releases
Brad Bishope42b3e32020-01-15 22:08:42 -050017
18EXTRA_OECONF += " --enable-ghostscript --disable-ldap \
19 --with-pdftops=hybrid --enable-imagefilters \
20 --enable-ghostscript --with-gs-path=${bindir}/gs \
21 --with-pdftops-path=${bindir}/gs \
22 --with-fontdir=${datadir}/fonts --with-rcdir=no \
23 --with-cups-rundir=${localstatedir}/run/cups \
24 --localstatedir=${localstatedir}/var \
25 --with-rcdir=no \
26 --without-php"
27
Patrick Williams213cb262021-08-07 19:21:33 -050028EXTRA_OECONF:class-native += " --with-pdftops=pdftops \
Brad Bishope42b3e32020-01-15 22:08:42 -050029 --disable-avahi --disable-ghostscript \
30 --disable-ldap \
31 --with-png --without-jpeg --without-tiff"
32
33BBCLASSEXTEND = "native"
34
35PACKAGECONFIG[jpeg] = "--with-jpeg,--without-jpeg,jpeg"
36PACKAGECONFIG[png] = "--with-png,--without-png,libpng"
37PACKAGECONFIG[tiff] = "--with-tiff,--without-tiff,tiff"
38
Andrew Geisslerc5535c92023-01-27 16:10:19 -060039PACKAGECONFIG ??= "dbus ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)}"
Brad Bishope42b3e32020-01-15 22:08:42 -050040
41PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
Andrew Geisslerc5535c92023-01-27 16:10:19 -060042PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,,dbus"
Brad Bishope42b3e32020-01-15 22:08:42 -050043
44DIRFILES = "1"
45
46PACKAGES =+ "\
47 ${PN}-gst \
48 ${PN}-data \
49 "
50
Patrick Williams213cb262021-08-07 19:21:33 -050051FILES:${PN}-gst = "\
Brad Bishop0e2770c2020-01-21 07:31:46 -050052 ${libexecdir}/cups/filter/gsto* \
Brad Bishope42b3e32020-01-15 22:08:42 -050053 "
54
Patrick Williams213cb262021-08-07 19:21:33 -050055FILES:${PN}-data = "\
Brad Bishope42b3e32020-01-15 22:08:42 -050056 ${datadir}/cups/data \
57 "
58
Patrick Williams213cb262021-08-07 19:21:33 -050059FILES:${PN}-dbg += "\
Brad Bishop0e2770c2020-01-21 07:31:46 -050060 ${libexecdir}/cups/backend/.debug \
61 ${libexecdir}/cups/driver/.debug \
62 ${libexecdir}/cups/filter/.debug \
Brad Bishope42b3e32020-01-15 22:08:42 -050063 "
64
Patrick Williams213cb262021-08-07 19:21:33 -050065FILES:${PN} += "\
Brad Bishop0e2770c2020-01-21 07:31:46 -050066 ${libexecdir}/cups \
67 ${datadir}/ppd/ \
Brad Bishope42b3e32020-01-15 22:08:42 -050068 ${datadir}/cups/charsets \
69 ${datadir}/cups/drv \
70 ${datadir}/cups/mime \
71 ${datadir}/cups/ppdc \
Brad Bishope42b3e32020-01-15 22:08:42 -050072 ${datadir}/cups/banners \
Brad Bishope42b3e32020-01-15 22:08:42 -050073"
74
Patrick Williams213cb262021-08-07 19:21:33 -050075do_install:append() {
Brad Bishop0e2770c2020-01-21 07:31:46 -050076 # remove braille dir
77 rm -rf ${D}${datadir}/cups/braille
Brad Bishope42b3e32020-01-15 22:08:42 -050078
79 # remove sysroot path contamination from pkgconfig file
80 sed -i -e 's:${STAGING_DIR_TARGET}::' ${D}/${libdir}/pkgconfig/libcupsfilters.pc
81}
82
Patrick Williams213cb262021-08-07 19:21:33 -050083RDEPENDS:${PN} += "bash"