Index: graphics/xpdf4/Makefile =================================================================== --- graphics/xpdf4/Makefile +++ graphics/xpdf4/Makefile @@ -2,6 +2,7 @@ PORTNAME= xpdf PORTVERSION= 4.02 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= graphics print MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/ @@ -14,51 +15,51 @@ LICENSE= GPLv2 -CONFLICTS_INSTALL= xpdf -.if !defined(MASTERDIR) -CONFLICTS_INSTALL+= xpdf3-* xpdf-* -.else -CONFLICTS_INSTALL+= xpdf3-* xpdf4-* -.endif - -USES= compiler:c++11-lang cmake localbase:ldflags +BUILD_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts LIB_DEPENDS= libfreetype.so:print/freetype2 \ + libpaper.so:print/libpaper \ libpng.so:graphics/png -BUILD_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts -MANPREFIX= ${PREFIX}/share/xpdf -SUB_FILES= xpdf-man.conf -CMAKE_ARGS+= -DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \ - -DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc \ - -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + +USES= cmake compiler:c++11-lang localbase:ldflags + +CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \ + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE \ -DCMAKE_INSTALL_BINDIR=${PREFIX}/libexec/xpdf \ -DCMAKE_INSTALL_MANDIR=${PREFIX}/share/xpdf/man \ + -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DNO_TEXT_SELECT:BOOL=OFF \ - -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE + -DOPI_SUPPORT:BOOL=ON \ + -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc \ + -DUSE_LCMS:BOOL=OFF -PLIST_SUB= DESKTOPDIR="${DESKTOPDIR}" +CONFLICTS_INSTALL= xpdf +.if !defined(MASTERDIR) +CONFLICTS_INSTALL+= xpdf-* xpdf3-* +.else +CONFLICTS_INSTALL+= xpdf3-* xpdf4-* +.endif -OPTIONS_DEFINE= TYPE1 LIBPAPER PRINT GUI -OPTIONS_DEFAULT= TYPE1 PRINT GUI -OPTIONS_SUB= yes +MANPREFIX= ${PREFIX}/share/xpdf +SUB_FILES= pkg-message xpdf-man.conf -TYPE1_CMAKE_BOOL= TYPE1 -TYPE1_DESC= Ghostscript type1 fonts -TYPE1_RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts +PLIST_SUB= DESKTOPDIR="${DESKTOPDIR}" -LIBPAPER_CMAKE_BOOL= USE_LIBPAPER -LIBPAPER_LIB_DEPENDS= libpaper.so:print/libpaper +OPTIONS_DEFINE= GUI PRINT +OPTIONS_DEFAULT= GUI PRINT +OPTIONS_SUB= yes +GUI_DESC= QT5 interface +PRINT_DESC= Print support (CUPS dependency) + +GUI_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig +GUI_USES= desktop-file-utils qt:5 +GUI_USE= QT=concurrent,core,gui,network,printsupport,printsupport,svg,widgets,buildtools_build,qmake_build GUI_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1 -GUI_DESC= QT5 interface -GUI_USES= qt:5 desktop-file-utils -GUI_USE= QT=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport,svg,network,printsupport -PRINT_CMAKE_ON= -DXPDFWIDGET_PRINTING:BOOL=ON -DCUPS:BOOL=ON -PRINT_CMAKE_OFF= -DXPDFWIDGET_PRINTING:BOOL=OFF -DCUPS:BOOL=OFF -PRINT_DESC= Print support (CUPS dependency) -PRINT_LDFLAGS= -L${LOCALBASE}/lib PRINT_LIB_DEPENDS= libcups.so:print/cups +PRINT_CMAKE_OFF= -DCUPS:BOOL=OFF -DXPDFWIDGET_PRINTING:BOOL=OFF +PRINT_CMAKE_ON= -DCUPS:BOOL=ON -DXPDFWIDGET_PRINTING:BOOL=ON post-install: @cd ${STAGEDIR}${PREFIX}; \ @@ -66,6 +67,10 @@ ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc ${STAGEDIR}${PREFIX}/etc/xpdfrc.sample ${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \ ${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf + +post-install-GUI-on: ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${STAGEDIR}${DESKTOPDIR} + ${INSTALL_DATA} ${WRKSRC}/xpdf-qt/xpdf-icon.svg \ + ${STAGEDIR}${PREFIX}/share/pixmaps/xpdf.svg .include Index: graphics/xpdf4/files/patch-cmake-config.txt =================================================================== --- graphics/xpdf4/files/patch-cmake-config.txt +++ graphics/xpdf4/files/patch-cmake-config.txt @@ -1,6 +1,6 @@ ---- cmake-config.txt.orig 2019-09-25 12:54:33.000000000 -0700 -+++ cmake-config.txt 2019-10-04 19:03:10.517020000 -0700 -@@ -81,6 +81,7 @@ +--- cmake-config.txt.orig 2019-09-25 19:54:33 UTC ++++ cmake-config.txt +@@ -81,6 +81,7 @@ option(MULTITHREADED "include support for multithreadi option(USE_EXCEPTIONS "use C++ exceptions" ON) option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF) option(SPLASH_CMYK "include support for CMYK rasterization" OFF) @@ -8,7 +8,7 @@ option(NO_FONTCONFIG "disable support for libfontconfig" OFF) option(SYSTEM_XPDFRC "full path for system-wide xpdfrc file" "") if (SYSTEM_XPDFRC) -@@ -194,7 +195,7 @@ +@@ -194,7 +195,7 @@ if (Qt5Widgets_FOUND) find_package(Qt5Network) find_package(Qt5PrintSupport) else () @@ -17,7 +17,7 @@ endif () if(Qt5Widgets_FOUND) message(STATUS "Qt5 found") -@@ -212,7 +213,7 @@ +@@ -212,7 +213,7 @@ if(Qt5Widgets_FOUND) set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") elseif (UNIX) find_package(Cups) @@ -26,7 +26,7 @@ set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) else () set (XPDFWIDGET_PRINTING OFF) -@@ -230,7 +231,7 @@ +@@ -230,7 +231,7 @@ elseif(QT4_FOUND) set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") elseif (UNIX) find_package(Cups) @@ -35,33 +35,3 @@ set(EXTRA_QT_LIBRARIES ${CUPS_LIBRARIES}) else () set (XPDFWIDGET_PRINTING OFF) -@@ -248,6 +249,29 @@ - NAMES paper libpaper - PATH_SUFFIXES lib64 lib - ) -+if(USE_LIBPAPER) -+ find_library(PAPER_LIBRARY -+ NAMES paper libpaper -+ HINTS -+ ${PAPER_DIR} -+ PATHS -+ /usr/local -+ ) -+ find_path(PAPER_INCLUDE_DIR .h -+ HINTS -+ ${PAPER_DIR} -+ PATHS -+ /usr/local/include -+ PATH_SUFFIXES include -+ ) -+ if (PAPER_INCLUDE_DIR AND PAPER_LIBRARY) -+ set(HAVE_PAPER_H TRUE) -+ message(STATUS "Found libpaper: ${PAPER_LIBRARY}") -+ else () -+ set(HAVE_PAPER_H FALSE) -+ message(STATUS "libpaper not found") -+ endif () -+endif () - if (PAPER_LIBRARY) - set(HAVE_PAPER_H TRUE) - else () Index: graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc =================================================================== --- graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc +++ graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc @@ -1,5 +1,5 @@ ---- xpdf-qt/XpdfWidgetPrint.cc.orig 2017-08-08 16:22:50.000000000 -0700 -+++ xpdf-qt/XpdfWidgetPrint.cc 2017-09-17 21:42:14.242967000 -0700 +--- xpdf-qt/XpdfWidgetPrint.cc.orig 2019-09-25 19:54:33 UTC ++++ xpdf-qt/XpdfWidgetPrint.cc @@ -21,7 +21,7 @@ #elif defined(__APPLE__) # include @@ -9,7 +9,7 @@ # include "PSOutputDev.h" # include #endif -@@ -315,7 +315,7 @@ +@@ -315,7 +315,7 @@ XpdfWidget::ErrorCode printPDF(PDFDoc *doc, QPrinter * // Linux //------------------------------------------------------------------------ Index: graphics/xpdf4/files/pkg-message.in =================================================================== --- graphics/xpdf4/files/pkg-message.in +++ graphics/xpdf4/files/pkg-message.in @@ -3,11 +3,11 @@ message: <