Thu Aug 27 23:53:24 2015 UTC ()
Import a few fixes to print/hplip

These changes:
- fix paths for /etc and /var after those of Python installer files
- while there, fix paths in additional files
- locate libraries on systems without ldconfig(8)

This is particularly relevant for some of the tools installed, like
hp-check (which still doesn't complete). With these changes, I can print
again with my M276n printer.


(khorben)
diff -r1.45 -r1.46 pkgsrc/print/hplip/Makefile
diff -r1.18 -r1.19 pkgsrc/print/hplip/distinfo
diff -r1.3 -r1.4 pkgsrc/print/hplip/patches/patch-aa
diff -r1.8 -r1.9 pkgsrc/print/hplip/patches/patch-ae
diff -r0 -r1.1 pkgsrc/print/hplip/patches/patch-installer_dcheck.py

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

--- pkgsrc/print/hplip/Makefile 2015/08/16 22:00:38 1.45
+++ pkgsrc/print/hplip/Makefile 2015/08/27 23:53:24 1.46
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.45 2015/08/16 22:00:38 leot Exp $ 1# $NetBSD: Makefile,v 1.46 2015/08/27 23:53:24 khorben Exp $
2 2
3DISTNAME= hplip-3.15.7 3DISTNAME= hplip-3.15.7
4PKGREVISION= 1 4PKGREVISION= 2
5CATEGORIES= print 5CATEGORIES= print
6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hplip/} 6MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hplip/}
7 7
8MAINTAINER= schnoebe@NetBSD.org 8MAINTAINER= schnoebe@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
15FILES_SUBST+= CUPS_USER=${CUPS_USER} 15FILES_SUBST+= CUPS_USER=${CUPS_USER}
16FILES_SUBST+= CUPS_GROUP=${CUPS_GROUP} 16FILES_SUBST+= CUPS_GROUP=${CUPS_GROUP}
17 17
@@ -80,51 +80,53 @@ SUBST_FILES.fix-python+= base/utils.py b @@ -80,51 +80,53 @@ SUBST_FILES.fix-python+= base/utils.py b
80SUBST_FILES.fix-python+= installer/core_install.py 80SUBST_FILES.fix-python+= installer/core_install.py
81SUBST_FILES.fix-python+= ui/nodevicesform.py ui/devmgr4.py 81SUBST_FILES.fix-python+= ui/nodevicesform.py ui/devmgr4.py
82SUBST_FILES.fix-python+= ui4/nodevicesdialog.py ui4/devmgr5.py 82SUBST_FILES.fix-python+= ui4/nodevicesdialog.py ui4/devmgr5.py
83SUBST_SED.fix-python= -e 's,\(['\''"]\)python ,\1${PYTHONBIN} ,g' 83SUBST_SED.fix-python= -e 's,\(['\''"]\)python ,\1${PYTHONBIN} ,g'
84 84
85SUBST_CLASSES+= fix-paths-0 85SUBST_CLASSES+= fix-paths-0
86SUBST_STAGE.fix-paths-0= pre-configure 86SUBST_STAGE.fix-paths-0= pre-configure
87SUBST_MESSAGE.fix-paths-0= Fixing /var/run in hplip.conf.in. 87SUBST_MESSAGE.fix-paths-0= Fixing /var/run in hplip.conf.in.
88SUBST_FILES.fix-paths-0= hplip.conf.in 88SUBST_FILES.fix-paths-0= hplip.conf.in
89SUBST_SED.fix-paths-0= -e 's,run=/var/run,run=${VARBASE}/run,g' 89SUBST_SED.fix-paths-0= -e 's,run=/var/run,run=${VARBASE}/run,g'
90 90
91SUBST_CLASSES+= fix-paths-1 91SUBST_CLASSES+= fix-paths-1
92SUBST_STAGE.fix-paths-1= post-configure 92SUBST_STAGE.fix-paths-1= post-configure
93SUBST_MESSAGE.fix-paths-1= Fixing /etc and /var paths in Python and C++ files. 93SUBST_MESSAGE.fix-paths-1= Fixing paths in Python installer files.
94SUBST_FILES.fix-paths-1= check.py base/codes.py base/g.py base/utils.py 94SUBST_FILES.fix-paths-1= installer/core_install.py
95SUBST_FILES.fix-paths-1+= installer/core_install.py 95SUBST_FILES.fix-paths-1+= installer/dcheck.py
96SUBST_FILES.fix-paths-1+= fax/backend/hpfax.py prnt/cups.py 96SUBST_SED.fix-paths-1= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
97SUBST_FILES.fix-paths-1+= ui/devmgr4.py ui4/devmgr5.py 97SUBST_SED.fix-paths-1+= -e 's,"/etc/PolicyKit,"${PKG_SYSCONFDIR}/PolicyKit,g'
98SUBST_FILES.fix-paths-1+= prnt/filters/hpps 98SUBST_SED.fix-paths-1+= -e 's,"/etc/polkit-1,"${PKG_SYSCONFDIR}/polkit-1,g'
99SUBST_FILES.fix-paths-1+= prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/Utils.cpp 99SUBST_SED.fix-paths-1+= -e 's,"file:///etc/hp,"file://${PKG_SYSCONFDIR}/hp,g'
100SUBST_FILES.fix-paths-1+= prnt/hpijs/globals.cpp prnt/hpijs/hpcupsfax.cpp 100SUBST_SED.fix-paths-1+= -e 's,"/usr/lib/cups/driver,"${PREFIX}/libexec/cups/driver,g'
101SUBST_FILES.fix-paths-1+= prnt/hpijs/hpijs.cpp 
102SUBST_SED.fix-paths-1= -e 's,\([ '\''"=]\)/etc/hp,\1${PKG_SYSCONFDIR}/hp,g' 
103SUBST_SED.fix-paths-1+= -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g' 
104SUBST_SED.fix-paths-1+= -e 's,\([ '\''"=]\)/etc/sane.d,\1${PKG_SYSCONFDIR}/sane.d,g' 
105SUBST_SED.fix-paths-1+= -e 's,\([ '\''"=]\)/var/lib/hp,\1${VARBASE}/lib/hp,g' 
106SUBST_SED.fix-paths-1+= -e 's,\([ '\''"=]\)/var/log/cups,\1${VARBASE}/log/cups,g' 
107SUBST_SED.fix-paths-1+= -e 's,\([ '\''"=]\)/var/spool/cups,\1${VARBASE}/spool/cups,g' 
108 101
109SUBST_CLASSES+= fix-paths-2 102SUBST_CLASSES+= fix-paths-2
110SUBST_STAGE.fix-paths-2= post-configure 103SUBST_STAGE.fix-paths-2= post-configure
111SUBST_MESSAGE.fix-paths-2= Fixing additional paths in installer/core_install.py. 104SUBST_MESSAGE.fix-paths-2= Fixing /etc and /var paths in Python and C++ files.
112SUBST_FILES.fix-paths-2= installer/core_install.py 105SUBST_FILES.fix-paths-2= check.py base/codes.py base/g.py base/utils.py
113SUBST_SED.fix-paths-2= -e 's,"/etc/PolicyKit,"${PKG_SYSCONFDIR}/PolicyKit,g' 106SUBST_FILES.fix-paths-2+= base/codes.py base/g.py base/queues.py base/utils.py
114SUBST_SED.fix-paths-2+= -e 's,"/etc/polkit-1,"${PKG_SYSCONFDIR}/polkit-1,g' 107SUBST_FILES.fix-paths-2+= installer/core_install.py
115SUBST_SED.fix-paths-2+= -e 's,"file:///etc/hp,"file://${PKG_SYSCONFDIR}/hp,g' 108SUBST_FILES.fix-paths-2+= fax/backend/hpfax.py prnt/cups.py
116SUBST_SED.fix-paths-2+= -e 's,"/usr/lib/cups/driver,"${PREFIX}/libexec/cups/driver,g' 109SUBST_FILES.fix-paths-2+= ui/devmgr4.py ui4/devmgr5.py
117SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g' 110SUBST_FILES.fix-paths-2+= prnt/filters/hpps
 111SUBST_FILES.fix-paths-2+= prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/Utils.cpp
 112SUBST_FILES.fix-paths-2+= prnt/hpijs/globals.cpp prnt/hpijs/hpcupsfax.cpp
 113SUBST_FILES.fix-paths-2+= prnt/hpijs/hpijs.cpp
 114SUBST_SED.fix-paths-2= -e 's,\([ '\''"=]\)/etc/hp,\1${PKG_SYSCONFDIR}/hp,g'
 115SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g'
 116SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/etc/sane.d,\1${PKG_SYSCONFDIR}/sane.d,g'
 117SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/lib/hp,\1${VARBASE}/lib/hp,g'
 118SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/log/cups,\1${VARBASE}/log/cups,g'
 119SUBST_SED.fix-paths-2+= -e 's,\([ '\''"=]\)/var/spool/cups,\1${VARBASE}/spool/cups,g'
