diff options
author | Zoltán Böszörményi <zboszor@gmail.com> | 2023-03-30 12:16:56 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-03-30 06:25:15 -0700 |
commit | 53b7f2359064a5d62aa7dba7a2f7680a1f803046 (patch) | |
tree | d8ce6b0200d5629dda1b4fbf58cc124829b80429 | |
parent | c2ddfe8b3a64e7e2430b346778dd1c36781329ea (diff) | |
download | meta-openembedded-53b7f2359064a5d62aa7dba7a2f7680a1f803046.tar.gz |
hplip: Fix installation and QA
With version 3.22.11 it's not enough avoid linking to the
closed source ImageProcessor library, it must not be installed
either. This library is pre-stripped so package QA fails.
Add a new patch to fix installing HPLIP.conf into
/usr/share/ipp-usb/quirks. The upstream Makefile.am fails
to take DESTDIR into account and do_install fails because
of this. Also, instead of detecting the presence of the
target directory which is invalid for a source build,
create it and install the quirk file.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 58 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch new file mode 100644 index 0000000000..71ed697221 --- /dev/null +++ b/meta-oe/recipes-extended/hplip/hplip/0001-Fix-installing-ipp-usb-quirk.patch @@ -0,0 +1,38 @@ +From 5cfe30829174a18ec64e53c84292a0229ffa5602 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + <zboszor@gmail.com> +Date: Thu, 30 Mar 2023 11:31:27 +0200 +Subject: [PATCH] Fix installing ipp-usb quirk +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use $(DESTDIR) as installation prefix for +/usr/share/usb-ipp/quirk/HPLIP.conf. + +Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> +--- + Makefile.am | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index e10364d..f520225 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -703,10 +703,9 @@ if !DISBALE_IMAGEPROCESSOR_BUILD + ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ + fi + endif #DISABLE_IMAGEPROCESSOR +- if [ -d "/usr/share/ipp-usb/quirks/" ]; then \ +- echo "ipp-usb directory exists"; \ +- cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \ +- fi ++ install -d -m0755 $(DESTDIR)/usr/share/ipp-usb/quirks ; \ ++ echo "ipp-usb directory exists"; \ ++ cp prnt/ipp-usb/HPLIP.conf $(DESTDIR)/usr/share/ipp-usb/quirks/ + if !HPLIP_CLASS_DRIVER + # If scanner build, add hpaio entry to sane dll.conf. + if [ "$(scan_build)" = "yes" ]; then \ +-- +2.39.2 + diff --git a/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch index 2cfe1255e9..fa973a8d85 100644 --- a/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch +++ b/meta-oe/recipes-extended/hplip/hplip/0002-Add-ImageProcessor-only-when-DISBALE_IMAGEPROCESSOR_.patch @@ -7,8 +7,8 @@ Subject: [PATCH 2/4] Add ImageProcessor only when DISBALE_IMAGEPROCESSOR_BUILD Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - Makefile.am | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + Makefile.am | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 5f75759..73421b1 100644 @@ -27,6 +27,22 @@ index 5f75759..73421b1 100644 #else #hpcupsdir = $(cupsfilterdir) #hpcups_PROGRAMS = hpcups +@@ -687,6 +692,7 @@ + + install-data-hook: + if HPLIP_BUILD ++if !DISBALE_IMAGEPROCESSOR_BUILD + if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \ + cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \ + chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \ +@@ -697,6 +703,7 @@ + chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \ + ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \ + fi ++endif #DISABLE_IMAGEPROCESSOR + if [ -d "/usr/share/ipp-usb/quirks/" ]; then \ + echo "ipp-usb directory exists"; \ + cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \ -- 2.37.3 diff --git a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb index 23cc5197fa..ca683483b6 100644 --- a/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb +++ b/meta-oe/recipes-extended/hplip/hplip_3.22.10.bb @@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://0004-Define-missing-prototype-for-functions.patch \ file://0005-hp_ipp.c-Add-printf-format-to-snprintf-calls.patch \ file://0006-Workaround-patch-for-missing-Python3-transition-of-t.patch \ + file://0001-Fix-installing-ipp-usb-quirk.patch \ file://0001-Drop-using-register-storage-classifier.patch" SRC_URI[sha256sum] = "533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624" @@ -80,6 +81,7 @@ FILES:${PN}-dbg += "\ ${PYTHON_SITEPACKAGES_DIR}/.debug \ ${libexecdir}/cups/filter/.debug " +FILES:${PN} += "${datadir}/ipp-usb/quirks/HPLIP.conf" FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" FILES:${PN}-ppd = "${datadir}/ppd" FILES:${PN}-cups = "${datadir}/cups" |