[packages/hplip] - disable ImageProcessor binary blob

baggins baggins at pld-linux.org
Thu Jul 14 09:14:48 CEST 2022


commit 947b295e90fd204d4b5520853565d77e487ba77c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Jul 14 09:14:33 2022 +0200

    - disable ImageProcessor binary blob

 hplip.spec                                    | 10 ++++---
 remove-all-ImageProcessor-functionality.patch | 39 +++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 3 deletions(-)
---
diff --git a/hplip.spec b/hplip.spec
index f0f091e..2b56ecf 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -1,5 +1,3 @@
-# WARNING: when updating to 3.18.7+ beware of libImageProcessor binary blob (enigmatic "CDS feature" commonly causing problems);
-#          see Debian, Fedora or Arch for patch to disable it
 # TODO:
 # - add desktop file for toolbox
 # - separate hpijs package?
@@ -31,6 +29,7 @@ Patch3:		%{name}-binary-fixup.patch
 Patch4:		%{name}-destdir.patch
 Patch5:		%{name}-udev-rules.patch
 Patch6:		no-undefined-macro.patch
+Patch7:		remove-all-ImageProcessor-functionality.patch
 URL:		http://hplipopensource.com/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -176,6 +175,7 @@ urządzenia HP AiO.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %{__sed} -i -e '1s,^#!/usr/bin/env python$,#!%{__python3},' *.py fax/filters/pstotiff prnt/filters/hpps
 find base fax installer prnt scan ui ui4 -name '*.py' | xargs \
@@ -189,7 +189,6 @@ find base fax installer prnt scan ui ui4 -name '*.py' | xargs \
 %{__aclocal}
 %{__autoconf}
 %{__automake}
-CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"
 %configure \
 	PYTHON=%{__python3} \
 	%{!?with_dbus:--disable-dbus-build} \
@@ -199,10 +198,15 @@ CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"
 	--enable-foomatic-drv-install  \
 	--enable-foomatic-ppd-install \
 	--disable-foomatic-rip-hplip-install \
+	--disable-imageProcessor-build \
 	--enable-hpcups-install \
 	--enable-hpijs-install \
 	--enable-policykit \
 	--enable-pp-build \
+	--enable-gui-build \
+	--enable-qt5 \
+	--disable-qt4 \
+	--enable-scan-build \
 	--with-cupsbackenddir=%{cups_backenddir} \
 	--with-cupsfilterdir=%{cups_filterdir} \
 	--with-hpppddir=%{cups_ppddir} \
diff --git a/remove-all-ImageProcessor-functionality.patch b/remove-all-ImageProcessor-functionality.patch
new file mode 100644
index 0000000..7c61d77
--- /dev/null
+++ b/remove-all-ImageProcessor-functionality.patch
@@ -0,0 +1,39 @@
+diff --git a/Makefile.am b/Makefile.am
+index f65afea..12317dc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER
+ dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
+ endif #HPLIP_CLASS_DRIVER
+ 
+-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
++dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
+ 
+ dist_noinst_DATA += prnt/ipp-usb/HPLIP.conf
+ dist_noinst_SCRIPTS += dat2drv.py install.py  hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
+@@ -597,7 +597,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
+ 	prnt/hpcups/ImageProcessor.h
+ 
+ hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
+-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+ #else
+ #hpcupsdir = $(cupsfilterdir)
+ #hpcups_PROGRAMS = hpcups
+@@ -687,16 +687,6 @@ endif #HPLIP_CLASS_DRIVER
+ 
+ install-data-hook:
+ if HPLIP_BUILD
+-	if [ \( "$(UNAME)" = "x86_64" -a  -d "$(libdir)/" \) ]; then \
+-		cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
+-		chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
+-		ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
+-	fi; \
+-	if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
+-		cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
+-		chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
+-		ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
+-	fi
+ 	if [ -d "/usr/share/ipp-usb/quirks/" ]; then \
+ 		echo "ipp-usb directory exists"; \
+ 		cp prnt/ipp-usb/HPLIP.conf /usr/share/ipp-usb/quirks/ ; \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hplip.git/commitdiff/947b295e90fd204d4b5520853565d77e487ba77c



More information about the pld-cvs-commit mailing list