1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00

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>
This commit is contained in:
Cy Schubert 2017-09-12 19:01:10 +00:00
parent da4f38412c
commit edb7b73b16
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449702
10 changed files with 298 additions and 0 deletions

View File

@ -1095,6 +1095,7 @@
SUBDIR += xournal
SUBDIR += xpaint
SUBDIR += xpdf
SUBDIR += xpdf4
SUBDIR += xpeps
SUBDIR += xpx
SUBDIR += xsane

49
graphics/xpdf4/Makefile Normal file
View File

@ -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>

3
graphics/xpdf4/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1502485405
SHA256 (xpdf-4.00.tar.gz) = ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6
SIZE (xpdf-4.00.tar.gz) = 854175

View File

@ -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)

View File

@ -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 ()

View File

@ -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)

View File

@ -0,0 +1,2 @@
MANPATH %%PREFIX%%/share/xpdf/man

8
graphics/xpdf4/pkg-descr Normal file
View File

@ -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/

View File

@ -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.

24
graphics/xpdf4/pkg-plist Normal file
View File

@ -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