diff --git a/hardware/printer/hplip/actions.py b/hardware/printer/hplip/actions.py index 531cebfc92..698bb8ece4 100644 --- a/hardware/printer/hplip/actions.py +++ b/hardware/printer/hplip/actions.py @@ -56,7 +56,7 @@ def setup(): --disable-policykit \ --disable-doc-build \ --disable-foomatic-ppd-install \ - --disable-foomatic-rip-hplip-install") + ") # Remove hardcoded rpaths pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"") @@ -71,6 +71,9 @@ def install(): # Create a compatibility symlink for foomatic-rip-hplip pisitools.dosym("/usr/lib/cups/filter/foomatic-rip", "/usr/lib/cups/filter/foomatic-rip-hplip") + # Install documents + pisitools.dodoc("COPYING") + # Remove the hal preprobe rules as they were causing breakage (bug #479648). # Remove hal directory as well. pisitools.removeDir("/usr/share/hal/") @@ -94,3 +97,4 @@ def install(): # --disable-doc-build used. It doesn't go to the true directory. pisitools.dohtml("doc/*") + diff --git a/hardware/printer/hplip/files/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/hardware/printer/hplip/files/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch new file mode 100644 index 0000000000..f784ab6d40 --- /dev/null +++ b/hardware/printer/hplip/files/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch @@ -0,0 +1,123 @@ +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 \ +--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-15 00:55:21.000000000 +0100 ++++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.new 2021-02-22 08:34:47.515932980 +0100 +@@ -31,7 +31,6 @@ + \*****************************************************************************/ + + #include "HPCupsFilter.h" +-#include "ImageProcessor.h" + + #include + #include +@@ -651,21 +650,9 @@ + + sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name); + +- image_processor_t* imageProcessor=NULL; +- IMAGE_PROCESSOR_ERROR result; +- //added if condition to check if pinter language is "ljzjstream" +- //If so, then bypass imageprocessing functions while running HPCUPS filter. +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ +- imageProcessor = imageProcessorCreate(); +- } + while (cupsRasterReadHeader2(cups_raster, &cups_header)) + { +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){ +- 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) { +@@ -764,14 +751,6 @@ + color_raster = rgbRaster; + black_raster = kRaster; + +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { +- 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 +@@ -801,14 +780,6 @@ + } + } // for() loop end + +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { +- result = imageProcessorEndPage(imageProcessor); +- if (result != IPE_SUCCESS){ +- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result); +- } +- } +- + m_Job.NewPage(); + if (err != NO_ERROR) { + break; +@@ -824,10 +795,6 @@ + } + + +- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0) +- { +- imageProcessorDestroy(imageProcessor); +- } + unlink(hpPreProcessedRasterFile); + return ret_status; + } diff --git a/hardware/printer/hplip/pspec.xml b/hardware/printer/hplip/pspec.xml index 21574da64c..a67ffd2e4c 100755 --- a/hardware/printer/hplip/pspec.xml +++ b/hardware/printer/hplip/pspec.xml @@ -1,5 +1,5 @@ - + hplip @@ -8,11 +8,11 @@ Pisi Linux Admins admins@pisilinux.org - GPLv2+ - MIT + custom + GPL2 HP Linux Imaging and Printing System HP Linux Imaging and Printing (HPLIP) System includes printer and scanner drivers and related service tools. - mirrors://sourceforge/hplip/hplip-3.18.4.tar.gz + mirrors://sourceforge/hplip/hplip-3.21.2.tar.gz patch-ppds.sh @@ -35,23 +35,24 @@ dbus-devel openssl-devel desktop-file-utils + avahi-devel fedora/hplip-avahi-parsing.patch fedora/hplip-bad-low-ink-warning.patch fedora/hplip-check-cups.patch fedora/hplip-clear-old-state-reasons.patch - fedora/hplip-colorlaserjet-mfp-m278-m281.patch + fedora/hplip-device-reconnected.patch - fedora/hplip-deviceIDs-drv.patch + fedora/hplip-dj990c-margin.patch fedora/hplip-3165-sourceoption.patch fedora/hplip-hpcups-sigpipe.patch fedora/hplip-hpijs-marker-supply.patch - fedora/hplip-jpeg-compression.patch - fedora/hplip-lineart.patch + + fedora/hplip-log-stderr.patch - fedora/hplip-logdir.patch + fedora/hplip-no-asm.patch fedora/hplip-no-write-bytecode.patch fedora/hplip-noernie.patch @@ -71,7 +72,7 @@ pisilinux/desktop-i18n.patch pisilinux/desktop-i18n-1.patch - pisilinux/add-pisilinux-support.patch + pisilinux/fix-polkit-directory.patch @@ -80,6 +81,7 @@ pisilinux/hp-systray-consume-session-param.patch Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch + 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch @@ -93,12 +95,16 @@ libjpeg-turbo net-snmp foomatic-db + foomatic-db-engine sane-backends + sane-frontends cups dbus libgcc libusb openssl + avahi + avahi-libs @@ -172,6 +178,13 @@ + + 2021-04-26 + 3.21.2 + Version bump + Kamil Atlı + suvari@pisilinux.org + 2020-03-10 3.18.4