CVS commit: pkgsrc/print/hplip

"Thomas Klausner" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.cvs
Message-ID <[email protected]>
Module Name:	pkgsrc
Committed By:	wiz
Date:		Thu Aug 27 09:39:59 UTC 2026

Modified Files:
	pkgsrc/print/hplip: distinfo
	pkgsrc/print/hplip/patches: patch-ae patch-prnt_hpcups_HPCupsFilter.cpp
Added Files:
	pkgsrc/print/hplip/patches: patch-base_g.py patch-ui5_devmgr5.py

Log Message:
hplip: add two patches for Python 3.12 compatibility

Tested by Dave Tyson on pkgsrc-users.

regen two other patches while here.

Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 pkgsrc/print/hplip/distinfo
cvs rdiff -u -r1.12 -r1.13 pkgsrc/print/hplip/patches/patch-ae
cvs rdiff -u -r0 -r1.1 pkgsrc/print/hplip/patches/patch-base_g.py \
    pkgsrc/print/hplip/patches/patch-ui5_devmgr5.py
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(unnamed) (text/x-diff, 9.5 KB)
Modified files:

Index: pkgsrc/print/hplip/distinfo
diff -u pkgsrc/print/hplip/distinfo:1.45 pkgsrc/print/hplip/distinfo:1.46
--- pkgsrc/print/hplip/distinfo:1.45	Mon Jan 27 14:00:53 2025
+++ pkgsrc/print/hplip/distinfo	Thu Aug 27 09:39:58 2026
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.45 2025/01/27 14:00:53 wiz Exp $
+$NetBSD: distinfo,v 1.46 2026/08/27 09:39:58 wiz Exp $
 
 BLAKE2s (hplip-3.19.12.tar.gz) = 24ea25e3ac4ab3c521ae65acb27a88a65a164f3d93b088e33f13f97ee8ad6eae
 SHA512 (hplip-3.19.12.tar.gz) = 5552cd717ae082ee55cdb77d79e8d035d8ecb7cf23c79d659fda43468d8ed414a33c4d869eab4ab83dee836f0d1cceb74c3c4a249e26f904a5ab2350e08a5677
 Size (hplip-3.19.12.tar.gz) = 25676247 bytes
 SHA1 (patch-ab) = 82b8ab80f778a6a31c1031688d9a16dbd4c55462
-SHA1 (patch-ae) = c67ea6d640175a1f0518640f41b5fb58241430f1
+SHA1 (patch-ae) = acd6d1462cd990f17ba7b8ffe79c25e747bb8bee
+SHA1 (patch-base_g.py) = b6c48a06ab9508223afb3160bcdebafccf3c08ce
 SHA1 (patch-configure.in) = d6e20d8d4f0b1042a32149eeca45d2ddc319f65f
 SHA1 (patch-diagnose_queues.py) = 1f15cffafd602cc23bad0094fc5c485f24171797
 SHA1 (patch-installer_dcheck.py) = 3bfe3bd15c0a3fb968e03aa8250dc7939bfe14d1
 SHA1 (patch-io_hpmud_musb.h) = ad634f5a1f426877e1c88916b6468fcdb7598555
-SHA1 (patch-prnt_hpcups_HPCupsFilter.cpp) = 19a26044ce24433b0188c243925b4028bc388f1a
+SHA1 (patch-prnt_hpcups_HPCupsFilter.cpp) = 203a31bd49d8f79b63a23799c098f187128c6d82
 SHA1 (patch-prnt_hpijs_context2.cpp) = f81148c1c334a9074453b27ac055833cd1669bd0
 SHA1 (patch-prnt_hpijs_foomatic-rip-hplip) = cfec38607572af9536e7c21cfe2e491d07d3838d
 SHA1 (patch-prnt_hpijs_ljzjscolor.cpp) = 5ca9c828ba4aff17a54a803d79c2dc169975d50c
@@ -18,3 +19,4 @@ SHA1 (patch-protocol_discovery_mdns.c) =
 SHA1 (patch-scan.py) = 3ca05c3569ec78b5752af364e4d0728900076c3c
 SHA1 (patch-scan_sane_OrbliteScan_LinuxCommon.h) = d15937ef6381ad046009493b024d4edb8220933d
 SHA1 (patch-scan_sane_OrbliteScan_MacCommon.h) = 4a96cddccdaf8878c33f5523d9bf0ca4951a76dd
+SHA1 (patch-ui5_devmgr5.py) = b27b6bc2b6a16e0e9076f803d20a54f12716a57b

