diff options
Diffstat (limited to 'graphics/poppler/Makefile')
-rw-r--r-- | graphics/poppler/Makefile | 84 |
1 files changed, 51 insertions, 33 deletions
diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile index d89ff72931b5..c4934c9853cc 100644 --- a/graphics/poppler/Makefile +++ b/graphics/poppler/Makefile @@ -3,32 +3,35 @@ # $MCom: ports/graphics/poppler/Makefile,v 1.84 2013/03/12 14:53:49 kwm Exp $ PORTNAME= poppler -PORTVERSION= 0.22.2 +PORTVERSION= 0.24.4 PORTREVISION?= 0 CATEGORIES= graphics print MASTER_SITES= http://poppler.freedesktop.org/ MAINTAINER?= gnome@FreeBSD.org -COMMENT?= A PDF rendering library +COMMENT?= PDF rendering library LICENSE= GPLv2 -LIB_DEPENDS= jpeg:${PORTSDIR}/graphics/jpeg \ - fontconfig:${PORTSDIR}/x11-fonts/fontconfig \ - lcms2:${PORTSDIR}/graphics/lcms2 +LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ + libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \ + liblcms2.so:${PORTSDIR}/graphics/lcms2 RUN_DEPENDS= poppler-data>0:${PORTSDIR}/graphics/poppler-data -USES= gmake pkgconfig -USE_GNOME= gnomehack libxml2 ltverhack -USE_AUTOTOOLS= libtool -MAKE_JOBS_UNSAFE= yes +USE_XZ= yes +USES= gmake pathfix pkgconfig +USE_GNOME= libxml2 ltverhack +GNU_CONFIGURE= yes USE_LDCONFIG= yes CONFIGURE_ARGS= --enable-zlib \ --enable-xpdf-headers \ --disable-gtk-test \ --with-html-dir=${DOCSDIR} -CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS} -LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS} +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +# see https://bugs.freedesktop.org/show_bug.cgi?id=72499 +CPPFLAGS+= -D__LONG_LONG_SUPPORTED .if !defined(SLAVEPORT) PORTSCOUT= limitw:1,even @@ -37,25 +40,22 @@ OPTIONS_DEFINE= CAIRO OPENJPEG OPTIONS_DEFAULT=CAIRO OPENJPEG .endif -NO_STAGE= yes .include <bsd.port.options.mk> .if defined(SLAVEPORT) PORTSCOUT= ignore:1 -LIB_DEPENDS+= poppler:${PORTSDIR}/graphics/poppler +LIB_DEPENDS+= libpoppler.so:${PORTSDIR}/graphics/poppler -.if ${SLAVEPORT}=="glib" -BUILD_DEPENDS+= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection -LIB_DEPENDS+= cairo:${PORTSDIR}/graphics/cairo +.if ${SLAVEPORT}==glib CONFIGURE_ARGS+=--enable-poppler-glib -USE_GNOME+= gnomehier glib20 +USE_GNOME+= cairo gnomehier glib20 introspection:build BUILD_WRKSRC= ${WRKSRC}/glib INSTALL_WRKSRC= ${WRKSRC}/glib .else CONFIGURE_ARGS+=--disable-poppler-glib .endif -.if ${SLAVEPORT}=="qt4" +.if ${SLAVEPORT}==qt4 CONFIGURE_ARGS+=--enable-poppler-qt4 CONFIGURE_ENV+= ac_cv_prog_MOCQT4=${LOCALBASE}/bin/moc-qt4 USE_QT4= gui corelib xml qtestlib moc_build @@ -65,14 +65,22 @@ INSTALL_WRKSRC= ${WRKSRC}/qt4 CONFIGURE_ARGS+=--disable-poppler-qt4 .endif -.if ${SLAVEPORT}=="utils" -LIB_DEPENDS+= poppler-glib:${PORTSDIR}/graphics/poppler-glib +# needs checking when Qt5 is available +.if ${SLAVEPORT}==qt5 +CONFIGURE_ARGS+=--enable-poppler-qt5 +CONFIGURE_ENV+= ac_cv_prog_MOCQT4=${LOCALBASE}/bin/moc-qt5 +USE_QT5= gui corelib xml qtestlib moc_build +BUILD_WRKSRC= ${WRKSRC}/qt5 +INSTALL_WRKSRC= ${WRKSRC}/qt5 +.else +CONFIGURE_ARGS+=--disable-poppler-qt5 +.endif + +.if ${SLAVEPORT}==utils +LIB_DEPENDS+= libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib CONFIGURE_ARGS+=--enable-utils BUILD_WRKSRC= ${WRKSRC}/utils INSTALL_WRKSRC= ${WRKSRC}/utils -MAN1= pdfdetach.1 pdffonts.1 pdfimages.1 pdfinfo.1 pdfseparate.1 \ - pdftocairo.1 pdftohtml.1 pdftops.1 pdftotext.1 pdftoppm.1 \ - pdfunite.1 .else CONFIGURE_ARGS+=--disable-utils .endif @@ -83,7 +91,7 @@ CONFIGURE_ARGS+=--disable-poppler-glib \ --disable-utils .if ${PORT_OPTIONS:MCAIRO} -LIB_DEPENDS+= cairo:${PORTSDIR}/graphics/cairo +LIB_DEPENDS+= libcairo.so:${PORTSDIR}/graphics/cairo PLIST_SUB+= CAIRO="" .else CONFIGURE_ARGS+=--disable-cairo-output @@ -92,7 +100,7 @@ PLIST_SUB+= CAIRO="@comment " .if ${PORT_OPTIONS:MOPENJPEG} CONFIGURE_ARGS+=--enable-libopenjpeg -LIB_DEPENDS+= openjpeg:${PORTSDIR}/graphics/openjpeg +LIB_DEPENDS+= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg .else CONFIGURE_ARGS+=--disable-libopenjpeg .endif @@ -102,20 +110,30 @@ post-patch: .if ${CXX:M*clang*} && ${CXXFLAGS:M-stdlib=libc++} @${REINPLACE_CMD} '/CXXFLAGS.*-ansi/d' ${WRKSRC}/configure .endif - @${REINPLACE_CMD} -e 's|-version-info 35:0:0|-version-info 34:0:0|g' \ - ${WRKSRC}/poppler/Makefile.in -.if defined(SLAVEPORT) && ${SLAVEPORT}=="qt4" +# @${REINPLACE_CMD} -e 's|-version-info 35:0:0|-version-info 34:0:0|g' \ +# ${WRKSRC}/poppler/Makefile.in +.if defined(SLAVEPORT) && ${SLAVEPORT}==qt4 @${REINPLACE_CMD} -e 's|MOCQT4=`.*|MOCQT4="${LOCALBASE}/bin/moc-qt4"|' \ ${WRKSRC}/configure .endif +.if defined(SLAVEPORT) && ${SLAVEPORT}==qt5 + @${REINPLACE_CMD} -e 's|MOCQT5=`.*|MOCQT5="${LOCALBASE}/bin/moc-qt5"|' \ + ${WRKSRC}/configure +.endif post-install: .if defined(SLAVEPORT) -.if ${SLAVEPORT}=="glib" - ${INSTALL_DATA} ${WRKSRC}/poppler-glib.pc ${PREFIX}/libdata/pkgconfig -.elif ${SLAVEPORT}=="qt4" - ${INSTALL_DATA} ${WRKSRC}/poppler-qt4.pc ${PREFIX}/libdata/pkgconfig -.endif +. if ${SLAVEPORT}==glib + ${INSTALL_DATA} ${WRKSRC}/poppler-glib.pc \ + ${STAGEDIR}${PREFIX}/libdata/pkgconfig +. elif ${SLAVEPORT}==qt4 + ${INSTALL_DATA} ${WRKSRC}/poppler-qt4.pc \ + ${STAGEDIR}${PREFIX}/libdata/pkgconfig +. elif ${SLAVEPORT}==qt5 + ${INSTALL_DATA} ${WRKSRC}/poppler-qt5.pc \ + ${STAGEDIR}${PREFIX}/libdata/pkgconfig +. endif .endif + -@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libpoppler*.so.* .include <bsd.port.mk> |