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

(-)graphics/xpdf4/Makefile (+49 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	xpdf
4
PORTVERSION=	4.00
5
CATEGORIES=	graphics print
6
MASTER_SITES=	http://www.xpdfreader.com/dl/
7
PKGNAMESUFFIX=	4
8
9
MAINTAINER=	melanhit@gmail.com
10
COMMENT=	Display PDF files and convert them to other formats
11
12
LICENSE=	GPLv2
13
14
LIB_DEPENDS=	libfreetype.so:print/freetype2 \
15
		libpng.so:graphics/png
16
17
CONFLICTS_INSTALL=	xpdf
18
19
MANPREFIX=	${PREFIX}/share/xpdf
20
SUB_FILES=	xpdf-man.conf
21
22
USES=		cmake:outsource localbase
23
CMAKE_ARGS+=	-DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
24
		-DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc
25
26
OPTIONS_DEFINE=		TYPE1 LIBPAPER GUI
27
OPTIONS_DEFAULT=	TYPE1 GUI
28
OPTIONS_SUB=		yes
29
30
TYPE1_CMAKE_BOOL=	TYPE1
31
TYPE1_DESC=		Ghostscript type1 fonts
32
TYPE1_RUN_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts
33
34
LIBPAPER_CMAKE_BOOL=	USE_LIBPAPER
35
LIBPAPER_LIB_DEPENDS=	libpaper.so:print/libpaper
36
37
GUI_CMAKE_ON=		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE
38
GUI_CMAKE_OFF=		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=TRUE
39
GUI_DESC=		QT5 interface
40
GUI_CMAKE_ARGS+=	-DNO_TEXT_SELECT:BOOL=OFF
41
GUI_USE=		QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport
42
43
post-install:
44
		${LN} -sf ${PREFIX}/libexec/xpdf/xpdf ${STAGEDIR}${PREFIX}/bin/xpdf
45
		${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc ${STAGEDIR}${PREFIX}/etc/xpdfrc.sample
46
		${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
47
			${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
48
49
.include <bsd.port.mk>
(-)graphics/xpdf4/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1502485405
2
SHA256 (xpdf-4.00.tar.gz) = ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6
3
SIZE (xpdf-4.00.tar.gz) = 854175
(-)graphics/xpdf4/files/patch-cmake-config.txt (+49 lines)
Line 0 Link Here
1
--- cmake-config.txt.orig	2017-09-02 20:30:45 UTC
2
+++ cmake-config.txt
3
@@ -79,6 +79,7 @@ option(USE_EXCEPTIONS "use C++ exception
4
 option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
5
 option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
6
 option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
7
+option(USE_LIBPAPER "use libpaper" OFF)
8
 if (SPLASH_DEVICEN)
9
   set(SPLASH_CMYK ON)
10
 endif ()
11
@@ -278,10 +279,34 @@ else()
12
 endif()
13
 
14
 #--- look for libpaper
15
-find_library(HAVE_PAPER_H
16
-             NAMES paper libpaper
17
-             PATH_SUFFIXES lib64 lib
18
-)
19
+if(USE_LIBPAPER)
20
+  find_library(PAPER_LIBRARY
21
+    NAMES paper libpaper
22
+    HINTS
23
+    ${PAPER_DIR}
24
+    PATHS
25
+    /usr/local
26
+    /usr/freeware
27
+  )
28
+  find_path(PAPER_INCLUDE_DIR .h
29
+    HINTS
30
+    ${PAPER_DIR}
31
+    PATHS
32
+    /usr/local/include
33
+    /usr/freeware/include
34
+    PATH_SUFFIXES include
35
+  )
36
+endif()
37
+
38
+if (USE_LIBPAPER)
39
+ if (PAPER_INCLUDE_DIR AND PAPER_LIBRARY)
40
+   set(HAVE_PAPER_H TRUE)
41
+   message(STATUS "Found libpaper: ${PAPER_LIBRARY}")
42
+ else ()
43
+  set(HAVE_PAPER_H FALSE)
44
+  message(STATUS "libpaper not found")
45
+ endif ()
46
+endif ()
47
 
48
 #--- look for pthreads
49
 find_package(Threads)
(-)graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt (+11 lines)
Line 0 Link Here
1
--- xpdf-qt/CMakeLists.txt.orig	2017-08-08 23:22:50 UTC
2
+++ xpdf-qt/CMakeLists.txt
3
@@ -86,6 +86,6 @@ if ((QT4_FOUND OR Qt5Widgets_FOUND)
4
                         ${CMAKE_THREAD_LIBS_INIT})
5
   set_property(TARGET xpdf PROPERTY WIN32_EXECUTABLE 1)
6
 
7
-  install(TARGETS xpdf RUNTIME DESTINATION bin)
8
-  install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdf.1 DESTINATION man/man1)
9
+  install(TARGETS xpdf RUNTIME DESTINATION libexec/xpdf)
10
+  install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdf.1 DESTINATION share/xpdf/man/man1)
11
 endif ()
(-)graphics/xpdf4/files/patch-xpdf_CMakeLists.txt (+143 lines)
Line 0 Link Here
1
--- xpdf/CMakeLists.txt.orig	2017-08-08 23:22:50 UTC
2
+++ xpdf/CMakeLists.txt
3
@@ -23,6 +23,9 @@ if (HAVE_LCMS)
4
 else ()
5
   set(COLOR_MANAGER_SOURCE "")
6
 endif ()
7
+if (HAVE_PAPER_H)
8
+ include_directories("${PAPER_INCLUDE_DIR}")
9
+endif ()
10
 
11
 add_library(xpdf_objs OBJECT
12
   AcroForm.cc
13
@@ -108,7 +111,7 @@ if (HAVE_SPLASH)
14
   target_link_libraries(pdftops goo fofi splash
15
                         ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
16
                         ${DTYPE_LIBRARY}
17
-                        ${LCMS_LIBRARY})
18
+                        ${LCMS_LIBRARY} ${PAPER_LIBRARY})
19
 else ()
20
   add_executable(pdftops
21
     $<TARGET_OBJECTS:xpdf_objs>
22
@@ -116,10 +119,10 @@ else ()
23
     PSOutputDev.cc
24
     pdftops.cc
25
   )
26
-  target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY})
27
+  target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
28
 endif ()
29
-install(TARGETS pdftops RUNTIME DESTINATION bin)
30
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION man/man1)
31
+install(TARGETS pdftops RUNTIME DESTINATION libexec/xpdf)
32
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION share/xpdf/man/man1)
33
 
