diff options
author | makc <makc@FreeBSD.org> | 2014-04-18 17:35:12 +0800 |
---|---|---|
committer | makc <makc@FreeBSD.org> | 2014-04-18 17:35:12 +0800 |
commit | c1ac2f8769e8d539c381b3ed445a8f7e7303152f (patch) | |
tree | 548a7e8d43141fa359f04a1399de9f891b78897e /print/hplip-plugin | |
parent | 24795f34832e83cd2d826b9a5bc37d297e32645e (diff) | |
download | freebsd-ports-gnome-c1ac2f8769e8d539c381b3ed445a8f7e7303152f.tar.gz freebsd-ports-gnome-c1ac2f8769e8d539c381b3ed445a8f7e7303152f.tar.zst freebsd-ports-gnome-c1ac2f8769e8d539c381b3ed445a8f7e7303152f.zip |
print/hplip:
- Update to 3.14.4
- Install statically generated cups ppd files
- Add patch to fix ioctl warning
print/hplip-plugin:
- Update to 3.14.4
- Add stage support via fake hplip installation
Diffstat (limited to 'print/hplip-plugin')
-rw-r--r-- | print/hplip-plugin/Makefile | 43 | ||||
-rw-r--r-- | print/hplip-plugin/distinfo | 4 | ||||
-rw-r--r-- | print/hplip-plugin/files/patch-plugin_install.py | 35 |
3 files changed, 74 insertions, 8 deletions
diff --git a/print/hplip-plugin/Makefile b/print/hplip-plugin/Makefile index 53245057243b..e73097a936fc 100644 --- a/print/hplip-plugin/Makefile +++ b/print/hplip-plugin/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= hplip-plugin -PORTVERSION= 3.14.1 +PORTVERSION= 3.14.4 CATEGORIES= print MASTER_SITES= http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/ DISTNAME= hplip-${DISTVERSION}-plugin @@ -19,16 +19,32 @@ RESTRICTED= User must accept the license terms NO_PACKAGE= ${RESTRICTED} IS_INTERACTIVE= yes WRKSRC= ${WRKDIR}/plugin_tmp +HPLIP_FAKEDIR= ${WRKDIR}/hplip_fakedir +MAKE_ENV= HOME=/dev/null ONLY_FOR_ARCHS= amd64 i386 -NO_STAGE= yes +PLUGIN_LINKS= fax/plugins/fax_marvell \ + prnt/plugins/hbpl1 \ + prnt/plugins/lj \ + scan/plugins/bb_marvell \ + scan/plugins/bb_soap \ + scan/plugins/bb_soapht + +PLUGIN_DIRS= data/firmware \ + data/plugins \ + fax/plugins \ + prnt/plugins \ + scan/plugins + +PLIST_SUB+= LINARCH="${LINARCH}" + .include <bsd.port.pre.mk> .if ${ARCH} == "i386" -PLIST_SUB+= LINARCH="x86_32" +LINARCH= x86_32 .elif ${ARCH} == "amd64" -PLIST_SUB+= LINARCH="x86_64" +LINARCH= x86_64 .endif do-extract: @@ -39,10 +55,25 @@ post-patch: # ${REINPLACE_CMD} -e 's|ok, ans = tui.enter_yes_no.*|ok, ans = 1, 1|' \ # ${WRKSRC}/plugin_install.py ${REINPLACE_CMD} -e 's|rules,||;s|rules_alt,||' ${WRKSRC}/plugin.spec - ${REINPLACE_CMD} -e 's|/etc/hp|${PREFIX}&|g' \ + ${REINPLACE_CMD} -e 's|/etc/hp|${HPLIP_FAKEDIR}|g' \ ${WRKSRC}/plugin_install.py do-install: - cd ${WRKSRC} && ${PYTHON_CMD} -B plugin_install.py +# fake hplip installation + ${MKDIR} ${HPLIP_FAKEDIR} + ${SED} -e 's,${LOCALBASE}/share/hplip,${HPLIP_FAKEDIR},' \ + ${LOCALBASE}/etc/hp/hplip.conf > ${HPLIP_FAKEDIR}/hplip.conf + ${MKDIR} ${HPLIP_FAKEDIR} + ${LN} -sf ${LOCALBASE}/share/hplip/base ${HPLIP_FAKEDIR} + ${LN} -sf ${LOCALBASE}/share/hplip/prnt ${HPLIP_FAKEDIR} + ${CP} -R ${LOCALBASE}/share/hplip/installer ${HPLIP_FAKEDIR} + ${REINPLACE_CMD} -e 's,HOMEDIR = .*,HOMEDIR = "${STAGEDIR}${PREFIX}/share/hplip",' \ + ${HPLIP_FAKEDIR}/installer/pluginhandler.py +# install hplip-plugin + ${MKDIR} ${PLUGIN_DIRS:S,^,${STAGEDIR}${PREFIX}/share/hplip/,} + (cd ${WRKSRC} && ${PYTHON_CMD} -B plugin_install.py) +.for i in ${PLUGIN_LINKS} + ${LN} -sf ${i:T}-${LINARCH}.so ${STAGEDIR}${PREFIX}/share/hplip/${i}.so +.endfor .include <bsd.port.post.mk> diff --git a/print/hplip-plugin/distinfo b/print/hplip-plugin/distinfo index a48082065fdb..b812c540bfba 100644 --- a/print/hplip-plugin/distinfo +++ b/print/hplip-plugin/distinfo @@ -1,2 +1,2 @@ -SHA256 (hplip-3.14.1-plugin.run) = 6caa782649af73ae3ea6c2fd742437f4c79f7f1f4d7f433ac3d9bf378626879b -SIZE (hplip-3.14.1-plugin.run) = 1869064 +SHA256 (hplip-3.14.4-plugin.run) = e42094e7f10df48fb4a3de0a71b442d93f09305cac915dd8a86ba9757cbd3b4c +SIZE (hplip-3.14.4-plugin.run) = 1869315 diff --git a/print/hplip-plugin/files/patch-plugin_install.py b/print/hplip-plugin/files/patch-plugin_install.py new file mode 100644 index 000000000000..677d9befd2c4 --- /dev/null +++ b/print/hplip-plugin/files/patch-plugin_install.py @@ -0,0 +1,35 @@ +--- ./plugin_install.py.orig 2014-04-04 10:53:11.000000000 +0000 ++++ ./plugin_install.py 2014-04-14 21:21:12.685877696 +0000 +@@ -144,30 +144,13 @@ + log.info("") + + PKIT = utils.to_bool(sys_conf.get('configure', 'policy-kit')) +-try: +- from base.pkit import * +- pkit_version = policykit_version() +- if pkit_version: +- if not user_pkit_version is None: +- pkit_version = user_pkit_version +- log.debug("pkit_version %d" % pkit_version) +- try: +- pkit = PolicyKit(pkit_version) +- pkit_installed = True +- except dbus.DBusException, ex: +- pkit_installed = False +-except ImportError, e: +- log.error("Unable to load pkit...is HPLIP installed?") +- sys.exit(1) ++ + if not PKIT: + pkit_installed = False + log.debug("pkit_installed %s" % pkit_installed) + +-if mode == INTERACTIVE_MODE: ++if True: + +- if not pkit_installed and not os.geteuid() == 0: +- log.error("You must be root to install this plug-in.") +- sys.exit(1) + + log.info(log.bold("You must agree to the license terms before installing the plug-in:")) + log.info() |