118 120
119SUBST_CLASSES+= fix-paths-3 121SUBST_CLASSES+= fix-paths-3
120SUBST_STAGE.fix-paths-3= post-configure 122SUBST_STAGE.fix-paths-3= post-configure
121SUBST_MESSAGE.fix-paths-3= Fixing additional paths in base/pkit.py. 123SUBST_MESSAGE.fix-paths-3= Fixing additional paths in base/pkit.py.
122SUBST_FILES.fix-paths-3= base/pkit.py 124SUBST_FILES.fix-paths-3= base/pkit.py
123SUBST_SED.fix-paths-3= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g' 125SUBST_SED.fix-paths-3= -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
124 126
125SUBST_CLASSES+= fix-paths-4 127SUBST_CLASSES+= fix-paths-4
126SUBST_STAGE.fix-paths-4= post-configure 128SUBST_STAGE.fix-paths-4= post-configure
127SUBST_MESSAGE.fix-paths-4= Fixing default PPD search path in base/g.py and prnt/cups.py. 129SUBST_MESSAGE.fix-paths-4= Fixing default PPD search path in base/g.py and prnt/cups.py.
128SUBST_FILES.fix-paths-4= base/g.py prnt/cups.py 130SUBST_FILES.fix-paths-4= base/g.py prnt/cups.py
129SUBST_SED.fix-paths-4= -e '\,ppd_search_path =, { s,/usr/\([a-z]*\);,/usr/\1;${PREFIX}/\1;,g ; }' 131SUBST_SED.fix-paths-4= -e '\,ppd_search_path =, { s,/usr/\([a-z]*\);,/usr/\1;${PREFIX}/\1;,g ; }'
130SUBST_SED.fix-paths-4+= -e 's,\([ '\''"=]\)/usr/share/ppd,\1${PREFIX}/share/ppd,g' 132SUBST_SED.fix-paths-4+= -e 's,\([ '\''"=]\)/usr/share/ppd,\1${PREFIX}/share/ppd,g'

