[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-ports
Subject:    Re: [print/hplip] Fix printing a test page (lpr path)
From:       Antoine Jacoutot <ajacoutot () bsdfrog ! org>
Date:       2023-09-28 14:23:31
Message-ID: ZRWMY5IvNg1znQnY () janus ! obspm ! bsdfrog ! org
[Download RAW message or body]

On Thu, Sep 28, 2023 at 12:35:51PM +0200, David Coppa wrote:
> On Thu, 28 Sep 2023, Antoine Jacoutot wrote:
> 
> > Ok then. I will revisit the port anyway. 
> > But use LOCALBASE please. 
> 
> Commit the patch yourself if you want to, my account is probably
> long gone since I haven't committed anything in years.

Committed, thanks.


> 
> Thanks,
> David
> 
> Index: print/hplip/Makefile
> ===================================================================
> RCS file: /cvs/ports/print/hplip/Makefile,v
> retrieving revision 1.211
> diff -u -p -u -p -r1.211 Makefile
> --- print/hplip/Makefile	7 Jun 2023 15:45:56 -0000	1.211
> +++ print/hplip/Makefile	28 Sep 2023 05:40:49 -0000
> @@ -18,6 +18,9 @@ PKGNAME-hpcups=		hpcups-${V}
> PKGNAME-hpijs=		hpijs-${V}
> PKGNAME-gui=		hplip-gui-${V}
> 
> +REVISION-main =		0
> +REVISION-gui =		0
> +
> SHARED_LIBS +=  hpdiscovery          0.0      # 0.1
> SHARED_LIBS +=  hpmud                2.0      # 0.6
> SHARED_LIBS +=  hpipp                0.0      # 0.1
> @@ -184,6 +187,7 @@ pre-configure:
> 		${WRKSRC}/ui4/devmgr5.py \
> 		${WRKSRC}/fax/backend/hpfax.py \
> 		${WRKSRC}/base/codes.py \
> +		${WRKSRC}/base/device.py \
> 		${WRKSRC}/base/g.py \
> 		${WRKSRC}/base/queues.py \
> 		${WRKSRC}/base/services.py \
> @@ -202,8 +206,11 @@ pre-configure:
> 		${WRKSRC}/scan.py \
> 		${WRKSRC}/setup.py \
> 		${WRKSRC}/ui4/nodevicesdialog.py \
> +		${WRKSRC}/ui4/printsettingstoolbox.py \
> +		${WRKSRC}/ui5/printsettingstoolbox.py \
> 		${WRKSRC}/ui/devmgr4.py \
> 		${WRKSRC}/ui/nodevicesform.py \
> +		${WRKSRC}/ui/scrollprint.py \
> 		${WRKSRC}/logcapture.py \
> 		${WRKSRC}/createPPD.sh
> 
> Index: print/hplip/patches/patch-base_device_py
> ===================================================================
> RCS file: print/hplip/patches/patch-base_device_py
> diff -N print/hplip/patches/patch-base_device_py
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ print/hplip/patches/patch-base_device_py	28 Sep 2023 05:40:49 -0000
> @@ -0,0 +1,15 @@
> +Index: base/device.py
> +--- base/device.py.orig
> ++++ base/device.py
> +@@ -2450,9 +2450,9 @@ Content-length: %d\r
> +                 if remove: rem_str = '-r'
> + 
> +                 if is_gzip:
> +-                    c = 'gunzip -c %s | lpr %s %s -P%s' % (file_name, raw_str, \
> rem_str, printer_name) ++                    c = 'gunzip -c %s | \
> ${LOCALBASE}/bin/lpr %s %s -P%s' % (file_name, raw_str, rem_str, printer_name) +    \
> else: +-                    c = 'lpr -P%s %s %s %s' % (printer_name, raw_str, \
> rem_str, file_name) ++                    c = '${LOCALBASE}/bin/lpr -P%s %s %s %s' \
> % (printer_name, raw_str, rem_str, file_name) + 
> +                 exit_code = os_utils.execute(c)
> + 
> Index: print/hplip/patches/patch-ui4_printsettingstoolbox_py
> ===================================================================
> RCS file: print/hplip/patches/patch-ui4_printsettingstoolbox_py
> diff -N print/hplip/patches/patch-ui4_printsettingstoolbox_py
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ print/hplip/patches/patch-ui4_printsettingstoolbox_py	28 Sep 2023 05:40:49 \
> -0000 @@ -0,0 +1,15 @@
> +Index: ui4/printsettingstoolbox.py
> +--- ui4/printsettingstoolbox.py.orig
> ++++ ui4/printsettingstoolbox.py
> +@@ -264,9 +264,9 @@ class PrintSettingsToolbox(QToolBox):
> + 
> +             if utils.which('lpr'):
> +                 if alt_nup:
> +-                    cmd = ' '.join(['psnup', '-%d' % nup, ''.join(['"', p, '"']), \
> '| lpr -P', self.cur_printer]) ++                    cmd = ' '.join(['psnup', '-%d' \
> % nup, ''.join(['"', p, '"']), '| ${LOCALBASE}/bin/lpr -P', self.cur_printer]) +    \
> else: +-                    cmd = ' '.join(['lpr -P', self.cur_printer])
> ++                    cmd = ' '.join(['${LOCALBASE}/bin/lpr -P', self.cur_printer])
> + 
> +                 if copies > 1:
> +                     cmd = ' '.join([cmd, '-#%d' % copies])
> Index: print/hplip/patches/patch-ui5_printsettingstoolbox_py
> ===================================================================
> RCS file: print/hplip/patches/patch-ui5_printsettingstoolbox_py
> diff -N print/hplip/patches/patch-ui5_printsettingstoolbox_py
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ print/hplip/patches/patch-ui5_printsettingstoolbox_py	28 Sep 2023 05:40:49 \
> -0000 @@ -0,0 +1,15 @@
> +Index: ui5/printsettingstoolbox.py
> +--- ui5/printsettingstoolbox.py.orig
> ++++ ui5/printsettingstoolbox.py
> +@@ -247,9 +247,9 @@ class PrintSettingsToolbox(QToolBox):
> + 
> +             if utils.which('lpr'):
> +                 if alt_nup:
> +-                    cmd = ' '.join(['psnup', '-%d' % nup, ''.join(['"', p, '"']), \
> '| lpr -P', self.cur_printer]) ++                    cmd = ' '.join(['psnup', '-%d' \
> % nup, ''.join(['"', p, '"']), '| ${LOCALBASE}/bin/lpr -P', self.cur_printer]) +    \
> else: +-                    cmd = ' '.join(['lpr -P', self.cur_printer])
> ++                    cmd = ' '.join(['${LOCALBASE}/bin/lpr -P', self.cur_printer])
> + 
> +                 if copies > 1:
> +                     cmd = ' '.join([cmd, '-#%d' % copies])
> Index: print/hplip/patches/patch-ui_scrollprint_py
> ===================================================================
> RCS file: print/hplip/patches/patch-ui_scrollprint_py
> diff -N print/hplip/patches/patch-ui_scrollprint_py
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ print/hplip/patches/patch-ui_scrollprint_py	28 Sep 2023 05:40:49 -0000
> @@ -0,0 +1,15 @@
> +Index: ui/scrollprint.py
> +--- ui/scrollprint.py.orig
> ++++ ui/scrollprint.py
> +@@ -988,9 +988,9 @@ class ScrollPrintView(ScrollView):
> + 
> +                     if utils.which('lpr'):
> +                         if alt_nup:
> +-                            cmd = ' '.join(['psnup', '-%d' % nup, ''.join(['"', \
> p, '"']), '| lpr -P', self.cur_printer]) ++                            cmd = ' \
> '.join(['psnup', '-%d' % nup, ''.join(['"', p, '"']), '| ${LOCALBASE}/bin/lpr -P', \
> self.cur_printer]) +                         else:
> +-                            cmd = ' '.join(['lpr -P', self.cur_printer])
> ++                            cmd = ' '.join(['${LOCALBASE}/bin/lpr -P', \
> self.cur_printer]) + 
> +                         if copies > 1:
> +                             cmd = ' '.join([cmd, '-#%d' % copies])

-- 
Antoine


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic