From owner-svn-ports-all@freebsd.org Mon Sep 18 19:45:47 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1127E01E4F; Mon, 18 Sep 2017 19:45:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 946147CC14; Mon, 18 Sep 2017 19:45:47 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8IJjkr3021413; Mon, 18 Sep 2017 19:45:46 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8IJjkIr021409; Mon, 18 Sep 2017 19:45:46 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201709181945.v8IJjkIr021409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 18 Sep 2017 19:45:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r450077 - in head/graphics/xpdf4: . files X-SVN-Group: ports-head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/graphics/xpdf4: . files X-SVN-Commit-Revision: 450077 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 19:45:47 -0000 Author: cy Date: Mon Sep 18 19:45:46 2017 New Revision: 450077 URL: https://svnweb.freebsd.org/changeset/ports/450077 Log: Add a printer output option, providing a menu item to print to file or hardcopy. Note: xpdf4 only supports printing to CUPS. PR: 222283 Added: head/graphics/xpdf4/files/patch-aconf.h.in (contents, props changed) head/graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc (contents, props changed) Modified: head/graphics/xpdf4/Makefile head/graphics/xpdf4/files/patch-cmake-config.txt Modified: head/graphics/xpdf4/Makefile ============================================================================== --- head/graphics/xpdf4/Makefile Mon Sep 18 19:37:04 2017 (r450076) +++ head/graphics/xpdf4/Makefile Mon Sep 18 19:45:46 2017 (r450077) @@ -2,6 +2,7 @@ PORTNAME= xpdf PORTVERSION= 4.02 +PORTREVISION= 1 CATEGORIES= graphics print MASTER_SITES= http://www.xpdfreader.com/dl/ .if !defined(MASTERDIR) @@ -26,7 +27,7 @@ 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_DEFINE= TYPE1 LIBPAPER GUI PRINT OPTIONS_DEFAULT= TYPE1 GUI OPTIONS_SUB= yes @@ -42,6 +43,12 @@ GUI_CMAKE_OFF= -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widget GUI_DESC= QT5 interface GUI_CMAKE_ARGS+= -DNO_TEXT_SELECT:BOOL=OFF GUI_USE= QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport + +PRINT_CMAKE_ON= -DXPDFWIDGET_PRINTING:BOOL=ON -DCUPS:BOOL=ON +PRINT_CMAKE_OFF= -DXPDFWIDGET_PRINTING:BOOL=OFF -DCUPS:BOOL=OFF +PRINT_DESC= Print support (CUPS dependency) +PRINT_LDFLAGS= -L${LOCALBASE}/lib +PRINT_LIB_DEPENDS= libcups.so:print/cups post-install: @cd ${STAGEDIR}${PREFIX}; \ Added: head/graphics/xpdf4/files/patch-aconf.h.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/xpdf4/files/patch-aconf.h.in Mon Sep 18 19:45:46 2017 (r450077) @@ -0,0 +1,12 @@ +--- aconf.h.in.orig 2017-08-08 16:22:50.000000000 -0700 ++++ aconf.h.in 2017-09-17 20:40:48.183421000 -0700 +@@ -110,4 +110,9 @@ + */ + #cmakedefine01 BUILDING_XPDFREADER + ++/* ++ * Defined when print option selected ++ */ ++#cmakedefine01 XPDFWIDGET_PRINTING ++ + #endif Modified: head/graphics/xpdf4/files/patch-cmake-config.txt ============================================================================== --- head/graphics/xpdf4/files/patch-cmake-config.txt Mon Sep 18 19:37:04 2017 (r450076) +++ head/graphics/xpdf4/files/patch-cmake-config.txt Mon Sep 18 19:45:46 2017 (r450077) @@ -1,6 +1,6 @@ ---- cmake-config.txt.orig 2017-09-02 20:30:45 UTC -+++ cmake-config.txt -@@ -79,6 +79,7 @@ option(USE_EXCEPTIONS "use C++ exception +--- cmake-config.txt.orig 2017-08-08 16:22:50.000000000 -0700 ++++ cmake-config.txt 2017-09-17 21:03:21.838497000 -0700 +@@ -79,6 +79,7 @@ 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) @@ -8,7 +8,29 @@ if (SPLASH_DEVICEN) set(SPLASH_CMYK ON) endif () -@@ -278,10 +279,34 @@ else() +@@ -235,9 +236,7 @@ + if (XPDFWIDGET_PRINTING) + set(QT_INCLUDES "${Qt5Widgets_INCLUDE_DIRS} ${Qt5PrintSupport_INCLUDE_DIRS}") + set(QT_DEFINITIONS "${Qt5Widgets_DEFINITIONS} ${Qt5PrintSupport_DEFINITIONS}") +- if (APPLE) +- set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport "-framework ApplicationServices") +- elseif (UNIX) ++ if (CUPS) + set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport cups) + else () + set(QT_LIBRARIES Qt5::Widgets Qt5::PrintSupport) +@@ -248,9 +247,7 @@ + set(QT_LIBRARIES Qt5::Widgets) + endif () + if (XPDFWIDGET_PRINTING) +- if (APPLE) +- set(EXTRA_QT_LIBRARIES "-framework ApplicationServices") +- elseif (UNIX) ++ if (CUPS) + set(EXTRA_QT_LIBRARIES cups) + else () + set(EXTRA_QT_LIBRARIES "") +@@ -278,10 +275,34 @@ endif() #--- look for libpaper Added: head/graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/xpdf4/files/patch-xpdf-qt_XpdfWidgetPrint.cc Mon Sep 18 19:45:46 2017 (r450077) @@ -0,0 +1,20 @@ +--- xpdf-qt/XpdfWidgetPrint.cc.orig 2017-08-08 16:22:50.000000000 -0700 ++++ xpdf-qt/XpdfWidgetPrint.cc 2017-09-17 21:42:14.242967000 -0700 +@@ -21,7 +21,7 @@ + #elif defined(__APPLE__) + # include + # include +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD_cc_version) + # include "PSOutputDev.h" + # include + #endif +@@ -315,7 +315,7 @@ + // Linux + //------------------------------------------------------------------------ + +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(__FreeBSD_cc_version) + + static void fileOut(void *stream, const char *data, int len) { + fwrite(data, 1, len, (FILE *)stream);