svn commit: r449702 - in head/graphics: . xpdf4 xpdf4/files

Cy Schubert cy at FreeBSD.org
Tue Sep 12 19:01:12 UTC 2017


Author: cy
Date: Tue Sep 12 19:01:10 2017
New Revision: 449702
URL: https://svnweb.freebsd.org/changeset/ports/449702

Log:
  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 at gmail.com>

Added:
  head/graphics/xpdf4/
     - copied from r449515, head/graphics/xpdf/
  head/graphics/xpdf4/files/patch-cmake-config.txt   (contents, props changed)
  head/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt   (contents, props changed)
  head/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt   (contents, props changed)
Deleted:
  head/graphics/xpdf4/files/patch-Makefile.in
  head/graphics/xpdf4/files/patch-splash_Makefile.in
  head/graphics/xpdf4/files/patch-splash_SplashFTFont.cc
  head/graphics/xpdf4/files/patch-xfont
  head/graphics/xpdf4/files/patch-xpdf_GlobalParams.cc
  head/graphics/xpdf4/files/patch-xpdf_GlobalParams.h
  head/graphics/xpdf4/files/patch-xpdf_Stream.cc
  head/graphics/xpdf4/files/patch-xpdf_XPDFViewer.cc
  head/graphics/xpdf4/files/patch-xpdf__Makefile.in
Modified:
  head/graphics/Makefile
  head/graphics/xpdf4/Makefile
  head/graphics/xpdf4/distinfo
  head/graphics/xpdf4/files/xpdf-man.conf.in
  head/graphics/xpdf4/pkg-descr
  head/graphics/xpdf4/pkg-plist

Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile	Tue Sep 12 17:46:30 2017	(r449701)
+++ head/graphics/Makefile	Tue Sep 12 19:01:10 2017	(r449702)
@@ -1095,6 +1095,7 @@
     SUBDIR += xournal
     SUBDIR += xpaint
     SUBDIR += xpdf
+    SUBDIR += xpdf4
     SUBDIR += xpeps
     SUBDIR += xpx
     SUBDIR += xsane

Modified: head/graphics/xpdf4/Makefile
==============================================================================
--- head/graphics/xpdf/Makefile	Sun Sep 10 04:38:29 2017	(r449515)
+++ head/graphics/xpdf4/Makefile	Tue Sep 12 19:01:10 2017	(r449702)
@@ -1,13 +1,10 @@
 # $FreeBSD$
 
 PORTNAME=	xpdf
-PORTVERSION=	3.04
-PORTREVISION=	7
+PORTVERSION=	4.00
 CATEGORIES=	graphics print
-MASTER_SITES=	http://mirrors.rit.edu/zi/ \
-		ftp://ftp.foolabs.com/pub/xpdf/ \
-		TEX_CTAN/support/xpdf \
-		http://komquats.com/distfiles/
+MASTER_SITES=	http://www.xpdfreader.com/dl/
+PKGNAMESUFFIX=	4
 
 MAINTAINER=	cy at FreeBSD.org
 COMMENT=	Display PDF files and convert them to other formats
@@ -17,50 +14,36 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	libfreetype.so:print/freetype2 \
 		libpng.so:graphics/png
 
-GNU_CONFIGURE=	yes
-USES=		gmake cpe localbase
-CPE_VENDOR=	foolabs
-CONFIGURE_ARGS=	--enable-opi \
-		--with-freetype2-library="${LOCALBASE}/lib" \
-		--with-freetype2-includes="${LOCALBASE}/include/freetype2" \
-		--bindir="${PREFIX}/libexec/xpdf" \
-		--mandir="${PREFIX}/share/xpdf/man"
+CONFLICTS_INSTALL=	xpdf
 
 MANPREFIX=	${PREFIX}/share/xpdf
+SUB_FILES=	xpdf-man.conf
 
-OPTIONS_DEFINE=	LIBPAPER TYPE1 X11 DOCS
-LIBPAPER_DESC=	Enable libpaper
-TYPE1_DESC=	Ghostscript type1 fonts
-OPTIONS_DEFAULT=	TYPE1 X11
+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
 
-SUB_FILES=	xpdf-man.conf
+TYPE1_CMAKE_BOOL=	TYPE1
+TYPE1_DESC=		Ghostscript type1 fonts
+TYPE1_RUN_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts
 
-TYPE1_RUN_DEPENDS=	${LOCALBASE}/share/ghostscript/fonts/n021003l.pfb:print/gsfonts
-
+LIBPAPER_CMAKE_BOOL=	USE_LIBPAPER
 LIBPAPER_LIB_DEPENDS=	libpaper.so:print/libpaper