cvs diff -r1.18 -r1.19 pkgsrc/print/hplip/distinfo (expand / switch to unified diff)

--- pkgsrc/print/hplip/distinfo 2015/08/14 19:45:29 1.18
+++ pkgsrc/print/hplip/distinfo 2015/08/27 23:53:24 1.19
@@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
1$NetBSD: distinfo,v 1.18 2015/08/14 19:45:29 schnoebe Exp $ 1$NetBSD: distinfo,v 1.19 2015/08/27 23:53:24 khorben Exp $
2 2
3SHA1 (hplip-3.15.7.tar.gz) = f84e33b749ef34939c11b253767686c00ca2c30c 3SHA1 (hplip-3.15.7.tar.gz) = f84e33b749ef34939c11b253767686c00ca2c30c
4RMD160 (hplip-3.15.7.tar.gz) = b8f5b9be838ed9261cb208df46b5aa7ef6680e31 4RMD160 (hplip-3.15.7.tar.gz) = b8f5b9be838ed9261cb208df46b5aa7ef6680e31
5Size (hplip-3.15.7.tar.gz) = 21979938 bytes 5Size (hplip-3.15.7.tar.gz) = 21979938 bytes
6SHA1 (patch-aa) = 68bede16003a2d43c93a0ef547857b9e4196312e 6SHA1 (patch-aa) = 8eb162708a48e9b1720245f65f01177418a4ed85
7SHA1 (patch-ab) = 82b8ab80f778a6a31c1031688d9a16dbd4c55462 7SHA1 (patch-ab) = 82b8ab80f778a6a31c1031688d9a16dbd4c55462
8SHA1 (patch-ae) = 0dfdef7ebb56b04c7d910bf0add1a035fc32a7e7 8SHA1 (patch-ae) = c4bae69fce7d9061d4c7dc53f1f8c5404577c605
 9SHA1 (patch-installer_dcheck.py) = e381086ccdfbdcd84d3ffe29995d5d3643709be6
