ports/176919: [PATCH] graphics/tiff: OptionsNG, Port is now safe with NOPORTDOCS=yes, options DOCS X11
nemysis
nemysis at gmx.ch
Wed Mar 13 16:10:02 UTC 2013
>Number: 176919
>Category: ports
>Synopsis: [PATCH] graphics/tiff: OptionsNG, Port is now safe with NOPORTDOCS=yes, options DOCS X11
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 13 16:10:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: nemysis
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD FreeBSD_Ports 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10
>Description:
Makefile changed:
Port is now safe with NOPORTDOCS=yes in /etc/make.conf
+OPTIONS_DEFINE= DOCS X11
+.if ${PORT_OPTIONS:MDOCS}
+PLIST_SUB+= PORTDOCS=""
+.else
+PLIST_SUB+= PORTDOCS="@comment "
+.endif
+PORTDOCS= ChangeLog README TODO
+.include <bsd.port.options.mk>
+post-patch:
+ @${REINPLACE_CMD} -e 's|pkgconfigdir = $$(libdir)/pkgconfig|pkgconfigdir = $$(prefix)/libdata/pkgconfig|' \
+ ${WRKSRC}/Makefile.in
+.if ! ${PORT_OPTIONS:MDOCS}
+ ${REINPLACE_CMD} -e 's|^docfiles|no-docfiles|' \
+ ${WRKSRC}/Makefile.in
+.endif
Changed and refined:
pre-configure:
post-install:
files/patch-Makefile.in
pkg-descr
pkg-plist
Port maintainer (dinoex at FreeBSD.org) is cc'd.
Generated and tested manually, tested with port test, sent with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
portlint -A
looks usual.
/usr/ports/graphics/tiff/ > portlint -A
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
FATAL: Makefile: extra item "LIB_DEPENDS" placed in the LICENSE section.
WARN: Makefile: "LICENSE_FILE" has to appear earlier.
WARN: Makefile: "LICENSE" has to appear earlier.
WARN: Makefile: "LICENSE_FILE" has to appear earlier.
1 fatal error and 4 warnings found.
port test: clean
>Fix:
--- tiff-4.0.3_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/graphics/tiff/Makefile ./Makefile
--- /usr/ports/graphics/tiff/Makefile 2013-01-14 17:57:01.000000000 +0100
+++ ./Makefile 2013-03-13 16:44:01.000000000 +0100
@@ -3,6 +3,7 @@
PORTNAME= tiff
PORTVERSION= 4.0.3
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ftp://ftp.remotesensing.org/pub/libtiff/ \
http://download.osgeo.org/libtiff/
@@ -10,26 +11,17 @@
MAINTAINER= dinoex at FreeBSD.org
COMMENT= Tools and library routines for working with TIFF images
-LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
- jbig:${PORTSDIR}/graphics/jbigkit
-
LICENSE= BSD
LICENSE_FILE= ${WRKSRC}/COPYRIGHT
+LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \
+ jbig:${PORTSDIR}/graphics/jbigkit
+
USE_LDCONFIG= yes
USE_AUTOTOOLS= libtool
CONFIGURE_ARGS+= --with-jpeg-include-dir=${LOCALBASE}/include \
--with-jpeg-lib-dir=${LOCALBASE}/lib
-.if defined(WITH_X11) && !defined(WITHOUT_X11)
-USE_XORG= sm ice xmu xi x11
-USE_GL= glut glu gl
-PLIST_SUB+= WITH_X11=""
-.else
-CONFIGURE_ARGS+= --without-x --without-libgl
-PLIST_SUB+= WITH_X11="@comment "
-.endif
-
MAN1= bmp2tiff.1 tiff2pdf.1 fax2ps.1 fax2tiff.1 gif2tiff.1 pal2rgb.1 \
ppm2tiff.1 ras2tiff.1 raw2tiff.1 rgb2ycbcr.1 sgi2tiff.1 \
thumbnail.1 tiff2bw.1 tiff2ps.1 tiff2rgba.1 tiffcmp.1 tiffcp.1 \
@@ -109,16 +101,46 @@
TIFFtile.3tiff TIFFTileRowSize.3tiff \
TIFFtile.3tiff TIFFVTileSize.3tiff
+PORTDOCS= ChangeLog README TODO
+
+OPTIONS_DEFINE= DOCS X11
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MX11}
+USE_XORG= sm ice xmu xi x11
+USE_GL= glut glu gl
+PLIST_SUB+= WITH_X11=""
+.else
+CONFIGURE_ARGS+= --without-x --without-libgl
+PLIST_SUB+= WITH_X11="@comment "
+.endif
+
+.if ${PORT_OPTIONS:MDOCS}
+PLIST_SUB+= PORTDOCS=""
+.else
+PLIST_SUB+= PORTDOCS="@comment "
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|pkgconfigdir = $$(libdir)/pkgconfig|pkgconfigdir = $$(prefix)/libdata/pkgconfig|' \
+ ${WRKSRC}/Makefile.in
+.if ! ${PORT_OPTIONS:MDOCS}
+ ${REINPLACE_CMD} -e 's|^docfiles|no-docfiles|' \
+ ${WRKSRC}/Makefile.in
+.endif
+
pre-configure:
${REINPLACE_CMD} \
-e 's|^LIBTIFF_VERSION_INFO =.*$$|LIBTIFF_VERSION_INFO = 4:0:0|' \
${WRKSRC}/libtiff/Makefile.in
- ${REINPLACE_CMD} -e 's|^docfiles|no-docfiles|' \
- -e 's|man html|man|' ${WRKSRC}/Makefile.in
+ ${REINPLACE_CMD} -e 's|man html|man|' \
+ ${WRKSRC}/Makefile.in
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
post-install:
- ${MKDIR} ${DOCSDIR}/images ${DOCSDIR}/man
+ @${MKDIR} ${DOCSDIR}/images ${DOCSDIR}/man
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/html/*.html ${DOCSDIR}/
${INSTALL_DATA} ${WRKSRC}/html/images/*.jpg ${DOCSDIR}/images/
${INSTALL_DATA} ${WRKSRC}/html/images/*.gif ${DOCSDIR}/images/
diff -ruN --exclude=CVS /usr/ports/graphics/tiff/files/patch-Makefile.in ./files/patch-Makefile.in
--- /usr/ports/graphics/tiff/files/patch-Makefile.in 2013-01-14 17:57:01.000000000 +0100
+++ ./files/patch-Makefile.in 2013-03-13 16:14:19.000000000 +0100
@@ -1,14 +1,5 @@
--- Makefile.in.orig 2012-09-22 18:08:18.000000000 +0200
-+++ Makefile.in 2012-10-13 19:35:28.000000000 +0200
-@@ -375,7 +375,7 @@
-
- dist_doc_DATA = $(docfiles)
- SUBDIRS = port libtiff tools build contrib test man html
--pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfigdir = $(prefix)/libdata/pkgconfig
- pkgconfig_DATA = libtiff-4.pc
- all: all-recursive
-
++++ Makefile.in 2013-03-13 16:14:10.000000000 +0100
@@ -427,19 +427,6 @@
-rm -f libtool config.lt
install-dist_docDATA: $(dist_doc_DATA)
diff -ruN --exclude=CVS /usr/ports/graphics/tiff/pkg-descr ./pkg-descr
--- /usr/ports/graphics/tiff/pkg-descr 2013-01-14 17:57:01.000000000 +0100
+++ ./pkg-descr 2013-03-13 16:44:18.000000000 +0100
@@ -11,9 +11,4 @@
follow the 5.0 or 6.0 TIFF spec. There is also considerable support
for some of the more esoteric portions of the 6.0 TIFF spec.
-Unless NOPORTDOCS is defined, the html documentations is also
-installed locally in /usr/local/share/doc/tiff.
-
-LICENSE: Permission to use, copy, modify, distribute, and sell for any purpose
-
WWW: http://www.remotesensing.org/libtiff/
diff -ruN --exclude=CVS /usr/ports/graphics/tiff/pkg-plist ./pkg-plist
--- /usr/ports/graphics/tiff/pkg-plist 2013-01-14 17:57:01.000000000 +0100
+++ ./pkg-plist 2013-03-13 15:20:25.000000000 +0100
@@ -36,12 +36,16 @@
lib/libtiffxx.so
lib/libtiffxx.so.4
libdata/pkgconfig/libtiff-4.pc
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/TIFFTechNote2.html
+%%PORTDOCS%%%%DOCSDIR%%/TODO
%%PORTDOCS%%%%DOCSDIR%%/addingtags.html
%%PORTDOCS%%%%DOCSDIR%%/bugs.html
%%PORTDOCS%%%%DOCSDIR%%/build.html
%%PORTDOCS%%%%DOCSDIR%%/contrib.html
%%PORTDOCS%%%%DOCSDIR%%/document.html
+%%PORTDOCS%%%%DOCSDIR%%/images.html
%%PORTDOCS%%%%DOCSDIR%%/images/back.gif
%%PORTDOCS%%%%DOCSDIR%%/images/bali.jpg
%%PORTDOCS%%%%DOCSDIR%%/images/cat.gif
@@ -58,7 +62,6 @@
%%PORTDOCS%%%%DOCSDIR%%/images/smallliz.jpg
%%PORTDOCS%%%%DOCSDIR%%/images/strike.gif
%%PORTDOCS%%%%DOCSDIR%%/images/warning.gif
-%%PORTDOCS%%%%DOCSDIR%%/images.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
%%PORTDOCS%%%%DOCSDIR%%/internals.html
%%PORTDOCS%%%%DOCSDIR%%/intro.html
--- tiff-4.0.3_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list