ports/109221: Port to graphics/djvulibre to exclude unnessesary bash depend
Rashid N. Achilov
achilov-rn at askd.ru
Fri Feb 16 10:20:05 UTC 2007
>Number: 109221
>Category: ports
>Synopsis: Port to graphics/djvulibre to exclude unnessesary bash depend
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 16 10:20:04 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Rashid N. Achilov
>Release: 6.2-RELEASE
>Organization:
LLC "AS-System Complex"
>Environment:
FreeBSD to-495.askd.ru 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Thu Feb 15 15:56:49 NOVT 2007 root at to-495.askd.ru:/usr/obj/usr/src/sys/Sentry i386
>Description:
graphics/djvulibre has a depend from bash, which needs only for any2djvu script. This patch adds option to include any2djvu in build or exclude it (so, add bash depend with it or do not add)
>How-To-Repeat:
Try to install djvulibre. When your box does not have bash, djvulibre port will install it,
>Fix:
Patch attached with submission follows:
diff -ruN djvulibre.old/Makefile djvulibre/Makefile
--- djvulibre.old/Makefile Wed Feb 14 04:34:51 2007
+++ djvulibre/Makefile Fri Feb 16 16:04:14 2007
@@ -17,7 +17,6 @@
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff
-RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
USE_ICONV= yes
USE_GNOME= gnomehack gnometarget
@@ -32,11 +31,13 @@
CONFIGURE_ARGS= --enable-threads=pthread --enable-shared
USE_LDCONFIG= yes
+OPTIONS= ANY2DJVU "Install any2djvu script (required bash)" off
+
MANLANG= "" ja
MAN1= bzz.1 c44.1 cjb2.1 cpaldjvu.1 csepdjvu.1 ddjvu.1 djvm.1 \
djvmcvt.1 djvu.1 djvudump.1 djvuextract.1 djvumake.1 djvups.1 \
djvused.1 djvuserve.1 djvutxt.1
-MAN1EXTRA= any2djvu.1 djvutoxml.1 djvuxml.1 djvuxmlparser.1 djvudigital.1
+MAN1EXTRA= djvutoxml.1 djvuxml.1 djvuxmlparser.1 djvudigital.1
MAN1+= ${MAN1EXTRA}
PORTDOCS= djvu2spec.djvu lizard2002.djvu
@@ -54,6 +55,16 @@
PLIST_SUB+= X11='@comment '
.endif
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_ANY2DJVU)
+MAN1+= any2djvu.1
+RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash
+PLIST_SUB+= ANY2DJVU=''
+.else
+PLIST_SUB+= ANY2DJVU='@comment '
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/libdjvu/Makefile.in
@@ -61,8 +72,10 @@
s|$$OPTS -O3|$$OPTS|g ; \
s|$$OPTS -O2|$$OPTS|g ; \
s|$$OPTS $$opt|$$OPTS|g' ${WRKSRC}/configure
+.if defined(WITH_ANY2DJVU)
@${REINPLACE_CMD} -e 's|^#! /bin/bash|#! ${LOCALBASE}/bin/bash|g ; \
s|any2djvu\.sh|any2djvu|g' ${WRKSRC}/tools/any2djvu
+.endif
@${REINPLACE_CMD} -e 's,/netscape/,/djvulibre/,' \
${WRKSRC}/gui/nsdejavu/nsdejavu.1.in
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
@@ -91,4 +104,4 @@
.endfor
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN djvulibre.old/pkg-plist djvulibre/pkg-plist
--- djvulibre.old/pkg-plist Wed Feb 14 04:34:51 2007
+++ djvulibre/pkg-plist Fri Feb 16 15:55:05 2007
@@ -1,4 +1,4 @@
-bin/any2djvu
+%%ANY2DJVU%%bin/any2djvu
bin/bzz
bin/c44
bin/cjb2
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list