Changeset View
Standalone View
print/hplip/Makefile
# Created by: amistry@am-productions.biz | # Created by: amistry@am-productions.biz | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= hplip | PORTNAME= hplip | ||||
PORTVERSION= 3.16.2 | PORTVERSION= 3.16.8 | ||||
PORTREVISION= 2 | |||||
CATEGORIES= print | CATEGORIES= print | ||||
MASTER_SITES= SF | MASTER_SITES= SF | ||||
MAINTAINER= makc@FreeBSD.org | MAINTAINER= makc@FreeBSD.org | ||||
COMMENT= Drivers and utilities for HP Printers and All-in-One devices | COMMENT= Drivers and utilities for HP Printers and All-in-One devices | ||||
LICENSE= GPLv2 MIT BSD3CLAUSE | |||||
LICENSE_COMB= multi | |||||
LICENSE_FILES= ${WRKSRC}/COPYING | |||||
LIB_DEPENDS= libcupsimage.so:print/cups \ | LIB_DEPENDS= libcupsimage.so:print/cups \ | ||||
libdbus-1.so:devel/dbus | libdbus-1.so:devel/dbus | ||||
RUN_DEPENDS= ${LOCALBASE}/libexec/cups/filter/gstoraster:print/cups-filters \ | RUN_DEPENDS= ${LOCALBASE}/libexec/cups/filter/gstoraster:print/cups-filters \ | ||||
${PYTHON_SITELIBDIR}/dbus/_dbus.py:devel/py-dbus | ${PYTHON_SITELIBDIR}/dbus/_dbus.py:devel/py-dbus | ||||
CONFLICTS_INSTALL= hpijs-[0-9]* | CONFLICTS_INSTALL= hpijs-[0-9]* | ||||
INSTALL_TARGET= install-strip | INSTALL_TARGET= install-strip | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
OPTIONS_DEFAULT=SNMP SCAN X11 | OPTIONS_DEFAULT=SNMP SCAN X11 | ||||
OPTIONS_SUB= yes # FAX SCAN X11 | OPTIONS_SUB= yes # FAX SCAN X11 | ||||
FAX_DESC= PC Send Fax support | FAX_DESC= PC Send Fax support | ||||
FAX_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/reportlab/__init__.py:print/py-reportlab2 | FAX_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/reportlab/__init__.py:print/py-reportlab2 | ||||
FAX_CONFIGURE_ENABLE= fax-build | FAX_CONFIGURE_ENABLE= fax-build | ||||
SNMP_DESC= Network/JetDirect support | SNMP_DESC= Network/JetDirect support | ||||
SNMP_USE= OPENSSL=yes | SNMP_USES= ssl | ||||
SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp | SNMP_LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp | ||||
SNMP_CONFIGURE_ENABLE= network-build | SNMP_CONFIGURE_ENABLE= network-build | ||||
SCAN_DESC= Scanning support | SCAN_DESC= Scanning support | ||||
SCAN_LIB_DEPENDS= libsane.so:graphics/sane-backends | SCAN_LIB_DEPENDS= libsane.so:graphics/sane-backends | ||||
SCAN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow | SCAN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow | ||||
SCAN_CONFIGURE_ENABLE= scan-build | SCAN_CONFIGURE_ENABLE= scan-build | ||||
Show All 31 Lines | @${REINPLACE_CMD} -e 's/umask(0)/umask(0o022)/' \ | ||||
${WRKSRC}/fax/backend/hpfax.py \ | ${WRKSRC}/fax/backend/hpfax.py \ | ||||
${WRKSRC}/hpdio.py \ | ${WRKSRC}/hpdio.py \ | ||||
${WRKSRC}/installer/pluginhandler.py | ${WRKSRC}/installer/pluginhandler.py | ||||
${REINPLACE_CMD} -e 's,%USB_INCLUDE%,/usr/include,' \ | ${REINPLACE_CMD} -e 's,%USB_INCLUDE%,/usr/include,' \ | ||||
${WRKSRC}/installer/core_install.py | ${WRKSRC}/installer/core_install.py | ||||
${FIND} ${WRKSRC} -name '*.py' | ${XARGS} ${SED} -i '' \ | ${FIND} ${WRKSRC} -name '*.py' | ${XARGS} ${SED} -i '' \ | ||||
-e 's,^#!/usr/bin/python,#!${PYTHON_CMD},' \ | -e 's,^#!/usr/bin/python,#!${PYTHON_CMD},' \ | ||||
-e 's,^#!/usr/bin/env python,#!${PYTHON_CMD},' \ | -e 's,^#!/usr/bin/env python,#!${PYTHON_CMD},' \ | ||||
-e 's,^#!/bin/env python,#!${PYTHON_CMD},' | -e 's,^#!/bin/env python,#!${PYTHON_CMD},' | ||||
adamw: Can this block be replaced with `USES=shebangfix`? | |||||
Done Inline ActionsOnly if we set: Given this is longer, it may not be worth it? woodsb02: Only if we set:
SHEBANG_FILES = *.py \
apparmor/abstractions/hplip \
base/*.py \
data/rules/56… | |||||
post-install: | post-install: | ||||
${MV} ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf \ | ${MV} ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf \ | ||||
${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample | ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample | ||||
${MKDIR} ${STAGEDIR}${PREFIX}/etc/sane.d/dll.d | |||||
${MV} ${STAGEDIR}${PREFIX}/etc/sane.d/dll.conf ${STAGEDIR}${PREFIX}/etc/sane.d/dll.d/hpaio | |||||
matUnsubmitted Done Inline ActionsThis should only happen when WITH=SCAN, also, I don't think the dll.conf file is created by this port, otherwise it would not do dirty things in its plist to add and remove a line from it. mat: This should only happen when WITH=SCAN, also, I don't think the dll.conf file is created by… | |||||
woodsb02AuthorUnsubmitted Done Inline ActionsOh yes, you're right, it should only be done when the SCAN option is enabled. The dll.conf file is created by the port Makefile. Makefile.am contains the following text: install-data-hook: if HPLIP_BUILD # If scanner build, add hpaio entry to sane dll.conf. if [ "$(scan_build)" = "yes" ]; then \ $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \ if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \ touch $(DESTDIR)/etc/sane.d/dll.conf; \ fi; \ if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \ echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \ echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \ fi \ fi woodsb02: Oh yes, you're right, it should only be done when the SCAN option is enabled.
The dll.conf… | |||||
matUnsubmitted Done Inline ActionsNo. The dll.conf file is created if it does not exist and the line is added to it wether it existed before or not. This is why this is done is postexec/postunexec, so that the dll.conf file is not created in the staging directory and conflicts with the one installed by sane. Looking at the sane-backends port, the sane.d directory it is not a debian style .d directory, the backends needs to be in the dll.conf file, so you will need to keep the @postexec/@postunexec dance there was before, and the @comment etc/sane.d/dll.conf. mat: No.
The dll.conf file is created if it does not exist and the line is added to it wether it… | |||||
woodsb02AuthorUnsubmitted Done Inline ActionsHi Mat, since the ${WRKSRC}/Makefile is adding "hpaio" to the dll.conf file in the port staging directory, rather than directly on the system, we know the dll.conf file will not already exist. Therefore it is safe to simply move it to the dll.d folder. I have just done some testing and confirmed that the scanner is not detected if I comment out the line in dll.d/hpaio, but is detected if the line exists in dll.d/hpaio. Therefore, I believe this does work as a debian style .d directory, and that this is the cleanest solution. woodsb02: Hi Mat, since the ${WRKSRC}/Makefile is adding "hpaio" to the dll.conf file in the port staging… | |||||
matUnsubmitted Not Done Inline Actions
It will not exist in the staging directory as it is empty when installing and the only things that goes in there is what the port puts. mat: > Hi Mat, since the ${WRKSRC}/Makefile is adding "hpaio" to the dll.conf file in the port… | |||||
${MKDIR} ${STAGEDIR}${DATADIR}/ui4/plugins | |||||
${MKDIR} ${STAGEDIR}/var/lib/hp | |||||
${MKDIR} ${STAGEDIR}/var/lib | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Can this block be replaced with USES=shebangfix?