34
 #--- pdftotext
35
 
36
@@ -128,9 +131,9 @@ add_executable(pdftotext
37
   TextOutputDev.cc
38
   pdftotext.cc
39
 )
40
-target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY})
41
-install(TARGETS pdftotext RUNTIME DESTINATION bin)
42
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION man/man1)
43
+target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
44
+install(TARGETS pdftotext RUNTIME DESTINATION libexec/xpdf)
45
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION share/xpdf/man/man1)
46
 
47
 #--- pdftohtml
48
 
49
@@ -145,9 +148,9 @@ if (HAVE_SPLASH AND PNG_FOUND)
50
   target_link_libraries(pdftohtml goo fofi splash
51
                         ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
52
                         ${DTYPE_LIBRARY}
53
-                        ${LCMS_LIBRARY} ${PNG_LIBRARIES})
54
-  install(TARGETS pdftohtml RUNTIME DESTINATION bin)
55
-  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION man/man1)
56
+                        ${LCMS_LIBRARY} ${PNG_LIBRARIES} ${PAPER_LIBRARY})
57
+  install(TARGETS pdftohtml RUNTIME DESTINATION libexec/xpdf)
58
+  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION share/xpdf/man/man1)
59
 endif ()
60
 
61
 #--- pdfinfo
62
@@ -156,9 +159,9 @@ add_executable(pdfinfo
63
   $<TARGET_OBJECTS:xpdf_objs>
64
   pdfinfo.cc
65
 )
66
-target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY})
67
-install(TARGETS pdfinfo RUNTIME DESTINATION bin)
68
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION man/man1)
69
+target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
70
+install(TARGETS pdfinfo RUNTIME DESTINATION libexec/xpdf)
71
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION share/xpdf/man/man1)
72
 
73
 #--- pdffonts
74
 
75
@@ -166,9 +169,9 @@ add_executable(pdffonts
76
   $<TARGET_OBJECTS:xpdf_objs>
77
   pdffonts.cc
78
 )
79
-target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY})
80
-install(TARGETS pdffonts RUNTIME DESTINATION bin)
81
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION man/man1)
82
+target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
83
+install(TARGETS pdffonts RUNTIME DESTINATION libexec/xpdf)
84
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION share/xpdf/man/man1)
85
 
86
 #--- pdfdetach
87
 
88
@@ -176,9 +179,9 @@ add_executable(pdfdetach
89
   $<TARGET_OBJECTS:xpdf_objs>
90
   pdfdetach.cc
91
 )
92
-target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY})
93
-install(TARGETS pdfdetach RUNTIME DESTINATION bin)
94
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION man/man1)
95
+target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
96
+install(TARGETS pdfdetach RUNTIME DESTINATION libexec/xpdf)
97
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION share/xpdf/man/man1)
98
 
99
 #--- pdftoppm
100
 
