Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "HP Linux Imaging and Printing" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 2 | LICENSE="GPL-2.0-only" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=20f2c819499cc2063e9a7b07b408815c" |
| 4 | |
| 5 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ |
| 6 | file://configure.patch \ |
| 7 | file://fix-libusb-paths.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | file://600-fix.patch \ |
| 9 | file://030-replace_unsafe_memcpy_with_memmove.patch \ |
| 10 | file://050-fix-glibcisms.patch \ |
| 11 | file://hplip-3.19.6-fix-return.patch \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 12 | file://0001-common-utils-Include-string.h-for-strcasestr.patch \ |
| 13 | file://0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch \ |
| 14 | file://0003-pserror.c-Define-column-to-be-int-explcitly.patch \ |
| 15 | file://0004-Define-missing-prototype-for-functions.patch \ |
| 16 | file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ |
| 17 | file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 18 | file://0001-Drop-using-register-storage-classifier.patch" |
| 19 | SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | |
| 21 | DEPENDS += "cups python3 libusb" |
| 22 | |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 23 | inherit autotools-brokensep python3-dir python3native python3targetconfig pkgconfig systemd |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | |
| 25 | export STAGING_INCDIR |
| 26 | export STAGING_LIBDIR |
| 27 | |
| 28 | CFLAGS += "-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}" |
| 29 | |
| 30 | EXTRA_OECONF += "\ |
| 31 | LIBUSBINCLUDEROOT=${STAGING_INCDIR} \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 32 | --enable-cups-drv-install \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 33 | --enable-cups-ppd-install \ |
| 34 | --disable-network-build \ |
| 35 | --disable-doc-build \ |
| 36 | --disable-pp-build \ |
| 37 | --disable-scan-build \ |
| 38 | --disable-gui-build \ |
| 39 | --disable-fax-build \ |
| 40 | --disable-policykit \ |
| 41 | --disable-qt4 \ |
| 42 | --disable-qt3 \ |
| 43 | --disable-dbus-build \ |
| 44 | --enable-foomatic-drv-install \ |
| 45 | --disable-foomatic-ppd-install \ |
| 46 | --disable-foomatic-rip-hplip-install \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 47 | --disable-imageProcessor_build \ |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 48 | --with-cupsbackenddir=${libexecdir}/cups/backend \ |
| 49 | --with-cupsfilterdir=${libexecdir}/cups/filter \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 50 | " |
| 51 | |
| 52 | EXTRA_OEMAKE = "rulessystemdir=${systemd_unitdir}/system/" |
| 53 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 54 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | rm -rf ${D}${datadir}/hplip/upgrade.py |
| 56 | rm -rf ${D}${datadir}/hplip/uninstall.py |
| 57 | sed -i -e "s|/usr/bin/env python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py |
| 58 | sed -i -e "s|/usr/bin/python|/usr/bin/env python3|g" ${D}${datadir}/hplip/*.py |
| 59 | } |
| 60 | |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 61 | PACKAGE_BEFORE_PN += "${PN}-ppd ${PN}-cups ${PN}-backend ${PN}-filter ${PN}-hal" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 62 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 63 | RDEPENDS:${PN} += " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 64 | python3\ |
| 65 | python3-syslog \ |
| 66 | python3-pprint \ |
| 67 | python3-compression \ |
| 68 | python3-shell \ |
| 69 | python3-xml \ |
| 70 | python3-unixadmin \ |
| 71 | python3-html \ |
| 72 | python3-resource \ |
| 73 | python3-terminal \ |
| 74 | " |
Andrew Geissler | fc113ea | 2023-03-31 09:59:46 -0500 | [diff] [blame] | 75 | RDEPENDS:${PN}-filter += "perl ghostscript" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 76 | |
| 77 | # need to snag the debug file or OE will fail on backend package |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | FILES:${PN}-dbg += "\ |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 79 | ${libexecdir}/cups/backend/.debug \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 80 | ${PYTHON_SITEPACKAGES_DIR}/.debug \ |
Andrew Geissler | d688a01 | 2020-09-18 13:36:00 -0500 | [diff] [blame] | 81 | ${libexecdir}/cups/filter/.debug " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 82 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 83 | FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" |
| 84 | FILES:${PN}-ppd = "${datadir}/ppd" |
| 85 | FILES:${PN}-cups = "${datadir}/cups" |
| 86 | FILES:${PN}-backend = "${libexecdir}/cups/backend" |
| 87 | FILES:${PN}-filter = "${libexecdir}/cups/filter" |
| 88 | FILES:${PN}-hal = "${datadir}/hal" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 89 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 90 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}/*.so" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 91 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 92 | SYSTEMD_SERVICE:${PN} = "hplip-printer@.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 93 | |
| 94 | CLEANBROKEN = "1" |