This diff adds a no_x11 flavor to textproc/xpdf.  This is necessary if
you want to use the pdftotext program without X being installed.  This
patch is the same is one sent last week, update to -current for the
recent security patch to xpdf.

Tested on i386. Please test and commit.

Jeremy
? pkg/PFRAG.no-no_x11
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/xpdf/Makefile,v
retrieving revision 1.57
diff -u -r1.57 Makefile
--- Makefile    9 Nov 2007 07:15:12 -0000       1.57
+++ Makefile    13 Nov 2007 22:29:58 -0000
@@ -3,7 +3,7 @@
 COMMENT=       PDF viewer for X11
 
 DISTNAME=      xpdf-3.02
-PKGNAME=       xpdf-3.02pl2
+PKGNAME=       xpdf-3.02pl2p0
 CATEGORIES=    textproc x11
 
 MASTER_SITES=  ftp://ftp.foolabs.com/pub/xpdf/ \
@@ -17,24 +17,36 @@
 LIB_DEPENDS+=  t1.>=3::devel/t1lib
 RUN_DEPENDS+=  ::print/ghostscript/gnu-fonts
 
+FLAVORS=        no_x11
+FLAVOR?=
+
 # GPL
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
-WANTLIB=               ICE SM X11 Xext Xp Xpm Xt c freetype m pthread \
-                       stdc++ z
+WANTLIB=               c m pthread stdc++
 
-USE_X11=       Yes
 USE_GMAKE=     Yes
-USE_MOTIF=     openmotif
 CONFIGURE_STYLE=autoconf no-autoheader
 AUTOCONF_VERSION=2.59
 CONFIGURE_ARGS+= --enable-multithreaded \
                 --without-Sgm-library \
                 --without-libpaper-library
-CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include/freetype2 -I${X11BASE}/include 
-I${LOCALBASE}/include" \
+
+BINARIES=      pdffonts pdfimages pdfinfo pdftops pdftotext
+.if ${FLAVOR:L:Mno_x11}
+CONFIGURE_ARGS+= --without-x
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+               LDFLAGS="-L${LOCALBASE}/lib"
+.else
+USE_X11=       Yes
+USE_MOTIF=     openmotif
+BINARIES+=     pdftoppm xpdf
+WANTLIB+=      ICE SM X11 Xext Xp Xpm Xt freetype z
+CONFIGURE_ENV=  CPPFLAGS="-I${X11BASE}/include/freetype2 -I${X11BASE}/include 
-I${LOCALBASE}/include" \
                LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lz"
+.endif
 
 NO_REGRESS=    Yes
 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/xpdf/pkg/PLIST,v
retrieving revision 1.9
diff -u -r1.9 PLIST
--- pkg/PLIST   15 Sep 2004 18:44:09 -0000      1.9
+++ pkg/PLIST   13 Nov 2007 22:29:58 -0000
@@ -2,18 +2,15 @@
 bin/pdffonts
 bin/pdfimages
 bin/pdfinfo
-bin/pdftoppm
 bin/pdftops
 bin/pdftotext
-bin/xpdf
 @man man/man1/pdffonts.1
 @man man/man1/pdfimages.1
 @man man/man1/pdfinfo.1
[EMAIL PROTECTED] man/man1/pdftoppm.1
 @man man/man1/pdftops.1
 @man man/man1/pdftotext.1
[EMAIL PROTECTED] man/man1/xpdf.1
 @man man/man5/xpdfrc.5
 share/examples/xpdf/
 share/examples/xpdf/xpdfrc
 @sample ${SYSCONFDIR}/xpdfrc
+!%%no_x11%%

Reply via email to