-LIBPAPER_CONFIGURE_ON=--with-libpaper-library="${LOCALBASE}/lib" \
-		--with-libpaper-includes="${LOCALBASE}/include"
-LIBPAPER_CONFIGURE_OFF=--without-libpaper-library
 
-.if defined(A4)
-CONFIGURE_ARGS+=	--enable-a4-paper
-.endif
+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
 
-X11_CONFIGURE_WITH=	x
-X11_USES=		motif
-
-post-patch:
-	${REINPLACE_CMD} -e 's|undef USE_COMBO_BOX|define USE_COMBO_BOX 1|' \
-		${WRKSRC}/xpdf/XPDFViewer.h
-
 post-install:
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for file in ANNOUNCE CHANGES README misc/hello.pdf
-	${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
-.endfor
-	${LN} -sf ${PREFIX}/libexec/xpdf/xpdf ${STAGEDIR}${PREFIX}/bin/xpdf
-	${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
-		${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
+		${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>

Modified: head/graphics/xpdf4/distinfo
==============================================================================
--- head/graphics/xpdf/distinfo	Sun Sep 10 04:38:29 2017	(r449515)
+++ head/graphics/xpdf4/distinfo	Tue Sep 12 19:01:10 2017	(r449702)
@@ -1,2 +1,3 @@
-SHA256 (xpdf-3.04.tar.gz) = 11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5
-SIZE (xpdf-3.04.tar.gz) = 825519
+TIMESTAMP = 1502485405
+SHA256 (xpdf-4.00.tar.gz) = ff3d92c42166e35b1ba6aec9b5f0adffb5fc05a3eb95dc49505b6e344e4216d6
+SIZE (xpdf-4.00.tar.gz) = 854175

Added: head/graphics/xpdf4/files/patch-cmake-config.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/xpdf4/files/patch-cmake-config.txt	Tue Sep 12 19:01:10 2017	(r449702)
@@ -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)

Added: head/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/xpdf4/files/patch-xpdf-qt_CMakeLists.txt	Tue Sep 12 19:01:10 2017	(r449702)
@@ -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 ()

Added: head/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/xpdf4/files/patch-xpdf_CMakeLists.txt	Tue Sep 12 19:01:10 2017	(r449702)
@@ -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)

Modified: head/graphics/xpdf4/files/xpdf-man.conf.in
==============================================================================
--- head/graphics/xpdf/files/xpdf-man.conf.in	Sun Sep 10 04:38:29 2017	(r449515)
+++ head/graphics/xpdf4/files/xpdf-man.conf.in	Tue Sep 12 19:01:10 2017	(r449702)
@@ -1 +1,2 @@
 MANPATH %%PREFIX%%/share/xpdf/man
+

Modified: head/graphics/xpdf4/pkg-descr
==============================================================================
--- head/graphics/xpdf/pkg-descr	Sun Sep 10 04:38:29 2017	(r449515)
+++ head/graphics/xpdf4/pkg-descr	Tue Sep 12 19:01:10 2017	(r449702)
@@ -5,4 +5,4 @@ PDF software.
 It can also convert PDF input to ps, text, and info formats; and
 split out fonts and images.
 
-WWW: http://www.foolabs.com/xpdf/
+WWW: http://www.xpdfreader.com/

Modified: head/graphics/xpdf4/pkg-plist
==============================================================================
--- head/graphics/xpdf/pkg-plist	Sun Sep 10 04:38:29 2017	(r449515)
+++ head/graphics/xpdf4/pkg-plist	Tue Sep 12 19:01:10 2017	(r449702)
@@ -7,8 +7,8 @@ libexec/xpdf/pdftopng
 libexec/xpdf/pdftoppm
 libexec/xpdf/pdftops
 libexec/xpdf/pdftotext
-%%X11%%libexec/xpdf/xpdf
-%%X11%%bin/xpdf
+%%GUI%%libexec/xpdf/xpdf
+%%GUI%%bin/xpdf
 etc/man.d/xpdf.conf
 %%DATADIR%%/man/man1/pdfdetach.1.gz
 %%DATADIR%%/man/man1/pdffonts.1.gz
@@ -19,10 +19,6 @@ etc/man.d/xpdf.conf
 %%DATADIR%%/man/man1/pdftoppm.1.gz
 %%DATADIR%%/man/man1/pdftops.1.gz
 %%DATADIR%%/man/man1/pdftotext.1.gz
-%%X11%%%%DATADIR%%/man/man1/xpdf.1.gz
+%%GUI%%%%DATADIR%%/man/man1/xpdf.1.gz
 %%DATADIR%%/man/man5/xpdfrc.5.gz
-%%PORTDOCS%%%%DOCSDIR%%/ANNOUNCE
-%%PORTDOCS%%%%DOCSDIR%%/CHANGES
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/hello.pdf
 @sample etc/xpdfrc.sample


More information about the svn-ports-all mailing list