9SHA1 (patch-io_hpmud_musb.h) = ad634f5a1f426877e1c88916b6468fcdb7598555 10SHA1 (patch-io_hpmud_musb.h) = ad634f5a1f426877e1c88916b6468fcdb7598555
10SHA1 (patch-prnt_hpijs_context2.cpp) = f81148c1c334a9074453b27ac055833cd1669bd0 11SHA1 (patch-prnt_hpijs_context2.cpp) = f81148c1c334a9074453b27ac055833cd1669bd0
11SHA1 (patch-prnt_hpijs_foomatic-rip-hplip) = a94c7bbdc90dd68d001ce0325b7aabcd470233eb 12SHA1 (patch-prnt_hpijs_foomatic-rip-hplip) = a94c7bbdc90dd68d001ce0325b7aabcd470233eb
12SHA1 (patch-prnt_hpijs_hjzjscolor.cpp) = 5ca9c828ba4aff17a54a803d79c2dc169975d50c 13SHA1 (patch-prnt_hpijs_hjzjscolor.cpp) = 5ca9c828ba4aff17a54a803d79c2dc169975d50c
13SHA1 (patch-scan.py) = 4d942ee0580d5f1818e43164c07edd018529395d 14SHA1 (patch-scan.py) = 4d942ee0580d5f1818e43164c07edd018529395d

