summaryrefslogtreecommitdiff
path: root/print/hplip
diff options
context:
space:
mode:
authorMax Brazhnikov <makc@FreeBSD.org>2013-01-23 13:41:23 +0000
committerMax Brazhnikov <makc@FreeBSD.org>2013-01-23 13:41:23 +0000
commit8311b2e412e54c8cee8c9dee37dafe73b5137796 (patch)
tree3007789bc8db543aac9589b5f816737fd1638890 /print/hplip
parent- Bump PORTREVISION because of libsoldout updated to 1.3 (diff)
- Fix shebang lines [1]
- Rename and update patch - Switch to USE_PKGCONFIG Reported by: AN <andy at neu.net> via mail [1]
Notes
Notes: svn path=/head/; revision=310865
Diffstat (limited to 'print/hplip')
-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()