aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2017-09-13 03:01:10 +0800
committercy <cy@FreeBSD.org>2017-09-13 03:01:10 +0800
commitf8f87e64f79e46bb7a35e93b1546d66a39f8925d (patch)
treedbbd49ea3aadd2dc06fe1f03ca051d0bfdc95d1b
parentb912fbe2ce0d040accc99f77253b7dfad734024f (diff)
downloadfreebsd-ports-gnome-f8f87e64f79e46bb7a35e93b1546d66a39f8925d.tar.gz
freebsd-ports-gnome-f8f87e64f79e46bb7a35e93b1546d66a39f8925d.tar.zst
freebsd-ports-gnome-f8f87e64f79e46bb7a35e93b1546d66a39f8925d.zip
PR/222002 initially patched graphics/xpdf to update to xpdf 4.00.
As xpdf 4.00 introduces a brand new GUI based on QT5 rather than Motif, xpdf4 is being added as a new port, repocopied from graphics/xpdf. Subsequent to this commit graphics/xpdf will be renamed to xpdf3 and a master port of graphics/xpdf (similar in concept to security/krb5, sysutils/cfengine and sysutils/syslog-ng) will be created to allow users to seamlessly update. People concerned with POLA will be encouraged to use the to be renamed graphics/xpdf3 port. PR: 222002 Submitted by: Andrew Romanenko <melanhit@gmail.com>
-rw-r--r--graphics/Makefile1
-rw-r--r--graphics/xpdf4/Makefile49
-rw-r--r--graphics/xpdf4/distinfo3
-rw-r--r--graphics/xpdf4/files/patch-cmake-config.txt49
-rw-r--r--graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt11
-rw-r--r--graphics/xpdf4/files/patch-xpdf_CMakeLists.txt143
-rw-r--r--graphics/xpdf4/files/xpdf-man.conf.in2
-rw-r--r--graphics/xpdf4/pkg-descr8
-rw-r--r--graphics/xpdf4/pkg-message8
-rw-r--r--graphics/xpdf4/pkg-plist24
10 files changed, 298 insertions, 0 deletions
diff --git a/graphics/Makefile b/graphics/Makefile
index 2fce8a30ebc5..f209718031be 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -1095,6 +1095,7 @@
SUBDIR += xournal
SUBDIR += xpaint
SUBDIR += xpdf
+ SUBDIR += xpdf4
SUBDIR += xpeps
SUBDIR += xpx
SUBDIR += xsane
diff --git a/graphics/xpdf4/Makefile b/graphics/xpdf4/Makefile
new file mode 100644
index 000000000000..0af23efbd4f1
--- /dev/null
+++ b/graphics/xpdf4/Makefile
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+PORTNAME= xpdf
+PORTVERSION= 4.00
+CATEGORIES= graphics print
+MASTER_SITES= http://www.xpdfreader.com/dl/
+PKGNAMESUFFIX= 4
+
+MAINTAINER= cy@FreeBSD.org
+COMMENT= Display PDF files and convert them to other formats
+
+LICENSE= GPLv2
+
+LIB_DEPENDS= libfreetype.so:print/freetype2 \
+ libpng.so:graphics/png
+
+CONFLICTS_INSTALL= xpdf
+
+MANPREFIX= ${PREFIX}/share/xpdf
+SUB_FILES= xpdf-man.conf
+
+USES= cmake:outsource localbase
+CMAKE_ARGS+= -DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
+ -DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc
+
+OPTIONS_DEFINE= TYPE1 LIBPAPER GUI
+OPTIONS_DEFAULT= TYPE1 GUI
+OPTIONS_SUB= yes
+
+TYPE1_CMAKE_BOOL= TYPE1
+TYPE1_DESC= Ghostscript type1 fonts
+TYPE1_RUN_DEPENDS= ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts
+
+LIBPAPER_CMAKE_BOOL= USE_LIBPAPER
+LIBPAPER_LIB_DEPENDS= libpaper.so:print/libpaper
+
+GUI_CMAKE_ON= -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE
+GUI_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=TRUE
+GUI_DESC= QT5 interface
+GUI_CMAKE_ARGS+= -DNO_TEXT_SELECT:BOOL=OFF
+GUI_USE= QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport
+
+post-install:
+ ${LN} -sf ${PREFIX}/libexec/xpdf/xpdf ${STAGEDIR}${PREFIX}/bin/xpdf
+ ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc ${STAGEDIR}${PREFIX}/etc/xpdfrc.sample
+ ${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
+ ${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
+
+.include <bsd.port.mk>
diff --git a/graphics/xpdf4/distinfo b/graphics/xpdf4/distinfo
new file mode 100644
index 000000000000..5033d2dbfa7c
--- /dev/null
+++ b/graphics/xpdf4/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1502485405
+SHA256 (xpdf-4.00.tar.gz) = ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6
+SIZE (xpdf-4.00.tar.gz) = 854175
diff --git a/graphics/xpdf4/files/patch-cmake-config.txt b/graphics/xpdf4/files/patch-cmake-config.txt
new file mode 100644
index 000000000000..ece77c523e1d
--- /dev/null
+++ b/graphics/xpdf4/files/patch-cmake-config.txt
@@ -0,0 +1,49 @@
+--- cmake-config.txt.orig 2017-09-02 20:30:45 UTC
++++ cmake-config.txt
+@@ -79,6 +79,7 @@ option(USE_EXCEPTIONS "use C++ exception
+ option(USE_FIXEDPOINT "use fixed point (instead of floating point) arithmetic" OFF)
+ option(SPLASH_CMYK "include support for CMYK rasterization" OFF)
+ option(SPLASH_DEVICEN "include support for DeviceN rasterization" OFF)
++option(USE_LIBPAPER "use libpaper" OFF)
+ if (SPLASH_DEVICEN)
+ set(SPLASH_CMYK ON)
+ endif ()
+@@ -278,10 +279,34 @@ else()
+ endif()
+
+ #--- look for libpaper
+-find_library(HAVE_PAPER_H
+- NAMES paper libpaper
+- PATH_SUFFIXES lib64 lib
+-)
++if(USE_LIBPAPER)
++ find_library(PAPER_LIBRARY
++ NAMES paper libpaper
++ HINTS
++ ${PAPER_DIR}
++ PATHS
++ /usr/local
++ /usr/freeware
++ )
++ find_path(PAPER_INCLUDE_DIR .h
++ HINTS
++ ${PAPER_DIR}
++ PATHS
++ /usr/local/include
++ /usr/freeware/include
++ PATH_SUFFIXES include
++ )
++endif()
++
++if (USE_LIBPAPER)
++ 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 ()
+
+ #--- look for pthreads
+ find_package(Threads)
diff --git a/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt b/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt
new file mode 100644
index 000000000000..d7e91fe26916
--- /dev/null
+++ b/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- xpdf-qt/CMakeLists.txt.orig 2017-08-08 23:22:50 UTC
++++ xpdf-qt/CMakeLists.txt
+@@ -86,6 +86,6 @@ if ((QT4_FOUND OR Qt5Widgets_FOUND)
+ ${CMAKE_THREAD_LIBS_INIT})
+ set_property(TARGET xpdf PROPERTY WIN32_EXECUTABLE 1)
+
+- install(TARGETS xpdf RUNTIME DESTINATION bin)
+- install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdf.1 DESTINATION man/man1)
++ install(TARGETS xpdf RUNTIME DESTINATION libexec/xpdf)
++ install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdf.1 DESTINATION share/xpdf/man/man1)
+ endif ()
diff --git a/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt b/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt
new file mode 100644
index 000000000000..dc31866fc386
--- /dev/null
+++ b/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt
@@ -0,0 +1,143 @@
+--- xpdf/CMakeLists.txt.orig 2017-08-08 23:22:50 UTC
++++ xpdf/CMakeLists.txt
+@@ -23,6 +23,9 @@ if (HAVE_LCMS)
+ else ()
+ set(COLOR_MANAGER_SOURCE "")
+ endif ()
++if (HAVE_PAPER_H)
++ include_directories("${PAPER_INCLUDE_DIR}")
++endif ()
+
+ add_library(xpdf_objs OBJECT
+ AcroForm.cc
+@@ -108,7 +111,7 @@ if (HAVE_SPLASH)
+ target_link_libraries(pdftops goo fofi splash
+ ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
+ ${DTYPE_LIBRARY}
+- ${LCMS_LIBRARY})
++ ${LCMS_LIBRARY} ${PAPER_LIBRARY})
+ else ()
+ add_executable(pdftops
+ $<TARGET_OBJECTS:xpdf_objs>
+@@ -116,10 +119,10 @@ else ()
+ PSOutputDev.cc
+ pdftops.cc
+ )
+- target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY})
++ target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
+ endif ()
+-install(TARGETS pdftops RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION man/man1)
++install(TARGETS pdftops RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION share/xpdf/man/man1)
+
+ #--- pdftotext
+
+@@ -128,9 +131,9 @@ add_executable(pdftotext
+ TextOutputDev.cc
+ pdftotext.cc
+ )
+-target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY})
+-install(TARGETS pdftotext RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION man/man1)
++target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
++install(TARGETS pdftotext RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION share/xpdf/man/man1)
+
+ #--- pdftohtml
+
+@@ -145,9 +148,9 @@ if (HAVE_SPLASH AND PNG_FOUND)
+ target_link_libraries(pdftohtml goo fofi splash
+ ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
+ ${DTYPE_LIBRARY}
+- ${LCMS_LIBRARY} ${PNG_LIBRARIES})
+- install(TARGETS pdftohtml RUNTIME DESTINATION bin)
+- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION man/man1)
++ ${LCMS_LIBRARY} ${PNG_LIBRARIES} ${PAPER_LIBRARY})
++ install(TARGETS pdftohtml RUNTIME DESTINATION libexec/xpdf)
++ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION share/xpdf/man/man1)
+ endif ()
+
+ #--- pdfinfo
+@@ -156,9 +159,9 @@ add_executable(pdfinfo
+ $<TARGET_OBJECTS:xpdf_objs>
+ pdfinfo.cc
+ )
+-target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY})
+-install(TARGETS pdfinfo RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION man/man1)
++target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
++install(TARGETS pdfinfo RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION share/xpdf/man/man1)
+
+ #--- pdffonts
+
+@@ -166,9 +169,9 @@ add_executable(pdffonts
+ $<TARGET_OBJECTS:xpdf_objs>
+ pdffonts.cc
+ )
+-target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY})
+-install(TARGETS pdffonts RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION man/man1)
++target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
++install(TARGETS pdffonts RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION share/xpdf/man/man1)
+
+ #--- pdfdetach
+
+@@ -176,9 +179,9 @@ add_executable(pdfdetach
+ $<TARGET_OBJECTS:xpdf_objs>
+ pdfdetach.cc
+ )
+-target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY})
+-install(TARGETS pdfdetach RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION man/man1)
++target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
++install(TARGETS pdfdetach RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION share/xpdf/man/man1)
+
+ #--- pdftoppm
+
+@@ -190,10 +193,10 @@ if (HAVE_SPLASH)
+ )
+ target_link_libraries(pdftoppm goo fofi splash
+ ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
+- ${DTYPE_LIBRARY}
++ ${DTYPE_LIBRARY} ${PAPER_LIBRARY}
+ ${LCMS_LIBRARY})
+- install(TARGETS pdftoppm RUNTIME DESTINATION bin)
+- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION man/man1)
++ install(TARGETS pdftoppm RUNTIME DESTINATION libexec/xpdf)
++ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION share/xpdf/man/man1)
+ endif ()
+
+ #--- pdftopng
+@@ -206,10 +209,10 @@ if (HAVE_SPLASH AND PNG_FOUND)
+ )
+ target_link_libraries(pdftopng goo fofi splash
+ ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
+- ${DTYPE_LIBRARY}
++ ${DTYPE_LIBRARY} ${PAPER_LIBRARY}
+ ${LCMS_LIBRARY} ${PNG_LIBRARIES})
+- install(TARGETS pdftopng RUNTIME DESTINATION bin)
+- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION man/man1)
++ install(TARGETS pdftopng RUNTIME DESTINATION libexec/xpdf)
++ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION share/xpdf/man/man1)
+ endif ()
+
+ #--- pdfimages
+@@ -219,10 +222,10 @@ add_executable(pdfimages
+ ImageOutputDev.cc
+ pdfimages.cc
+ )
+-target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY})
+-install(TARGETS pdfimages RUNTIME DESTINATION bin)
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION man/man1)
++target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY} ${PAPER_LIBRARY})
++install(TARGETS pdfimages RUNTIME DESTINATION libexec/xpdf)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION share/xpdf/man/man1)
+
+ #--- xpdfrc man page
+
+-install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION man/man5)
++install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION share/xpdf/man/man5)
diff --git a/graphics/xpdf4/files/xpdf-man.conf.in b/graphics/xpdf4/files/xpdf-man.conf.in
new file mode 100644
index 000000000000..2fd81b7bd6d1
--- /dev/null
+++ b/graphics/xpdf4/files/xpdf-man.conf.in
@@ -0,0 +1,2 @@
+MANPATH %%PREFIX%%/share/xpdf/man
+
diff --git a/graphics/xpdf4/pkg-descr b/graphics/xpdf4/pkg-descr
new file mode 100644
index 000000000000..a09c117e2541
--- /dev/null
+++ b/graphics/xpdf4/pkg-descr
@@ -0,0 +1,8 @@
+Xpdf is a viewer for Portable Document Format (PDF) files. These are
+also sometimes also called 'Acrobat' files, from the name of Adobe's
+PDF software.
+
+It can also convert PDF input to ps, text, and info formats; and
+split out fonts and images.
+
+WWW: http://www.xpdfreader.com/
diff --git a/graphics/xpdf4/pkg-message b/graphics/xpdf4/pkg-message
new file mode 100644
index 000000000000..e8baf67674ee
--- /dev/null
+++ b/graphics/xpdf4/pkg-message
@@ -0,0 +1,8 @@
+Please note: The binaries in this package -- pdffonts, pdfimages, pdfinfo,
+pdfdetach, pdftohtml, pdftopng, pdftoppm, pdftops, pdftotext -- are
+installed in ${LOCALBASE}/libexec/xpdf. The reason for this is to not
+conflict with the poppler-utils package, which is a prerequisite of many
+other packages. If you need to use any of these utilites,
+
+a) create symlinks in ${LOCALBASE}/bin or some other directory in $PATH, or
+b) install graphics/poppler-utils.
diff --git a/graphics/xpdf4/pkg-plist b/graphics/xpdf4/pkg-plist
new file mode 100644
index 000000000000..664c9f1b270e
--- /dev/null
+++ b/graphics/xpdf4/pkg-plist
@@ -0,0 +1,24 @@
+libexec/xpdf/pdffonts
+libexec/xpdf/pdfimages
+libexec/xpdf/pdfinfo
+libexec/xpdf/pdfdetach
+libexec/xpdf/pdftohtml
+libexec/xpdf/pdftopng
+libexec/xpdf/pdftoppm
+libexec/xpdf/pdftops
+libexec/xpdf/pdftotext
+%%GUI%%libexec/xpdf/xpdf
+%%GUI%%bin/xpdf
+etc/man.d/xpdf.conf
+%%DATADIR%%/man/man1/pdfdetach.1.gz
+%%DATADIR%%/man/man1/pdffonts.1.gz
+%%DATADIR%%/man/man1/pdfimages.1.gz
+%%DATADIR%%/man/man1/pdfinfo.1.gz
+%%DATADIR%%/man/man1/pdftohtml.1.gz
+%%DATADIR%%/man/man1/pdftopng.1.gz
+%%DATADIR%%/man/man1/pdftoppm.1.gz
+%%DATADIR%%/man/man1/pdftops.1.gz
+%%DATADIR%%/man/man1/pdftotext.1.gz
+%%GUI%%%%DATADIR%%/man/man1/xpdf.1.gz
+%%DATADIR%%/man/man5/xpdfrc.5.gz
+@sample etc/xpdfrc.sample