Index: pkgsrc/print/hplip/patches/patch-ae
diff -u pkgsrc/print/hplip/patches/patch-ae:1.12 pkgsrc/print/hplip/patches/patch-ae:1.13
--- pkgsrc/print/hplip/patches/patch-ae:1.12	Thu Mar 18 16:44:02 2021
+++ pkgsrc/print/hplip/patches/patch-ae	Thu Aug 27 09:39:59 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-ae,v 1.12 2021/03/18 16:44:02 bouyer Exp $
+$NetBSD: patch-ae,v 1.13 2026/08/27 09:39:59 wiz Exp $
 
 # Conform to autoconf's standard variable usage, making it easier
 # to install on pkgsrc platforms
@@ -8,9 +8,9 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
 # still needs to handle the buildlink path for libusb-1.0 :(
 # schnoebe -- Fri May 24 14:55:57 CDT 2013
 
---- Makefile.am.orig	2019-12-10 06:00:36.000000000 +0100
-+++ Makefile.am	2021-03-18 15:14:51.942673859 +0100
-@@ -8,7 +8,7 @@
+--- Makefile.am.orig	2019-12-10 05:00:36.000000000 +0000
++++ Makefile.am
+@@ -8,7 +8,7 @@ hplipdir = $(datadir)/hplip
  CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
  
  hplipdir = $(datadir)/hplip
@@ -19,7 +19,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  docdir = $(hpdocdir)
  htmldir = $(hphtmldir)
  doc_DATA = COPYING copyright prnt/hpijs/README_LIBJPG
-@@ -110,6 +110,7 @@
+@@ -110,6 +110,7 @@ libhpmud_la_CFLAGS  += -I/usr/include/libusb-1.0
  else
  libhpmud_la_SOURCES += io/hpmud/musb.c 
  libhpmud_la_CFLAGS  += -I/usr/include/libusb-1.0
@@ -27,7 +27,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  libhpmud_la_LDFLAGS += -lusb-1.0
  endif
  
-@@ -131,12 +132,12 @@
+@@ -131,12 +132,12 @@ libhpip_la_SOURCES = ip/xconvolve.c ip/xfax.c ip/xgray
  	ip/hpip.h ip/ipdefs.h ip/xform.h ip/xjpg_dct.h ip/xjpg_huf.h ip/xjpg_mrk.h
  
  #hpmud rules data dir
@@ -42,7 +42,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  if UDEV_SYSFS_RULES
  dist_rules_DATA = data/rules/56-hpmud_sysfs.rules
  else
-@@ -144,11 +145,11 @@
+@@ -144,11 +145,11 @@ endif #HPLIP_CLASS_DRIVER
  endif
  endif #HPLIP_CLASS_DRIVER
  
@@ -56,7 +56,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  hplip_conf_DATA = hplip.conf
  
  if !HPLIP_CLASS_DRIVER
-@@ -158,7 +159,7 @@
+@@ -158,7 +159,7 @@ endif #HPLIP_CLASS_DRIVER
  endif #HPLIP_CLASS_DRIVER
  
  # hplip.state
@@ -65,7 +65,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  dist_hplip_state_DATA =
  
  if FULL_BUILD
-@@ -233,11 +234,11 @@
+@@ -233,11 +234,11 @@ if APPARMOR_BUILD
  if !HPLIP_CLASS_DRIVER
  # AppArmor Changes
  if APPARMOR_BUILD
@@ -79,7 +79,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  apparmor_abstraction_DATA = apparmor/abstractions/hplip
  dist_apparmor_abstraction_DATA = apparmor/abstractions/hplip
  
-@@ -363,6 +364,7 @@
+@@ -363,6 +364,7 @@ hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 
  
  if !LIBUSB01_BUILD
  hpmudext_la_CFLAGS +=-I/usr/include/libusb-1.0 
@@ -87,7 +87,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  endif
  endif #!HPLIP_CLASS_DRIVER
  # ui (qt3)
-@@ -448,9 +450,9 @@
+@@ -448,9 +450,9 @@ if POLICYKIT_INSTALL
  endif #HPLIP_CLASS_DRIVER
  # PolicyKit
  if POLICYKIT_INSTALL
@@ -99,7 +99,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  dist_policykit_dbus_share_DATA = data/policykit/com.hp.hplip.service
  policykit_policydir = $(policykit_dir)
  dist_policykit_policy_DATA = data/policykit/com.hp.hplip.policy
-@@ -594,7 +596,7 @@
+@@ -594,7 +596,7 @@ hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
  	prnt/hpcups/ImageProcessor.h
  
  hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