101
@@ -190,10 +193,10 @@ if (HAVE_SPLASH)
102
   )
103
   target_link_libraries(pdftoppm goo fofi splash
104
                         ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
105
-                        ${DTYPE_LIBRARY}
106
+                        ${DTYPE_LIBRARY} ${PAPER_LIBRARY}
107
                         ${LCMS_LIBRARY})
108
-  install(TARGETS pdftoppm RUNTIME DESTINATION bin)
109
-  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION man/man1)
110
+  install(TARGETS pdftoppm RUNTIME DESTINATION libexec/xpdf)
111
+  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION share/xpdf/man/man1)
112
 endif ()
113
 
114
 #--- pdftopng
115
@@ -206,10 +209,10 @@ if (HAVE_SPLASH AND PNG_FOUND)
116
   )
117
   target_link_libraries(pdftopng goo fofi splash
118
                         ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
119
-                        ${DTYPE_LIBRARY}
120
+                        ${DTYPE_LIBRARY} ${PAPER_LIBRARY}
121
                         ${LCMS_LIBRARY} ${PNG_LIBRARIES})
122
-  install(TARGETS pdftopng RUNTIME DESTINATION bin)
123
-  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION man/man1)
124
+  install(TARGETS pdftopng RUNTIME DESTINATION libexec/xpdf)
125
+  install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION share/xpdf/man/man1)
126
 endif ()
127
 
128
 #--- pdfimages
129
@@ -219,10 +222,10 @@ add_executable(pdfimages
130
   ImageOutputDev.cc
131
   pdfimages.cc
132
 )
133
-target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY})
134
-install(TARGETS pdfimages RUNTIME DESTINATION bin)
135
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION man/man1)
136
+target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
137
+install(TARGETS pdfimages RUNTIME DESTINATION libexec/xpdf)
138
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION share/xpdf/man/man1)
139
 
140
 #--- xpdfrc man page
141
 
142
-install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION man/man5)
143
+install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION share/xpdf/man/man5)
(-)graphics/xpdf4/files/xpdf-man.conf.in (+2 lines)
Line 0 Link Here
1
MANPATH %%PREFIX%%/share/xpdf/man
2
(-)graphics/xpdf4/pkg-descr (+8 lines)
Line 0 Link Here
1
Xpdf is a viewer for Portable Document Format (PDF) files.  These are
2
also sometimes also called 'Acrobat' files, from the name of Adobe's
3
PDF software.
4
5
It can also convert PDF input to ps, text, and info formats; and
6
split out fonts and images.
7
8
WWW: http://www.xpdfreader.com/
(-)graphics/xpdf4/pkg-message (+8 lines)
Line 0 Link Here
1
Please note: The binaries in this package -- pdffonts, pdfimages, pdfinfo,
2
pdfdetach, pdftohtml, pdftopng, pdftoppm, pdftops, pdftotext -- are
3
installed in ${LOCALBASE}/libexec/xpdf. The reason for this is to not
4
conflict with the poppler-utils package, which is a prerequisite of many
5
other packages. If you need to use any of these utilites,
6
7
a) create symlinks in ${LOCALBASE}/bin or some other directory in $PATH, or
8
b) install graphics/poppler-utils.
(-)graphics/xpdf4/pkg-plist (+24 lines)
Line 0 Link Here
1
libexec/xpdf/pdffonts
2
libexec/xpdf/pdfimages
3
libexec/xpdf/pdfinfo
4
libexec/xpdf/pdfdetach
5
libexec/xpdf/pdftohtml
6
libexec/xpdf/pdftopng
7
libexec/xpdf/pdftoppm
8
libexec/xpdf/pdftops
9
libexec/xpdf/pdftotext
10
%%GUI%%libexec/xpdf/xpdf
11
%%GUI%%bin/xpdf
12
etc/man.d/xpdf.conf
13
%%DATADIR%%/man/man1/pdfdetach.1.gz
14
%%DATADIR%%/man/man1/pdffonts.1.gz
15
%%DATADIR%%/man/man1/pdfimages.1.gz
16
%%DATADIR%%/man/man1/pdfinfo.1.gz
17
%%DATADIR%%/man/man1/pdftohtml.1.gz
18
%%DATADIR%%/man/man1/pdftopng.1.gz
19
%%DATADIR%%/man/man1/pdftoppm.1.gz
20
%%DATADIR%%/man/man1/pdftops.1.gz
21
%%DATADIR%%/man/man1/pdftotext.1.gz
22
%%GUI%%%%DATADIR%%/man/man1/xpdf.1.gz
23
%%DATADIR%%/man/man5/xpdfrc.5.gz
24
@sample etc/xpdfrc.sample

Return to bug 222231