summaryrefslogtreecommitdiffstats
path: root/source/ap/hplip
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2024-02-23 02:27:35 +0000
committer Eric Hameleers <alien@slackware.com>2024-02-23 03:58:34 +0100
commit6a204802594690b5fe703e8dff65ad5123b0b11f (patch)
treeecf3e6f1c1388e40f3334c123d03d67c04448457 /source/ap/hplip
parent7bd6c6ca67930116862b0bdb7333874c6d822fbf (diff)
downloadcurrent-6a204802594690b5fe703e8dff65ad5123b0b11f.tar.gz
current-6a204802594690b5fe703e8dff65ad5123b0b11f.tar.xz
Fri Feb 23 02:27:35 UTC 202420240223022735
a/aaa_libraries-15.1-x86_64-26.txz: Rebuilt. Upgraded: libacl.so.1.1.2302, libattr.so.1.1.2502, liblzma.so.5.4.6, libpcre2-8.so.0.12.0, libz.so.1.3.1, libcares.so.2.11.0, libexpat.so.1.9.0, libffi.so.8.1.4, libglib-2.0.so.0.7800.4, libgmodule-2.0.so.0.7800.4, libgobject-2.0.so.0.7800.4, libgthread-2.0.so.0.7800.4, libidn.so.12.6.5, libidn2.so.0.4.0, libpng16.so.16.41.0, libpsl.so.5.3.5, libtdb.so.1.4.10, libusb-1.0.so.0.4.0. a/etc-15.1-x86_64-5.txz: Rebuilt. Added UID 214 and GID 214 for avahi. a/gettext-0.22.5-x86_64-1.txz: Upgraded. a/pkgtools-15.1-noarch-9.txz: Rebuilt. setup.services: support rc.avahidaemon and rc.avahidnsconfd. a/sysvinit-scripts-15.1-noarch-13.txz: Rebuilt. rc.M: start (if executable) rc.avahidaemon and rc.avahidnsconfd. ap/cups-2.4.7-x86_64-2.txz: Rebuilt. Recompiled against avahi. ap/cups-filters-1.28.17-x86_64-4.txz: Rebuilt. Recompiled against avahi. ap/hplip-3.23.12-x86_64-1.txz: Upgraded. Compiled against avahi. ap/xmltoman-0.6-x86_64-1.txz: Added. This is needed to generate manpages for avahi. d/distcc-3.4-x86_64-4.txz: Rebuilt. Recompiled against avahi. d/gettext-tools-0.22.5-x86_64-1.txz: Upgraded. l/avahi-20240220_dffd549-x86_64-1.txz: Added. It was either this, or drop (or fork) hplip. We'll enjoy it in the long run. Thanks to David Somero for the original build script, and to Robby Workman for years of maintenance. Signed-off-by: volkerdi Acked-by: alienBOB l/libdaemon-0.14-x86_64-1.txz: Added. This is needed by avahi. l/pipewire-1.0.3-x86_64-5.txz: Rebuilt. Recompiled against avahi. l/pulseaudio-17.0-x86_64-3.txz: Rebuilt. Recompiled against avahi. n/NetworkManager-1.46.0-x86_64-1.txz: Upgraded. n/netatalk-3.1.18-x86_64-2.txz: Rebuilt. Recompiled against avahi. n/samba-4.19.5-x86_64-2.txz: Rebuilt. Recompiled against avahi. xap/pidgin-2.14.12-x86_64-3.txz: Rebuilt. Recompiled against avahi. xap/sane-1.2.1-x86_64-3.txz: Rebuilt. Recompiled against avahi. extra/bash-completion/bash-completion-2.12.0-noarch-1.txz: Upgraded.
Diffstat (limited to 'source/ap/hplip')
-rw-r--r--source/ap/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch113
-rwxr-xr-xsource/ap/hplip/hplip.SlackBuild19
-rw-r--r--source/ap/hplip/hplip.is_alive.diff94
-rw-r--r--source/ap/hplip/hplip.python3.10.diff77
4 files changed, 3 insertions, 300 deletions
diff --git a/source/ap/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/source/ap/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
deleted file mode 100644
index 8d3b4d7bf..000000000
--- a/source/ap/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From fa9c0cf1a5db9bf8880b4796d5e3e0da46534e3d Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-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 <signal.h>
- #include <sys/wait.h>
-@@ -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/source/ap/hplip/hplip.SlackBuild b/source/ap/hplip/hplip.SlackBuild
index 38247ba4f..9c0ed10ab 100755
--- a/source/ap/hplip/hplip.SlackBuild
+++ b/source/ap/hplip/hplip.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for hplip
# Copyright 2006-2010 Robby Workman, Northport, Alabama, USA
-# Copyright 2006-2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006-2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=hplip
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-7}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -86,12 +86,6 @@ zcat $CWD/hplip.python3.shebang.diff.gz | patch -p1 --verbose || exit 1
# Fix the desktop file to show correct icon and category
zcat $CWD/fix-desktop-file.patch.gz | patch -p1 --verbose || exit 1
-# Fix for deprecated python function:
-zcat $CWD/hplip.is_alive.diff.gz | patch -p1 --verbose || exit 1
-
-# Patch for Python 3.10:
-zcat $CWD/hplip.python3.10.diff.gz | patch -p1 --verbose || exit 1
-
# Choose correct options depending on whether PAM is installed:
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
unset SHADOW_OPTIONS
@@ -112,14 +106,6 @@ sed -i.env-python -e 's,^#!/usr/bin/env python,#!/usr/bin/python3,' \
prnt/filters/hpps \
fax/filters/pstotiff
-# Forget it folks - this ImageProcessor closed-source blob is broken, and there
-# is no way to fix it. We will use this patch from Debian to remove it from
-# hplip, reverting to the way things worked in the 3.18.6 release. If HP ever
-# sees fit to make ImageProcessor mandatory, we'll likely stick with the last
-# hplip release that can be made to work without it, and any HP printers that
-# require a newer version of hplip will not be supported.
-zcat $CWD/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch.gz | patch -p1 -l --verbose || exit 1
-
# Add a cups-2.2.x header since some definitions were moved:
zcat $CWD/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch.gz | patch -p1 -l --verbose || exit 1
@@ -157,6 +143,7 @@ PYTHON=/usr/bin/python3 \
--enable-foomatic-rip-hplip-install \
--enable-pp-build \
--disable-foomatic-ppd-install \
+ --disable-imageProcessor-build \
--enable-foomatic-drv-install \
--enable-network-build=yes \
--enable-qt5 \
diff --git a/source/ap/hplip/hplip.is_alive.diff b/source/ap/hplip/hplip.is_alive.diff
deleted file mode 100644
index 532da9ff5..000000000
--- a/source/ap/hplip/hplip.is_alive.diff
+++ /dev/null
@@ -1,94 +0,0 @@
-diff --git a/copier/copier.py b/copier/copier.py
-index a595baa..7794f48 100644
---- a/copier/copier.py
-+++ b/copier/copier.py
-@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device):
-
- def isCopyActive(self):
- if self.copy_thread is not None:
-- return self.copy_thread.isAlive()
-+ return self.copy_thread.is_alive()
- else:
- return False
-
- def waitForCopyThread(self):
- if self.copy_thread is not None and \
-- self.copy_thread.isAlive():
-+ self.copy_thread.is_alive():
-
- self.copy_thread.join()
-
-diff --git a/fax/fax.py b/fax/fax.py
-index 3d69226..0878a64 100644
---- a/fax/fax.py
-+++ b/fax/fax.py
-@@ -478,13 +478,13 @@ class FaxDevice(device.Device):
-
- def isSendFaxActive(self):
- if self.send_fax_thread is not None:
-- return self.send_fax_thread.isAlive()
-+ return self.send_fax_thread.is_alive()
- else:
- return False
-
- def waitForSendFaxThread(self):
- if self.send_fax_thread is not None and \
-- self.send_fax_thread.isAlive():
-+ self.send_fax_thread.is_alive():
-
- try:
- self.send_fax_thread.join()
-diff --git a/fax/pmlfax.py b/fax/pmlfax.py
-index b68ff6a..b1020d0 100644
---- a/fax/pmlfax.py
-+++ b/fax/pmlfax.py
-@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice):
-
- def isUploadLogActive(self):
- if self.upload_log_thread is not None:
-- return self.upload_log_thread.isAlive()
-+ return self.upload_log_thread.is_alive()
- else:
- return False
-
- def waitForUploadLogThread(self):
- if self.upload_log_thread is not None and \
-- self.upload_log_thread.isAlive():
-+ self.upload_log_thread.is_alive():
-
- self.upload_log_thread.join()
-
-diff --git a/scan/sane.py b/scan/sane.py
-index b6c4acd..e8f8db8 100755
---- a/scan/sane.py
-+++ b/scan/sane.py
-@@ -378,14 +378,14 @@ class ScanDevice:
-
- def isScanActive(self):
- if self.scan_thread is not None:
-- return self.scan_thread.isAlive() and self.scan_thread.scan_active
-+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
- else:
- return False
-
-
- def waitForScanDone(self):
- if self.scan_thread is not None and \
-- self.scan_thread.isAlive() and \
-+ self.scan_thread.is_alive() and \
- self.scan_thread.scan_active:
-
- try:
-@@ -398,9 +398,9 @@ class ScanDevice:
- #time.sleep(0.5)
- if self.scan_thread is not None:
- while True:
-- #print self.scan_thread.isAlive()
-+ #print self.scan_thread.is_alive()
- #print self.scan_thread.scan_active
-- if self.scan_thread.isAlive() and \
-+ if self.scan_thread.is_alive() and \
- self.scan_thread.scan_active:
- return
-
-
diff --git a/source/ap/hplip/hplip.python3.10.diff b/source/ap/hplip/hplip.python3.10.diff
deleted file mode 100644
index 5963f567a..000000000
--- a/source/ap/hplip/hplip.python3.10.diff
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/io/mudext/hpmudext.c b/io/mudext/hpmudext.c
-index dca3e9d..dfcd22a 100644
---- a/io/mudext/hpmudext.c
-+++ b/io/mudext/hpmudext.c
-@@ -24,6 +24,8 @@ Authors: Don Welch, David Suffield, Naga Samrat Chowdary Narla
-
- \*****************************************************************************/
-
-+#define PY_SSIZE_T_CLEAN
-+
- #include <Python.h>
- #include <stdarg.h>
- #include "hpmud.h"
-@@ -187,14 +189,22 @@ static PyObject *write_channel(PyObject *self, PyObject *args)
- HPMUD_CHANNEL cd;
- int timeout = 30;
- char * buf;
-- int buf_size = 0;
-+ Py_ssize_t buf_size = 0;
-+ int buf_size_asInt = 0;
- int bytes_written = 0;
-
- if (!PyArg_ParseTuple(args, "iis#|i", &dd, &cd, &buf, &buf_size, &timeout))
- return NULL;
-
-+ if (buf_size < INT_MIN)
-+ buf_size_asInt = INT_MIN;
-+ else if (buf_size > INT_MAX)
-+ buf_size_asInt = INT_MAX;
-+ else
-+ buf_size_asInt = (int)buf_size;
-+
- Py_BEGIN_ALLOW_THREADS
-- result = hpmud_write_channel(dd, cd, buf, buf_size, timeout, &bytes_written);
-+ result = hpmud_write_channel(dd, cd, buf, buf_size_asInt, timeout, &bytes_written);
- Py_END_ALLOW_THREADS
-
- return Py_BuildValue("(ii)", result, bytes_written);
-@@ -231,14 +241,22 @@ static PyObject *set_pml(PyObject *self, PyObject *args)
- char * oid;
- int type;
- char * data;
-- int data_size;
-+ Py_ssize_t data_size = 0;
-+ int data_size_asInt = 0;
- int pml_result;
-
- if (!PyArg_ParseTuple(args, "iisis#", &dd, &cd, &oid, &type, &data, &data_size))
- return NULL;
-
-+ if (data_size < INT_MIN)
-+ data_size_asInt = INT_MIN;
-+ else if (data_size > INT_MAX)
-+ data_size_asInt = INT_MAX;
-+ else
-+ data_size_asInt = (int)data_size;
-+
- Py_BEGIN_ALLOW_THREADS
-- result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size, &pml_result);
-+ result = hpmud_set_pml(dd, cd, oid, type, (void *)data, data_size_asInt, &pml_result);
- Py_END_ALLOW_THREADS
-
- return Py_BuildValue("(ii)", result, pml_result);
-diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c
-index 1e6b514..597abd8 100755
---- a/scan/scanext/scanext.c
-+++ b/scan/scanext/scanext.c
-@@ -45,6 +45,8 @@ PERFORMANCE OF THIS SOFTWARE.
- *******************************************************************/
-
-
-+#define PY_SSIZE_T_CLEAN
-+
- /* _ScanDevice objects */
-
- #include "Python.h"
-