Sat May 16 16:59:24 2020 UTC ()
print/hplip: clean up and adjust hard-coded paths in SUBST_FILES


(rillig)
diff -r1.88 -r1.89 pkgsrc/print/hplip/Makefile

cvs diff -r1.88 -r1.89 pkgsrc/print/hplip/Makefile (expand / switch to unified diff)

--- pkgsrc/print/hplip/Makefile 2020/03/10 22:10:52 1.88
+++ pkgsrc/print/hplip/Makefile 2020/05/16 16:59:24 1.89
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.88 2020/03/10 22:10:52 wiz Exp $ 1# $NetBSD: Makefile,v 1.89 2020/05/16 16:59:24 rillig Exp $
2 2
3DISTNAME= hplip-3.19.12 3DISTNAME= hplip-3.19.12
4PKGREVISION= 3 4PKGREVISION= 4
5CATEGORIES= print 5CATEGORIES= print
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hplip/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hplip/}
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= http://hplipopensource.com/ 9HOMEPAGE= http://hplipopensource.com/
10COMMENT= HP Linux Imaging and Printing 10COMMENT= HP Linux Imaging and Printing
11LICENSE= gnu-gpl-v2 AND mit AND modified-bsd 11LICENSE= gnu-gpl-v2 AND mit AND modified-bsd
12 12
13CONFLICTS+= hpijs-[0-9]* 13CONFLICTS+= hpijs-[0-9]*
14 14
15DEPENDS+= wget-[0-9]*:../../net/wget 15DEPENDS+= wget-[0-9]*:../../net/wget
16 16
17FILES_SUBST+= CUPS_USER=${CUPS_USER} 17FILES_SUBST+= CUPS_USER=${CUPS_USER}
@@ -66,27 +66,27 @@ CONF_FILES+= ${EGDIR}/${file} ${PKG_SYS @@ -66,27 +66,27 @@ CONF_FILES+= ${EGDIR}/${file} ${PKG_SYS
66.endfor 66.endfor
67CONF_FILES+= 67CONF_FILES+=
68 68
69REPLACE_PYTHON= *.py */*.py */*/*.py 69REPLACE_PYTHON= *.py */*.py */*/*.py
70REPLACE_PYTHON+= fax/filters/pstotiff 70REPLACE_PYTHON+= fax/filters/pstotiff
71REPLACE_PYTHON+= prnt/filters/hpps 71REPLACE_PYTHON+= prnt/filters/hpps
72REPLACE_PERL= prnt/hpijs/foomatic-rip-hplip 72REPLACE_PERL= prnt/hpijs/foomatic-rip-hplip
73 73
74PY_PATCHPLIST= yes 74PY_PATCHPLIST= yes
75 75
76SUBST_CLASSES+= fix-python 76SUBST_CLASSES+= fix-python
77SUBST_STAGE.fix-python= post-configure 77SUBST_STAGE.fix-python= post-configure
78SUBST_MESSAGE.fix-python= Fixing python invocations in Python files. 78SUBST_MESSAGE.fix-python= Fixing python invocations in Python files.
79SUBST_FILES.fix-python= check.py scan.py setup.py 79SUBST_FILES.fix-python= check.py setup.py
80SUBST_FILES.fix-python+= base/utils.py base/pkit.py 80SUBST_FILES.fix-python+= base/utils.py base/pkit.py
81SUBST_FILES.fix-python+= installer/core_install.py 81SUBST_FILES.fix-python+= installer/core_install.py
82SUBST_FILES.fix-python+= ui/nodevicesform.py ui/devmgr4.py 82SUBST_FILES.fix-python+= ui/nodevicesform.py ui/devmgr4.py
83SUBST_FILES.fix-python+= ui4/nodevicesdialog.py ui4/devmgr5.py 83SUBST_FILES.fix-python+= ui4/nodevicesdialog.py ui4/devmgr5.py
84SUBST_SED.fix-python= -e 's,\(['\''"]\)python ,\1${PYTHONBIN} ,g' 84SUBST_SED.fix-python= -e 's,\(['\''"]\)python ,\1${PYTHONBIN} ,g'
85 85
86SUBST_CLASSES+= fix-paths-0 86SUBST_CLASSES+= fix-paths-0
87SUBST_STAGE.fix-paths-0= pre-configure 87SUBST_STAGE.fix-paths-0= pre-configure
88SUBST_MESSAGE.fix-paths-0= Fixing /var/run in hplip.conf.in. 88SUBST_MESSAGE.fix-paths-0= Fixing /var/run in hplip.conf.in.
89SUBST_FILES.fix-paths-0= hplip.conf.in 89SUBST_FILES.fix-paths-0= hplip.conf.in
90SUBST_SED.fix-paths-0= -e 's,run=/var/run,run=${VARBASE}/run,g' 90SUBST_SED.fix-paths-0= -e 's,run=/var/run,run=${VARBASE}/run,g'
91 91
92SUBST_CLASSES+= fix-paths-1 92SUBST_CLASSES+= fix-paths-1
@@ -94,34 +94,34 @@ SUBST_STAGE.fix-paths-1= post-configure @@ -94,34 +94,34 @@ SUBST_STAGE.fix-paths-1= post-configure
94SUBST_MESSAGE.fix-paths-1= Fixing paths in Python installer files. 94SUBST_MESSAGE.fix-paths-1= Fixing paths in Python installer files.
95SUBST_FILES.fix-paths-1= installer/core_install.py 95SUBST_FILES.fix-paths-1= installer/core_install.py
96SUBST_FILES.fix-paths-1+= installer/dcheck.py 96SUBST_FILES.fix-paths-1+= installer/dcheck.py
97SUBST_SED.fix-paths-1= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g' 97SUBST_SED.fix-paths-1= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
98SUBST_SED.fix-paths-1+= -e 's,"/etc/PolicyKit,"${PKG_SYSCONFDIR}/PolicyKit,g' 98SUBST_SED.fix-paths-1+= -e 's,"/etc/PolicyKit,"${PKG_SYSCONFDIR}/PolicyKit,g'
99SUBST_SED.fix-paths-1+= -e 's,"/etc/polkit-1,"${PKG_SYSCONFDIR}/polkit-1,g' 99SUBST_SED.fix-paths-1+= -e 's,"/etc/polkit-1,"${PKG_SYSCONFDIR}/polkit-1,g'
100SUBST_SED.fix-paths-1+= -e 's,"file:///etc/hp,"file://${PKG_SYSCONFDIR}/hp,g' 100SUBST_SED.fix-paths-1+= -e 's,"file:///etc/hp,"file://${PKG_SYSCONFDIR}/hp,g'
101SUBST_SED.fix-paths-1+= -e 's,"/usr/lib/cups/driver,"${PREFIX}/libexec/cups/driver,g' 101SUBST_SED.fix-paths-1+= -e 's,"/usr/lib/cups/driver,"${PREFIX}/libexec/cups/driver,g'
102 102
103SUBST_CLASSES+= fix-paths-2 103SUBST_CLASSES+= fix-paths-2
104SUBST_STAGE.fix-paths-2= post-configure 104SUBST_STAGE.fix-paths-2= post-configure
105SUBST_MESSAGE.fix-paths-2= Fixing /etc and /var paths in Python and C++ files. 105SUBST_MESSAGE.fix-paths-2= Fixing /etc and /var paths in Python and C++ files.
106SUBST_FILES.fix-paths-2= check.py base/codes.py base/g.py base/utils.py 106SUBST_FILES.fix-paths-2= check.py base/codes.py base/g.py base/utils.py
107SUBST_FILES.fix-paths-2+= base/codes.py base/g.py base/queues.py base/utils.py 107SUBST_FILES.fix-paths-2+= base/queues.py installer/core_install.py
108SUBST_FILES.fix-paths-2+= installer/core_install.py 
109SUBST_FILES.fix-paths-2+= fax/backend/hpfax.py prnt/cups.py 108SUBST_FILES.fix-paths-2+= fax/backend/hpfax.py prnt/cups.py
110SUBST_FILES.fix-paths-2+= ui/devmgr4.py ui4/devmgr5.py 109SUBST_FILES.fix-paths-2+= ui/devmgr4.py ui4/devmgr5.py
111SUBST_FILES.fix-paths-2+= prnt/filters/hpps 110SUBST_FILES.fix-paths-2+= prnt/filters/hpps
112SUBST_FILES.fix-paths-2+= prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/Utils.cpp 
113SUBST_FILES.fix-paths-2+= prnt/hpijs/globals.cpp prnt/hpijs/hpcupsfax.cpp 111SUBST_FILES.fix-paths-2+= prnt/hpijs/globals.cpp prnt/hpijs/hpcupsfax.cpp
114SUBST_FILES.fix-paths-2+= prnt/hpijs/hpijs.cpp 112SUBST_FILES.fix-paths-2+= prnt/hpijs/hpijs.cpp
 113SUBST_FILES.fix-paths-2+= prnt/hpps/hppsfilter.c # /etc/cups/cupsd.conf
 114SUBST_FILES.fix-paths-2+= common/utils.c # /etc/cups/cupsd.conf
115SUBST_SED.fix-paths-2= -e 's,\([ '\''"=]\)/etc/hp,\1${PKG_SYSCONFDIR}/hp,g' 115SUBST_SED.fix-paths-2= -e 's,\([ '\''"=]\)/etc/hp,\1${PKG_SYSCONFDIR}/hp,g'
116SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g' 116SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g'
117SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/sane.d,\1${PKG_SYSCONFDIR}/sane.d,g' 117SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/sane.d,\1${PKG_SYSCONFDIR}/sane.d,g'
118SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/lib/hp,\1${VARBASE}/lib/hp,g' 118SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/lib/hp,\1${VARBASE}/lib/hp,g'
119SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/log/cups,\1${VARBASE}/log/cups,g' 119SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/log/cups,\1${VARBASE}/log/cups,g'
120SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/spool/cups,\1${VARBASE}/spool/cups,g' 120SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/spool/cups,\1${VARBASE}/spool/cups,g'
121 121
122SUBST_CLASSES+= fix-paths-3 122SUBST_CLASSES+= fix-paths-3
123SUBST_STAGE.fix-paths-3= post-configure 123SUBST_STAGE.fix-paths-3= post-configure
124SUBST_MESSAGE.fix-paths-3= Fixing additional paths in base/pkit.py. 124SUBST_MESSAGE.fix-paths-3= Fixing additional paths in base/pkit.py.
125SUBST_FILES.fix-paths-3= base/pkit.py 125SUBST_FILES.fix-paths-3= base/pkit.py
126SUBST_SED.fix-paths-3= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g' 126SUBST_SED.fix-paths-3= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
127 127