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>
This commit is contained in:
Zoltán Böszörményi 2023-03-30 12:16:56 +02:00 committed by Khem Raj
parent c2ddfe8b3a
commit 53b7f23590
3 changed files with 58 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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"