View | Details | Raw Unified | Return to bug 222283
Collapse All | Expand All

(-)Makefile (-1 / +8 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	xpdf
3
PORTNAME=	xpdf
4
PORTVERSION=	4.02
4
PORTVERSION=	4.02
5
PORTREVISION=	1
5
CATEGORIES=	graphics print
6
CATEGORIES=	graphics print
6
MASTER_SITES=	http://www.xpdfreader.com/dl/
7
MASTER_SITES=	http://www.xpdfreader.com/dl/
7
.if !defined(MASTERDIR)
8
.if !defined(MASTERDIR)
Lines 26-32 Link Here
26
CMAKE_ARGS+=	-DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
27
CMAKE_ARGS+=	-DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
27
		-DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc
28
		-DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc
28
29
29
OPTIONS_DEFINE=		TYPE1 LIBPAPER GUI
30
OPTIONS_DEFINE=		TYPE1 LIBPAPER GUI PRINT
30
OPTIONS_DEFAULT=	TYPE1 GUI
31
OPTIONS_DEFAULT=	TYPE1 GUI
31
OPTIONS_SUB=		yes
32
OPTIONS_SUB=		yes
32
33
Lines 43-48 Link Here
43
GUI_CMAKE_ARGS+=	-DNO_TEXT_SELECT:BOOL=OFF
44
GUI_CMAKE_ARGS+=	-DNO_TEXT_SELECT:BOOL=OFF
44
GUI_USE=		QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport
45
GUI_USE=		QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport
45
46
47
PRINT_CMAKE_ON=		-DXPDFWIDGET_PRINTING:BOOL=ON -DCUPS:BOOL=ON
48
PRINT_CMAKE_OFF=	-DXPDFWIDGET_PRINTING:BOOL=OFF -DCUPS:BOOL=OFF
49
PRINT_DESC=		 Print support (CUPS dependency)
50
PRINT_LDFLAGS=		-L${LOCALBASE}/lib
51
PRINT_LIB_DEPENDS=	libcups.so:print/cups
52
46
post-install:
53
post-install:
47
		@cd ${STAGEDIR}${PREFIX}; \
54
		@cd ${STAGEDIR}${PREFIX}; \
48
		${LN} -sf ../libexec/xpdf/xpdf bin/xpdf
55
		${LN} -sf ../libexec/xpdf/xpdf bin/xpdf
(-)files/patch-aconf.h.in (+12 lines)
Line 0 Link Here
1
--- aconf.h.in.orig	2017-08-08 16:22:50.000000000 -0700
2
+++ aconf.h.in	2017-09-17 20:40:48.183421000 -0700
3
@@ -110,4 +110,9 @@
4
  */
5
 #cmakedefine01 BUILDING_XPDFREADER
6
 
7
+/*
8
+ * Defined when print option selected
9
+ */
10
+#cmakedefine01 XPDFWIDGET_PRINTING
11
+
12
 #endif
(-)files/patch-cmake-config.txt (-4 / +26 lines)
Lines 1-6 Link Here
1
--- cmake-config.txt.orig	2017-09-02 20:30:45 UTC
1
--- cmake-config.txt.orig	2017-08-08 16:22:50.000000000 -0700
2
+++ cmake-config.txt
2
+++ cmake-config.txt	2017-09-17 21:03:21.838497000 -0700
3
@@ -79,6 +79,7 @@ option(USE_EXCEPTIONS "use C++ exception
3
@@ -79,6 +79,7 @@
4
 option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
4
 option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
5
 option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
5
 option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
6
 option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
6
 option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
Lines 8-14 Link Here
8
 if (SPLASH_DEVICEN)
8
 if (SPLASH_DEVICEN)
9
   set(SPLASH_CMYK ON)
9
   set(SPLASH_CMYK ON)
10
 endif ()
10
 endif ()
11
@@ -278,10 +279,34 @@ else()
11
@@ -235,9 +236,7 @@
12
   if (XPDFWIDGET_PRINTING)
13
     set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}")
14
     set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}")
15
-    if (APPLE)
16
-      set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport "-framework ApplicationServices")
17
-    elseif (UNIX)
18
+    if (CUPS)
19
       set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport cups)
20
     else ()
21
       set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport)
22
@@ -248,9 +247,7 @@
23
     set(QT_LIBRARIES Qt5::Widgets)
24
   endif ()
25
   if (XPDFWIDGET_PRINTING)
26
-    if (APPLE)
27
-      set(EXTRA_QT_LIBRARIES "-framework ApplicationServices")
28
-    elseif (UNIX)
29
+    if (CUPS)
30
       set(EXTRA_QT_LIBRARIES cups)
31
     else ()
32
       set(EXTRA_QT_LIBRARIES "")
33
@@ -278,10 +275,34 @@
12
 endif()
34
 endif()
13
 
35
 
14
 #--- look for libpaper
36
 #--- look for libpaper
(-)files/patch-xpdf-qt_XpdfWidgetPrint.cc (+20 lines)
Line 0 Link Here
1
--- xpdf-qt/XpdfWidgetPrint.cc.orig	2017-08-08 16:22:50.000000000 -0700
2
+++ xpdf-qt/XpdfWidgetPrint.cc	2017-09-17 21:42:14.242967000 -0700
3
@@ -21,7 +21,7 @@
4
 #elif defined(__APPLE__)
5
 #  include <CoreFoundation/CoreFoundation.h>
6
 #  include <ApplicationServices/ApplicationServices.h>
7
-#elif defined(__linux__)
8
+#elif defined(__linux__) || defined(__FreeBSD_cc_version)
9
 #  include "PSOutputDev.h"
10
 #  include <cups/cups.h>
11
 #endif
12
@@ -315,7 +315,7 @@
13
 // Linux
14
 //------------------------------------------------------------------------
15
 
16
-#elif defined(__linux__)
17
+#elif defined(__linux__) || defined(__FreeBSD_cc_version)
18
 
19
 static void fileOut(void *stream, const char *data, int len) {
20
   fwrite(data, 1, len, (FILE *)stream);

Return to bug 222283