cvs diff -r1.3 -r1.4 pkgsrc/print/hplip/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/print/hplip/patches/Attic/patch-aa 2013/10/30 23:37:31 1.3
+++ pkgsrc/print/hplip/patches/Attic/patch-aa 2015/08/27 23:53:24 1.4
@@ -1,40 +1,40 @@ @@ -1,40 +1,40 @@
1$NetBSD: patch-aa,v 1.3 2013/10/30 23:37:31 schnoebe Exp $ 1$NetBSD: patch-aa,v 1.4 2015/08/27 23:53:24 khorben Exp $
2 2
3# lots of portability changes to configure.in, removing hard-coded paths 3# lots of portability changes to configure.in, removing hard-coded paths
4# and pulling in the dynamic library loading modules.. 4# and pulling in the dynamic library loading modules..
5 5
6# pushed upstream as https://bugs.launchpad.net/hplip/+bug/726207 6# pushed upstream as https://bugs.launchpad.net/hplip/+bug/726207
7 7
8--- configure.in.orig 2013-10-11 09:40:26.000000000 +0000 8--- configure.in.orig 2015-06-07 19:25:40.000000000 +0000
9+++ configure.in 9+++ configure.in
10@@ -34,14 +34,15 @@ AC_DISABLE_STATIC 10@@ -34,14 +34,15 @@ AC_DISABLE_STATIC
11 # Checks for programs. 11 # Checks for programs.
12 AC_PROG_CXX 12 AC_PROG_CXX
13 AC_PROG_CC 13 AC_PROG_CC
14+AM_PROG_CC_C_O 14+AM_PROG_CC_C_O
15 AC_PROG_INSTALL 15 AC_PROG_INSTALL
16+AC_LIBTOOL_DLOPEN 16+AC_LIBTOOL_DLOPEN
17 AC_PROG_LIBTOOL 17 AC_PROG_LIBTOOL
18  18
19 # Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile. 19 # Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile.
20 AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)]) 20 AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)])
21 AC_CHECK_LIB([m], [pow], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libm math support], 10)]) 21 AC_CHECK_LIB([m], [pow], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libm math support], 10)])
22 AC_CHECK_LIB([jpeg], [jpeg_set_defaults],[LIBS="$LIBS"], [AC_MSG_ERROR(["cannot find libjpeg support"], 102)]) 22 AC_CHECK_LIB([jpeg], [jpeg_set_defaults],[LIBS="$LIBS"], [AC_MSG_ERROR(["cannot find libjpeg support"], 102)])
23-AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS" AC_DEFINE([HAVE_LIBDL])], [AC_MSG_ERROR(["cannot find libdl support"], 104)]) 23-AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS" AC_DEFINE([HAVE_LIBDL])], [AC_MSG_ERROR(["cannot find libdl support"], 104)])
24  24
25 # Checks for required header files. 25 # Checks for required header files.
26 AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([cannot find pthread-devel support], 7)]) 26 AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([cannot find pthread-devel support], 7)])
27@@ -324,25 +325,25 @@ else 27@@ -316,25 +317,25 @@ else
28 fi 28 fi
29 AM_CONDITIONAL(LIBUSB01_BUILD, test x$libusb01_build = xyes) 29 AM_CONDITIONAL(LIBUSB01_BUILD, test x$libusb01_build = xyes)
30  30
31-AC_ARG_WITH(cupsbackenddir, AC_HELP_STRING([--with-cupsbackenddir=DIR], [set cups backend install directory [default=/usr/lib/cups/backend]]), 31-AC_ARG_WITH(cupsbackenddir, AC_HELP_STRING([--with-cupsbackenddir=DIR], [set cups backend install directory [default=/usr/lib/cups/backend]]),
32- cupsbackenddir=$withval, cupsbackenddir="/usr/lib/cups/backend") 32- cupsbackenddir=$withval, cupsbackenddir="/usr/lib/cups/backend")
33+AC_ARG_WITH(cupsbackenddir, AC_HELP_STRING([--with-cupsbackenddir=DIR], [set cups backend install directory [default=libdir/cups/backend]]), 33+AC_ARG_WITH(cupsbackenddir, AC_HELP_STRING([--with-cupsbackenddir=DIR], [set cups backend install directory [default=libdir/cups/backend]]),
34+ cupsbackenddir=$withval, cupsbackenddir="$libdir/cups/backend") 34+ cupsbackenddir=$withval, cupsbackenddir="$libdir/cups/backend")
35  35
36-AC_ARG_WITH(cupsfilterdir, AC_HELP_STRING([--with-cupsfilterdir=DIR], [set cups filter install directory [default=/usr/lib/cups/filter]]), 36-AC_ARG_WITH(cupsfilterdir, AC_HELP_STRING([--with-cupsfilterdir=DIR], [set cups filter install directory [default=/usr/lib/cups/filter]]),
37- cupsfilterdir=$withval, cupsfilterdir="/usr/lib/cups/filter") 37- cupsfilterdir=$withval, cupsfilterdir="/usr/lib/cups/filter")
38+AC_ARG_WITH(cupsfilterdir, AC_HELP_STRING([--with-cupsfilterdir=DIR], [set cups filter install directory [default=libdir/cups/filter]]), 38+AC_ARG_WITH(cupsfilterdir, AC_HELP_STRING([--with-cupsfilterdir=DIR], [set cups filter install directory [default=libdir/cups/filter]]),
39+ cupsfilterdir=$withval, cupsfilterdir="$libdir/cups/filter") 39+ cupsfilterdir=$withval, cupsfilterdir="$libdir/cups/filter")
40  40
@@ -51,39 +51,39 @@ $NetBSD: patch-aa,v 1.3 2013/10/30 23:37 @@ -51,39 +51,39 @@ $NetBSD: patch-aa,v 1.3 2013/10/30 23:37
51 AC_ARG_WITH(hpppddir, AC_HELP_STRING([--with-hpppddir=DIR], [set hp ppd install directory [default=datadir/ppd/HP]]), 51 AC_ARG_WITH(hpppddir, AC_HELP_STRING([--with-hpppddir=DIR], [set hp ppd install directory [default=datadir/ppd/HP]]),
52 hpppddir=$withval, hpppddir="$datadir/ppd/HP") 52 hpppddir=$withval, hpppddir="$datadir/ppd/HP")
53  53
54-if test -f "/usr/share/cups/mime/mime.types"; then  54-if test -f "/usr/share/cups/mime/mime.types"; then
55- abs_mimedir="/usr/share/cups/mime/" 55- abs_mimedir="/usr/share/cups/mime/"
56+if test -f "$datadir/cups/mime/mime.types"; then  56+if test -f "$datadir/cups/mime/mime.types"; then
57+ abs_mimedir="$datadir/cups/mime/" 57+ abs_mimedir="$datadir/cups/mime/"
58 else 58 else
59- abs_mimedir="/etc/cups/" 59- abs_mimedir="/etc/cups/"
60+ abs_mimedir="$sysconfdir/etc/cups/" 60+ abs_mimedir="$sysconfdir/etc/cups/"
61 fi 61 fi
62 AC_ARG_WITH(mimedir, AC_HELP_STRING([--with-mimedir=DIR], [set cups mime.types location [default=abs_mimedir]]), 62 AC_ARG_WITH(mimedir, AC_HELP_STRING([--with-mimedir=DIR], [set cups mime.types location [default=abs_mimedir]]),
63 mimedir=$withval, mimedir="$abs_mimedir") 63 mimedir=$withval, mimedir="$abs_mimedir")
64@@ -471,12 +472,12 @@ AM_CONDITIONAL(POLICYKIT_INSTALL, test x 64@@ -467,12 +468,12 @@ AM_CONDITIONAL(POLICYKIT_INSTALL, test x
65  65
66 # Determine where the PolicyKit policy file goes 66 # Determine where the PolicyKit policy file goes
67 if test "$policykit" = "yes"; then 67 if test "$policykit" = "yes"; then
68- if test -d /usr/share/polkit-1; then 68- if test -d /usr/share/polkit-1; then
69- policykit_dir=/usr/share/polkit-1/actions 69- policykit_dir=/usr/share/polkit-1/actions
70- elif test -d /usr/share/PolicyKit; then 70- elif test -d /usr/share/PolicyKit; then
71- policykit_dir=/usr/share/PolicyKit/policy 71- policykit_dir=/usr/share/PolicyKit/policy
72+ if test -d "$datadir/polkit-1"; then 72+ if test -d "$datadir/polkit-1"; then
73+ policykit_dir="$datadir/polkit-1/actions" 73+ policykit_dir="$datadir/polkit-1/actions"
74+ elif test -d "$datadir/PolicyKit"; then 74+ elif test -d "$datadir/PolicyKit"; then
75+ policykit_dir="$datadir/PolicyKit/policy" 75+ policykit_dir="$datadir/PolicyKit/policy"
76 else 76 else
77- policykit_dir=/usr/share/PolicyKit/policy 77- policykit_dir=/usr/share/PolicyKit/policy
78+ policykit_dir="$datadir/PolicyKit/policy" 78+ policykit_dir="$datadir/PolicyKit/policy"
79 fi 79 fi
80 else 80 else
81 policykit_dir= 81 policykit_dir=
82@@ -582,6 +583,7 @@ AC_DEFINE_DIR([abs_sbindir], [sbindir]) 82@@ -581,6 +582,7 @@ AC_DEFINE_DIR([abs_sbindir], [sbindir])
83 AC_DEFINE_DIR([abs_hpppddir], [hpppddir]) 83 AC_DEFINE_DIR([abs_hpppddir], [hpppddir])
84 AC_DEFINE_DIR([abs_docdir], [hpdocdir]) 84 AC_DEFINE_DIR([abs_docdir], [hpdocdir])
85 AC_DEFINE_DIR([abs_htmldir], [hphtmldir]) 85 AC_DEFINE_DIR([abs_htmldir], [hphtmldir])
86+AC_DEFINE_DIR([abs_icondir], [icondir]) 86+AC_DEFINE_DIR([abs_icondir], [icondir])
87 abs_ppddir=${abs_hpppddir%/*} 87 abs_ppddir=${abs_hpppddir%/*}
88 AC_DEFINE_DIR([abs_drvdir], [drvdir]) 88 AC_DEFINE_DIR([abs_drvdir], [drvdir])
89  89

cvs diff -r1.8 -r1.9 pkgsrc/print/hplip/patches/patch-ae (expand / switch to unified diff)

--- pkgsrc/print/hplip/patches/patch-ae 2013/10/30 23:37:31 1.8
+++ pkgsrc/print/hplip/patches/patch-ae 2015/08/27 23:53:24 1.9
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1$NetBSD: patch-ae,v 1.8 2013/10/30 23:37:31 schnoebe Exp $ 1$NetBSD: patch-ae,v 1.9 2015/08/27 23:53:24 khorben Exp $
2 2
3# Conform to autoconf's standard variable usage, making it easier 3# Conform to autoconf's standard variable usage, making it easier
4# to install on pkgsrc platforms 4# to install on pkgsrc platforms
5 5
6# reported upstream as https://bugs.launchpad.net/hplip/+bug/726218 6# reported upstream as https://bugs.launchpad.net/hplip/+bug/726218
7 7
8# still needs to handle the buildlink path for libusb-1.0 :( 8# still needs to handle the buildlink path for libusb-1.0 :(
9# schnoebe -- Fri May 24 14:55:57 CDT 2013 9# schnoebe -- Fri May 24 14:55:57 CDT 2013
10 10
11--- Makefile.am.orig 2013-10-11 09:40:14.000000000 +0000 11--- Makefile.am.orig 2015-06-07 19:25:33.000000000 +0000
12+++ Makefile.am 12+++ Makefile.am
13@@ -105,22 +105,22 @@ libhpip_la_SOURCES = ip/xconvolve.c ip/x 13@@ -105,22 +105,22 @@ libhpip_la_SOURCES = ip/xconvolve.c ip/x
14  14
15  15
16 #hpmud rules data dir 16 #hpmud rules data dir
17-rulessystemdir=/usr/lib/systemd/system 17-rulessystemdir=/usr/lib/systemd/system
18+rulessystemdir=$(sysconfdir)/systemd/system 18+rulessystemdir=$(sysconfdir)/systemd/system
19 dist_rulessystem_DATA =data/rules/hplip-printer@.service 19 dist_rulessystem_DATA =data/rules/hplip-printer@.service
20  20
21 # hpmud.rules 21 # hpmud.rules
22-rulesdir = /etc/udev/rules.d 22-rulesdir = /etc/udev/rules.d
23+rulesdir = $(sysconfdir)/udev/rules.d 23+rulesdir = $(sysconfdir)/udev/rules.d
24 if UDEV_SYSFS_RULES 24 if UDEV_SYSFS_RULES
@@ -36,39 +36,39 @@ $NetBSD: patch-ae,v 1.8 2013/10/30 23:37 @@ -36,39 +36,39 @@ $NetBSD: patch-ae,v 1.8 2013/10/30 23:37
36+hplip_confdir = $(sysconfdir)/hp 36+hplip_confdir = $(sysconfdir)/hp
37 hplip_conf_DATA = hplip.conf 37 hplip_conf_DATA = hplip.conf
38  38
39 #pstotiff filter 39 #pstotiff filter
40@@ -128,7 +128,7 @@ pstotiffdir = $(cupsfilterdir) 40@@ -128,7 +128,7 @@ pstotiffdir = $(cupsfilterdir)
41 pstotiff_SCRIPTS = fax/filters/pstotiff 41 pstotiff_SCRIPTS = fax/filters/pstotiff
42  42
43 # hplip.state 43 # hplip.state
44-hplip_statedir = /var/lib/hp 44-hplip_statedir = /var/lib/hp
45+hplip_statedir = $(localstatedir)/lib/hp 45+hplip_statedir = $(localstatedir)/lib/hp
46 dist_hplip_state_DATA = 46 dist_hplip_state_DATA =
47  47
48 if FULL_BUILD 48 if FULL_BUILD
49@@ -344,9 +344,9 @@ endif 49@@ -359,9 +359,9 @@ endif
50  50
51 # PolicyKit 51 # PolicyKit
52 if POLICYKIT_INSTALL 52 if POLICYKIT_INSTALL
53-policykit_dbus_etcdir = /etc/dbus-1/system.d 53-policykit_dbus_etcdir = /etc/dbus-1/system.d
54+policykit_dbus_etcdir = $(sysconfdir)/dbus-1/system.d 54+policykit_dbus_etcdir = $(sysconfdir)/dbus-1/system.d
55 dist_policykit_dbus_etc_DATA = data/policykit/com.hp.hplip.conf 55 dist_policykit_dbus_etc_DATA = data/policykit/com.hp.hplip.conf
56-policykit_dbus_sharedir = /usr/share/dbus-1/system-services 56-policykit_dbus_sharedir = /usr/share/dbus-1/system-services
57+policykit_dbus_sharedir = $(datadir)/dbus-1/system-services 57+policykit_dbus_sharedir = $(datadir)/dbus-1/system-services
58 dist_policykit_dbus_share_DATA = data/policykit/com.hp.hplip.service 58 dist_policykit_dbus_share_DATA = data/policykit/com.hp.hplip.service
59 policykit_policydir = $(policykit_dir) 59 policykit_policydir = $(policykit_dir)
60 dist_policykit_policy_DATA = data/policykit/com.hp.hplip.policy 60 dist_policykit_policy_DATA = data/policykit/com.hp.hplip.policy
61@@ -525,13 +525,13 @@ install-data-hook: 61@@ -541,13 +541,13 @@ install-data-hook:
62 if HPLIP_BUILD 62 if HPLIP_BUILD
63 # If scanner build, add hpaio entry to sane dll.conf. 63 # If scanner build, add hpaio entry to sane dll.conf.
64 if [ "$(scan_build)" = "yes" ]; then \ 64 if [ "$(scan_build)" = "yes" ]; then \
65- $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \ 65- $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
66- if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \ 66- if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \
67- touch $(DESTDIR)/etc/sane.d/dll.conf; \ 67- touch $(DESTDIR)/etc/sane.d/dll.conf; \
68+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/sane.d; \ 68+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/sane.d; \
69+ if [ ! -f $(DESTDIR)$(sysconfdir)/sane.d/dll.conf ]; then \ 69+ if [ ! -f $(DESTDIR)$(sysconfdir)/sane.d/dll.conf ]; then \
70+ touch $(DESTDIR)$(sysconfdir)/sane.d/dll.conf; \ 70+ touch $(DESTDIR)$(sysconfdir)/sane.d/dll.conf; \
71 fi; \ 71 fi; \
72- if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \ 72- if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
73- echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \ 73- echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \
74- echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \ 74- echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \

File Added: pkgsrc/print/hplip/patches/patch-installer_dcheck.py
$NetBSD: patch-installer_dcheck.py,v 1.1 2015/08/27 23:53:24 khorben Exp $

Locate libraries on systems without ldconfig(8)

This only looks for libraries in pkgsrc's own library folder.

--- installer/dcheck.py.orig	2015-06-07 19:25:11.000000000 +0000
+++ installer/dcheck.py
@@ -99,6 +99,8 @@ def check_lib(lib, min_ver=0):
         #    pass
         #else:
         return True
+    elif check_file(lib+".so","/usr/lib"):
+        return True
     else:
         log.debug("Not found.")
         return False