aboutsummaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2013-01-23 21:41:23 +0800
committermakc <makc@FreeBSD.org>2013-01-23 21:41:23 +0800
commit115b52d2833208c07fb93ff558bff596fcf65031 (patch)
tree3007789bc8db543aac9589b5f816737fd1638890 /print
parentf7c3c0a68902c9758fb18d9c87ed6c8dfa54ad96 (diff)
downloadfreebsd-ports-gnome-115b52d2833208c07fb93ff558bff596fcf65031.tar.gz
freebsd-ports-gnome-115b52d2833208c07fb93ff558bff596fcf65031.tar.zst
freebsd-ports-gnome-115b52d2833208c07fb93ff558bff596fcf65031.zip
- Fix shebang lines [1]
- Rename and update patch - Switch to USE_PKGCONFIG Reported by: AN <andy at neu.net> via mail [1]
Diffstat (limited to 'print')
-rw-r--r--print/hplip/Makefile16
-rw-r--r--print/hplip/files/patch-dcheck.py11
-rw-r--r--print/hplip/files/patch-installer__dcheck.py24
3 files changed, 38 insertions, 13 deletions
diff --git a/print/hplip/Makefile b/print/hplip/Makefile
index 99bf5a5cca88..947eb7656a5b 100644
--- a/print/hplip/Makefile
+++ b/print/hplip/Makefile
@@ -3,6 +3,7 @@
PORTNAME= hplip
PORTVERSION= 3.12.11
+PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= SF
@@ -23,7 +24,8 @@ CONFLICTS_INSTALL= hpijs-[0-9]*
USE_GHOSTSCRIPT_RUN= yes
USE_PYTHON= 2.5+
-USE_GNOME= pkgconfig pygobject
+USE_GNOME= pygobject
+USE_PKGCONFIG= build
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-foomatic-ppd-install \
@@ -166,7 +168,17 @@ post-patch:
${FILES4FIX:S,^,${WRKSRC}/,}
${REINPLACE_CMD} -e 's,%USB_INCLUDE%,${USB_INCLUDE},' \
${WRKSRC}/installer/core_install.py
-.if defined(NOPORTDOCS)
+ cd ${WRKSRC} && \
+ ${REINPLACE_CMD} -e "s,^#!/usr/bin/python,#!/usr/bin/env python," \
+ base/magic.py \
+ config_usb_printer.py \
+ logcapture.py \
+ makeuri.py \
+ setup.py \
+ ui/upgradeform.py \
+ uninstall.py \
+ upgrade.py
+.if !${PORT_OPTIONS:MDOCS}
${REINPLACE_CMD} -e '/[[:space:]]install-docDATA/ s|install-docDATA||' \
${WRKSRC}/Makefile.in
.endif
diff --git a/print/hplip/files/patch-dcheck.py b/print/hplip/files/patch-dcheck.py
deleted file mode 100644
index d46ab1eba5ba..000000000000
--- a/print/hplip/files/patch-dcheck.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- installer/dcheck.py.orig 2009-08-05 09:37:17.000000000 +1200
-+++ installer/dcheck.py 2009-11-27 18:53:56.000000000 +1300
-@@ -46,7 +46,7 @@
- def update_ld_output():
- # For library checks
- global ld_output
-- status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
-+ status, ld_output = utils.run('%s -r' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
-
- if status != 0:
- log.debug("ldconfig failed.")
diff --git a/print/hplip/files/patch-installer__dcheck.py b/print/hplip/files/patch-installer__dcheck.py
new file mode 100644
index 000000000000..3762663de4d7
--- /dev/null
+++ b/print/hplip/files/patch-installer__dcheck.py
@@ -0,0 +1,24 @@
+--- ./installer/dcheck.py.orig 2012-11-20 09:51:37.000000000 +0000
++++ ./installer/dcheck.py 2013-01-22 14:25:58.685224662 +0000
+@@ -44,7 +44,11 @@
+ def update_ld_output():
+ # For library checks
+ global ld_output
+- status, ld_output = utils.run('%s -p' % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
++ if sys.platform.startswith('freebsd'):
++ ld_cmd = '%s -r'
++ else: # linux
++ ld_cmd = '%s -p'
++ status, ld_output = utils.run(ld_cmd % os.path.join(utils.which('ldconfig'), 'ldconfig'), log_output=False)
+
+ if status != 0:
+ log.debug("ldconfig failed.")
+@@ -373,6 +377,8 @@
+ except ImportError:
+ return '-'
+ else:
++ if sys.platform.startswith('freebsd'):
++ return '-'
+ LIBC = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
+ LIBC.gnu_get_libc_version.restype = ctypes.c_char_p
+ return LIBC.gnu_get_libc_version()