From af147f2f361e342e1de8064ee22e1b86d395c7f9 Mon Sep 17 00:00:00 2001 From: jca Date: Mon, 30 Jan 2023 17:53:34 +0000 Subject: [PATCH] Disable pcard support, breaks with python3 and clang 15 Apparently this is about pre-USB "Photo Card" hardware, nobody seems to care. ok aja@ (maintainer) --- print/hplip/Makefile | 2 +- .../patches/patch-pcard_pcardext_pcardext_c | 21 +++++++++++++++++++ print/hplip/pkg/PLIST-main | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 print/hplip/patches/patch-pcard_pcardext_pcardext_c diff --git a/print/hplip/Makefile b/print/hplip/Makefile index 67c6b4b2538..789de2885dc 100644 --- a/print/hplip/Makefile +++ b/print/hplip/Makefile @@ -14,7 +14,7 @@ SUBST_VARS= V REVISION-common= 0 REVISION-gui= 0 REVISION-hpaio= 0 -REVISION-main= 0 +REVISION-main= 1 # https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1745383 MASTER_SITES0= https://src.fedoraproject.org/rpms/hplip/raw/rawhide/f/ diff --git a/print/hplip/patches/patch-pcard_pcardext_pcardext_c b/print/hplip/patches/patch-pcard_pcardext_pcardext_c new file mode 100644 index 00000000000..64d59fd94d8 --- /dev/null +++ b/print/hplip/patches/patch-pcard_pcardext_pcardext_c @@ -0,0 +1,21 @@ +Force-disable outdated python module which doesn't build with python3 and +clang 15. + +Index: pcard/pcardext/pcardext.c +--- pcard/pcardext/pcardext.c.orig ++++ pcard/pcardext/pcardext.c +@@ -24,6 +24,8 @@ Author: Don Welch + + \*****************************************************************************/ + ++#if 0 ++ + #define PY_SSIZE_T_CLEAN + + +@@ -246,4 +248,4 @@ void initpcardext( void ) + return; + } + +- ++#endif diff --git a/print/hplip/pkg/PLIST-main b/print/hplip/pkg/PLIST-main index 2d7655104d9..19aa9c813bb 100644 --- a/print/hplip/pkg/PLIST-main +++ b/print/hplip/pkg/PLIST-main @@ -24,7 +24,7 @@ bin/hp-unload bin/hp-upgrade @so lib/python${MODPY_VERSION}/site-packages/cupsext.so @so lib/python${MODPY_VERSION}/site-packages/hpmudext.so -@so lib/python${MODPY_VERSION}/site-packages/pcardext.so +@comment @so lib/python${MODPY_VERSION}/site-packages/pcardext.so share/doc/hplip/ share/doc/hplip/COPYING share/doc/hplip/README_LIBJPG