Hi,

While playing on Calibre, I needed some utils found in Poppler distribution.
Here is a diff that adds a member to the MULTI_PACKAGES list of the current
Poppler port.

Would there be some interest in this ?

Alexis.

Index: Makefile
===================================================================
RCS file: /cvs/ports/print/poppler/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- Makefile    24 Dec 2010 14:02:12 -0000      1.44
+++ Makefile    24 Feb 2011 14:14:36 -0000
@@ -4,6 +4,7 @@
 COMMENT-main=  PDF rendering library
 COMMENT-qt=    qt interface to PDF rendering library
 COMMENT-qt4=   qt4 interface to PDF rendering library
+COMMENT-utils= tools coming with Poppler
 
 V=             0.14.5
 DISTNAME=      poppler-$V
@@ -12,6 +13,7 @@
 REVISION-main= 0
 FULLPKGNAME-qt=        poppler-qt-$V
 FULLPKGNAME-qt4=poppler-qt4-$V
+FULLPKGNAME-utils=     poppler-utils-$V
 
 SHARED_LIBS += poppler              9.0
 SHARED_LIBS += poppler-glib         7.0
@@ -30,7 +32,7 @@
 
 MASTER_SITES=  ${HOMEPAGE}
 
-PSEUDO_FLAVORS=no_qt no_qt4
+PSEUDO_FLAVORS=no_qt no_qt4 no_utils
 FLAVOR?=
 
 MULTI_PACKAGES=-main
@@ -50,6 +52,14 @@
 MULTI_PACKAGES+=-qt4
 .endif
 
+.if empty(FLAVOR:L:Mno_utils)
+MULTI_PACKAGES+=-utils
+MODULES+=              converters/libiconv
+CONFIGURE_ARGS+=       --enable-utils
+.else
+CONFIGURE_ARGS+=       --disable-utils
+.endif
+
 .if ${MULTI_PACKAGES:L:M-qt4} && ${MACHINE_ARCH} != "arm"
 MODULES+=      x11/qt4 converters/libiconv
 .else
@@ -69,6 +79,8 @@
 LIB_DEPENDS-qt4=x11/qt4 \
                ${MODGETTEXT_LIB_DEPENDS} \
                print/poppler
+LIB_DEPENDS-utils=${MODLIBICONV_LIB_DEPENDS} \
+               print/poppler
 
 WANTLIB-main=  ${cWANTLIB} Xcursor Xext Xfixes Xi Xinerama Xrandr gio-2.0 \
                glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 pango-1.0 xml2 \
@@ -82,12 +94,13 @@
                 Xinerama Xrender glib-2.0 gobject-2.0 gthread-2.0 lcms \
                openjpeg pcre png poppler pthread-stubs xcb xml2 \
                QtCore QtGui QtXml ${MODGETTEXT_WANTLIB}
+WANTLIB-utils= ${cWANTLIB} c lcms openjpeg png poppler pthread xml2 \
+               ${MODLIBICONV_WANTLIB}
 
 CONFIGURE_STYLE=gnu
 CONFIGURE_ARGS+= --enable-xpdf-headers \
                --disable-poppler-cpp \
                --disable-silent-rules \
-               --disable-utils \
                --enable-zlib
 
 CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include 
-I${LOCALBASE}/include/libpng" \
@bin bin/pdffonts
@bin bin/pdfimages
@bin bin/pdfinfo
@bin bin/pdftoabw
@bin bin/pdftohtml
@bin bin/pdftoppm
@bin bin/pdftops
@bin bin/pdftotext
@man man/man1/pdffonts.1
@man man/man1/pdfimages.1
@man man/man1/pdfinfo.1
@man man/man1/pdftohtml.1
@man man/man1/pdftoppm.1
@man man/man1/pdftops.1
@man man/man1/pdftotext.1
Poppler-utils is a set of tools distributed with Poppler.

Reply via email to