===> Generating patch
===> Viewing diff with more
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-16 15:30:20.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,25 +11,18 @@
 MAINTAINER=	dinoex@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
+PORTDOCS=	*
 
 MAN1=	bmp2tiff.1 tiff2pdf.1 fax2ps.1 fax2tiff.1 gif2tiff.1 pal2rgb.1 \
 	ppm2tiff.1 ras2tiff.1 raw2tiff.1 rgb2ycbcr.1 sgi2tiff.1 \
@@ -109,16 +103,40 @@
 	TIFFtile.3tiff           TIFFTileRowSize.3tiff \
 	TIFFtile.3tiff           TIFFVTileSize.3tiff
 
+OPTIONS_DEFINE=	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
+
+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
+.for f in ChangeLog README TODO
+	 @(cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${DOCSDIR})
+.endfor
 	${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-16 14:43:54.000000000 +0100
@@ -36,145 +36,3 @@
 lib/libtiffxx.so
 lib/libtiffxx.so.4
 libdata/pkgconfig/libtiff-4.pc
-%%PORTDOCS%%%%DOCSDIR%%/TIFFTechNote2.html
-%%PORTDOCS%%%%DOCSDIR%%/addingtags.html
-%%PORTDOCS%%%%DOCSDIR%%/bugs.html
-%%PORTDOCS%%%%DOCSDIR%%/build.html
-%%PORTDOCS%%%%DOCSDIR%%/contrib.html
-%%PORTDOCS%%%%DOCSDIR%%/document.html
-%%PORTDOCS%%%%DOCSDIR%%/images/back.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/bali.jpg
-%%PORTDOCS%%%%DOCSDIR%%/images/cat.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/cover.jpg
-%%PORTDOCS%%%%DOCSDIR%%/images/cramps.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/dave.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/info.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/jello.jpg
-%%PORTDOCS%%%%DOCSDIR%%/images/jim.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/note.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/oxford.gif
-%%PORTDOCS%%%%DOCSDIR%%/images/quad.jpg
-%%PORTDOCS%%%%DOCSDIR%%/images/ring.gif
-%%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
-%%PORTDOCS%%%%DOCSDIR%%/libtiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFClose.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFDataWidth.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFError.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldDataType.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldName.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldPassCount.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldReadCount.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldTag.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFieldWriteCount.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFFlush.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFGetField.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFOpen.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFPrintDirectory.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFRGBAImage.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadDirectory.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadEncodedStrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadEncodedTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadRGBAImage.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadRGBAStrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadRGBATile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadRawStrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadRawTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadScanline.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFReadTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFSetDirectory.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFSetField.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWarning.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteDirectory.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteEncodedStrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteEncodedTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteRawStrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteRawTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteScanline.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFWriteTile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFbuffer.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFcodec.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFcolor.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFmemory.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFquery.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFsize.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFstrip.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFswab.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/TIFFtile.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/bmp2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/fax2ps.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/fax2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/gif2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/index.html
-%%PORTDOCS%%%%DOCSDIR%%/man/libtiff.3tiff.html
-%%PORTDOCS%%%%DOCSDIR%%/man/pal2rgb.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/ppm2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/ras2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/raw2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/rgb2ycbcr.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/sgi2tiff.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/thumbnail.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiff2bw.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiff2pdf.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiff2ps.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiff2rgba.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffcmp.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffcp.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffcrop.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffdither.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffdump.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffgt.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffinfo.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffmedian.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffset.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffsplit.1.html
-%%PORTDOCS%%%%DOCSDIR%%/man/tiffsv.1.html
-%%PORTDOCS%%%%DOCSDIR%%/misc.html
-%%PORTDOCS%%%%DOCSDIR%%/support.html
-%%PORTDOCS%%%%DOCSDIR%%/tools.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta007.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta016.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta018.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta024.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta028.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta029.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta031.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta032.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta033.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta034.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta035.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.4beta036.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.2.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.3.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.4.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.5.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.6-beta.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.5.7.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.6.0.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.6.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.0.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.0alpha.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.0beta.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.0beta2.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.2.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.3.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.7.4.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.8.0.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.8.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.8.2.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.9.0beta.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.9.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v3.9.2.html
-%%PORTDOCS%%%%DOCSDIR%%/v4.0.0.html
-%%PORTDOCS%%%%DOCSDIR%%/v4.0.1.html
-%%PORTDOCS%%%%DOCSDIR%%/v4.0.2.html
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/man
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/images
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
===> Done