@@ -108,8 +108,7 @@ $NetBSD: patch-ae,v 1.12 2021/03/18 16:4
  #else
  #hpcupsdir = $(cupsfilterdir)
  #hpcups_PROGRAMS = hpcups
-@@ -683,27 +685,17 @@
- endif #HPLIP_CLASS_DRIVER
+@@ -684,26 +686,16 @@ if HPLIP_BUILD
  
  install-data-hook:
  if HPLIP_BUILD

Index: pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp
diff -u pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp:1.1 pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp:1.2
--- pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp:1.1	Sat Jan  4 04:24:12 2020
+++ pkgsrc/print/hplip/patches/patch-prnt_hpcups_HPCupsFilter.cpp	Thu Aug 27 09:39:59 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-prnt_hpcups_HPCupsFilter.cpp,v 1.1 2020/01/04 04:24:12 khorben Exp $
+$NetBSD: patch-prnt_hpcups_HPCupsFilter.cpp,v 1.2 2026/08/27 09:39:59 wiz Exp $
 
 Avoid using libImageProcessing.so (binary blob)
 
@@ -16,7 +16,7 @@ https://bugs.archlinux.org/task/59548#co
  #include <signal.h>
  #include <sys/wait.h>
  #include <sys/utsname.h>
-@@ -637,16 +635,9 @@ int HPCupsFilter::processRasterData(cups
+@@ -637,16 +635,9 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
  
  
      sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
@@ -33,7 +33,7 @@ https://bugs.archlinux.org/task/59548#co
          current_page_number++;
  
          if (current_page_number == 1) {
-@@ -745,12 +736,6 @@ int HPCupsFilter::processRasterData(cups
+@@ -745,12 +736,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
              color_raster = rgbRaster;
              black_raster = kRaster;
  
@@ -46,7 +46,7 @@ https://bugs.archlinux.org/task/59548#co
              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 +765,6 @@ int HPCupsFilter::processRasterData(cups
+@@ -780,12 +765,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
              }
          }  // for() loop end
  
@@ -59,12 +59,12 @@ https://bugs.archlinux.org/task/59548#co
          m_Job.NewPage();
          if (err != NO_ERROR) {
              break;
-@@ -800,8 +779,6 @@ int HPCupsFilter::processRasterData(cups
+@@ -799,8 +778,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cup
+         kRaster = NULL;
          rgbRaster = NULL;
      }
- 
--    imageProcessorDestroy(imageProcessor);
 -
+-    imageProcessorDestroy(imageProcessor);
+ 
      unlink(hpPreProcessedRasterFile);
      return ret_status;
- }

Added files:

Index: pkgsrc/print/hplip/patches/patch-base_g.py
diff -u /dev/null pkgsrc/print/hplip/patches/patch-base_g.py:1.1
--- /dev/null	Thu Aug 27 09:39:59 2026
+++ pkgsrc/print/hplip/patches/patch-base_g.py	Thu Aug 27 09:39:59 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-base_g.py,v 1.1 2026/08/27 09:39:59 wiz Exp $
+
+Adapt to Python 3.12 changes.
+
+--- base/g.py.orig	2026-08-27 09:35:41.282305902 +0000
++++ base/g.py
+@@ -128,7 +128,7 @@ class ConfigBase(object):
+             try:
+                 fp = open(self.filename, "r")
+                 try:
+-                    self.conf.readfp(fp)
++                    self.conf.read_file(fp, self.filename)
+                 except configparser.MissingSectionHeaderError:
+                     print("")
+                     log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
Index: pkgsrc/print/hplip/patches/patch-ui5_devmgr5.py
diff -u /dev/null pkgsrc/print/hplip/patches/patch-ui5_devmgr5.py:1.1
--- /dev/null	Thu Aug 27 09:39:59 2026
+++ pkgsrc/print/hplip/patches/patch-ui5_devmgr5.py	Thu Aug 27 09:39:59 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-ui5_devmgr5.py,v 1.1 2026/08/27 09:39:59 wiz Exp $
+
+Adapt to Python 3.12 changes.
+
+--- ui5/devmgr5.py.orig	2026-08-27 09:36:12.651743936 +0000
++++ ui5/devmgr5.py
+@@ -1069,7 +1069,7 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QM
+ 
+                 hplip_conf = configparser.ConfigParser()
+                 fp = open("/etc/hp/hplip.conf", "r")
+-                hplip_conf.readfp(fp)
++                hplip_conf.read_file(fp, "/etc/hp/hplip.conf")
+                 fp.close()
+ 
+                 try:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.