From 5c09e4a937389d437f7cb9e6bb3282636aae63bb Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 31 Jan 2019 19:45:53 +0000 Subject: [PATCH] extra/hplip to 3.19.1-1 --- ...Processor-functionality-which-is-clo.patch | 113 ++++++++++++++++++ extra/hplip/PKGBUILD | 29 ++--- extra/hplip/fix_install.patch | 23 ---- .../hplip-colorlaserjet-mfp-m278-m281.patch | 64 ---------- extra/hplip/python.patch | 11 -- 5 files changed, 124 insertions(+), 116 deletions(-) create mode 100644 extra/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch delete mode 100644 extra/hplip/fix_install.patch delete mode 100644 extra/hplip/hplip-colorlaserjet-mfp-m278-m281.patch delete mode 100644 extra/hplip/python.patch diff --git a/extra/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/extra/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch new file mode 100644 index 000000000..8d3b4d7bf --- /dev/null +++ b/extra/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch @@ -0,0 +1,113 @@ +From fa9c0cf1a5db9bf8880b4796d5e3e0da46534e3d Mon Sep 17 00:00:00 2001 +From: Didier Raboud +Date: Tue, 21 Aug 2018 18:18:10 +0200 +Subject: Remove all ImageProcessor functionality, which is closed-source + +--- + Makefile.am | 14 ++------------ + prnt/hpcups/HPCupsFilter.cpp | 21 --------------------- + 2 files changed, 2 insertions(+), 33 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1b097c4f9..8d5d78c9f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -166,7 +166,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_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 + + if !HPLIP_CLASS_DRIVER +@@ -594,7 +594,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 +@@ -686,16 +686,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 !HPLIP_CLASS_DRIVER + # If scanner build, add hpaio entry to sane dll.conf. + if [ "$(scan_build)" = "yes" ]; then \ +diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp +index 5b282d83f..0bacfafac 100644 +--- a/prnt/hpcups/HPCupsFilter.cpp ++++ b/prnt/hpcups/HPCupsFilter.cpp +@@ -31,7 +31,6 @@ + \*****************************************************************************/ + + #include "HPCupsFilter.h" +-#include "ImageProcessor.h" + + #include + #include +@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + + + sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); +- image_processor_t* imageProcessor = imageProcessorCreate(); + + while (cupsRasterReadHeader2(cups_raster, &cups_header)) + { + +- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result); +- } +- + current_page_number++; + + if (current_page_number == 1) { +@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + color_raster = rgbRaster; + black_raster = kRaster; + +- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result); +- } +- +- + if ((y == 0) && !is_ljmono) { + //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer + //may not skip blank lines before actual data +@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + } + } // for() loop end + +- result = imageProcessorEndPage(imageProcessor); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); +- } +- +- + m_Job.NewPage(); + if (err != NO_ERROR) { + break; +@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster) + rgbRaster = NULL; + } + +- imageProcessorDestroy(imageProcessor); +- + unlink(hpPreProcessedRasterFile); + return ret_status; + } diff --git a/extra/hplip/PKGBUILD b/extra/hplip/PKGBUILD index e03c211c8..d99261913 100644 --- a/extra/hplip/PKGBUILD +++ b/extra/hplip/PKGBUILD @@ -3,20 +3,18 @@ # Contributor : Rémy Oudompheng # Contributor: Morgan LEFIEUX -# ALARM: Kevin Mihelich -# - hold at 3.18.6 until upstream fixes 3.18.7+ for ARM -# https://bugs.launchpad.net/hplip/+bug/1784989 +# remove when bumped upstream pkgname=hplip -pkgver=3.18.6 -pkgrel=2 +pkgver=3.19.1 +pkgrel=1 epoch=1 pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet" arch=('x86_64') -url="http://hplipopensource.com" +url="https://hplipopensource.com" license=('GPL2' 'custom') -depends=('python-dbus' 'ghostscript' 'net-snmp' 'foomatic-db-engine') -makedepends=('python-pyqt5' 'python-gobject' 'sane' 'rpcbind' 'cups' 'libusb') +depends=('python-dbus' 'ghostscript' 'net-snmp' 'foomatic-db-engine' 'python-gobject') +makedepends=('python-pyqt5' 'sane' 'rpcbind' 'cups' 'libusb') optdepends=('cups: for printing support' 'sane: for scanner support' 'xsane: sane scanner frontend' @@ -24,7 +22,6 @@ optdepends=('cups: for printing support' 'python-reportlab: for pdf output in hp-scan' 'rpcbind: for network support' 'python-pyqt5: for running GUI and hp-toolbox' - 'python-gobject: for running hp-toolbox' 'libusb: for advanced usb support' 'wget: for network support') # 'hplip-plugin: binary blobs for specific devices (AUR) or run hp-setup to download the plugin' @@ -33,15 +30,13 @@ source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz{,.a disable_upgrade.patch 0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch 0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch - fix_install.patch - python.patch) -sha512sums=('deb4e6e1c7e9ea7452967f7d7d7fd93e92eb59406b4978bb9b874db93bc5022b25aab012a7420ac3e991259032bc7cb749cd924c93a164544e29a4152962184f' + 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch) +sha512sums=('b1d663a3538a19ab2c195bc627c765b9dded047b0431f6fc2096a8a31b4efb5cf52c88ad9665a2d78893ba66c1c47ccf79c161965f308a27eeeb11b156b446c8' 'SKIP' 'ee0bd240568a7dbb4dc6ef64dba28ea84c4bedf7d688d054960c686666f8f0bc4562961c40845107ef0c936e60d3e676bffb2a1ba708039690bb0520cda3a525' '22aeb5b851f78bc6bc62e0bc3da99fecaf42d7604af41e2f3343f8d3666541f7b06b7d1a7d0ddf24f1731ac7b12dfe582375a98e3b94dfa323d6ce954549ca67' '763949a0bc460dcc9faefc86f2a91cf342781bfce696ed0c3826758572dd03ac266bbeb7b6a4f9376ac298d7d3c9c4def42d94921a8e1d1695e39396e36d95ff' - '86ef78e5359b49a04b517654f44c1a89bf40ec36aed8b6034247fc327845c9f861fc937f04c11f937199be4fb59061677dfe9baf3d84a99c044f3629842cc438' - 'ebcc40cac00b9fb63d378d42ac258eeaf6e0967f34fd1e204c690f34457a0a2b634ef65f1deb79a0740d8c6047f718c10fa205ee2f239b667f7e06c065590528') + '8710e039626878270b8b7bc1569566274d935c84652d758e25ce8fe01c0f44d911148620bb494489e1238201c01f3ba255c19f7dc5c2ff0d45a5f2a79190286b') validpgpkeys=('4ABA2F66DBD5A95894910E0673D770CDA59047B9') # HPLIP (HP Linux Imaging and Printing) prepare() { @@ -54,10 +49,8 @@ prepare() { patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch # fix some handling unicode file names FS#58412 patch -Np1 -i ${srcdir}/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch - # fix installation of missing library - FS#59548 -# patch -Np1 -i ${srcdir}/fix_install.patch - # fix python issue - FS#59548 -# patch -Np1 -i ${srcdir}/python.patch + # remove binary blob libImageProcessor and all linking - FS#59681 + patch -Np1 -i ${srcdir}/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch export AUTOMAKE='automake --foreign' autoreconf --force --install diff --git a/extra/hplip/fix_install.patch b/extra/hplip/fix_install.patch deleted file mode 100644 index adbec2c57..000000000 --- a/extra/hplip/fix_install.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- hplip-3.18.7/Makefile.am 2018-07-15 22:08:37.000000000 +0200 -+++ hplip-3.18.7/Makefile.am.new 2018-08-08 19:54:20.671794852 +0200 -@@ -680,14 +680,14 @@ - 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 ; \ -+ cp prnt/hpcups/libImageProcessor-x86_64.so $(DESTDIR)$(libdir)/ ; \ -+ chmod 775 $(DESTDIR)$(libdir)/libImageProcessor-x86_64.so ; \ -+ ln -sf $(libdir)/libImageProcessor-x86_64.so $(DESTDIR)$(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 ; \ -+ cp prnt/hpcups/libImageProcessor-x86_32.so $(DESTDIR)$(libdir)/ ; \ -+ chmod 775 $(DESTDIR)$(libdir)/libImageProcessor-x86_32.so ; \ -+ ln -sf $(libdir)/libImageProcessor-x86_32.so $(DESTDIR)$(libdir)/libImageProcessor.so ; \ - fi - if !HPLIP_CLASS_DRIVER - # If scanner build, add hpaio entry to sane dll.conf. diff --git a/extra/hplip/hplip-colorlaserjet-mfp-m278-m281.patch b/extra/hplip/hplip-colorlaserjet-mfp-m278-m281.patch deleted file mode 100644 index 8e9569f20..000000000 --- a/extra/hplip/hplip-colorlaserjet-mfp-m278-m281.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -up hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 hplip-3.17.11/data/models/models.dat ---- hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 2017-11-23 13:10:17.000000000 +0100 -+++ hplip-3.17.11/data/models/models.dat 2018-01-19 08:24:21.554788787 +0100 -@@ -58516,6 +58516,59 @@ usb-pid=3c2a - usb-vid=3f0 - wifi-config=3 - -+[hp_colorlaserjet_mfp_m278-m281] -+align-type=0 -+clean-type=0 -+color-cal-type=0 -+copy-type=0 -+embedded-server-type=1 -+fax-type=7 -+fw-download=False -+icon=hp_color_laserjet_cm1312_mfp.png -+io-mfp-mode=1 -+io-mode=1 -+io-support=14 -+job-storage=0 -+linefeed-cal-type=0 -+model1=HP Color LaserJet MFP M278-281 -+monitor-type=0 -+panel-check-type=0 -+pcard-type=0 -+plugin=1 -+plugin-reason=64 -+power-settings=0 -+ppd-name=hp-color_laserjet_pro_mfp_m277 -+pq-diag-type=0 -+r-type=0 -+r0-agent1-kind=4 -+r0-agent1-sku=CF400A/CF400X -+r0-agent1-type=1 -+r0-agent2-kind=4 -+r0-agent2-sku=CF401A -+r0-agent2-type=4 -+r0-agent3-kind=4 -+r0-agent3-sku=CF403A -+r0-agent3-type=5 -+r0-agent4-kind=4 -+r0-agent4-sku=CF402A -+r0-agent4-type=6 -+scan-src=3 -+scan-type=5 -+status-battery-check=0 -+status-dynamic-counters=0 -+status-type=10 -+support-released=True -+support-subtype=48c3 -+support-type=2 -+support-ver=3.15.4 -+tech-class=Postscript -+family-class=Undefined -+tech-subclass=Normal -+tech-type=4 -+usb-pid=3c2a -+usb-vid=3f0 -+wifi-config=3 -+ - [hp_color_laserjet_m553] - align-type=0 - clean-type=0 - diff --git a/extra/hplip/python.patch b/extra/hplip/python.patch deleted file mode 100644 index b75d1f598..000000000 --- a/extra/hplip/python.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- hplip-3.18.7/base/utils.py 2018-07-15 22:08:37.000000000 +0200 -+++ hplip-3.18.7/base/utils.py.new 2018-08-08 21:46:48.721947940 +0200 -@@ -265,7 +265,7 @@ - try: - names = os.listdir(root) - except os.error: -- raise StopIteration -+ return - - pattern = pattern or '*' - pat_list = pattern.split(';')