aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2018-04-20 01:54:02 +0000
committerCy Schubert <cy@FreeBSD.org>2018-04-20 01:54:02 +0000
commitb4aef4b80b865d2bdd1d7828df5bb889f2ff3567 (patch)
treed8e3587478290fc101433e31dcc27ea1eb14e79d /graphics
parentd06281fc0fdc84504aa155513bf803b8fd51c14d (diff)
downloadports-b4aef4b80b865d2bdd1d7828df5bb889f2ff3567.tar.gz
ports-b4aef4b80b865d2bdd1d7828df5bb889f2ff3567.zip
Add xpdf.desktop files to both xpdf ports so that it is possible to set
xpdf to be the default PDF viewer via xdg-mime. PR: 227627 Submitted by: 0mp@
Notes
Notes: svn path=/head/; revision=467809
Diffstat (limited to 'graphics')
-rw-r--r--graphics/xpdf3/Makefile8
-rw-r--r--graphics/xpdf3/files/xpdf.desktop11
-rw-r--r--graphics/xpdf3/pkg-plist1
-rw-r--r--graphics/xpdf4/Makefile8
-rw-r--r--graphics/xpdf4/files/xpdf.desktop11
-rw-r--r--graphics/xpdf4/pkg-plist1
6 files changed, 37 insertions, 3 deletions
diff --git a/graphics/xpdf3/Makefile b/graphics/xpdf3/Makefile
index cce8b2e2a467..3f02a5690552 100644
--- a/graphics/xpdf3/Makefile
+++ b/graphics/xpdf3/Makefile
@@ -2,7 +2,7 @@
PORTNAME= xpdf
PORTVERSION= 3.04
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= graphics print
MASTER_SITES= http://mirrors.rit.edu/zi/ \
ftp://ftp.foolabs.com/pub/xpdf/ \
@@ -54,7 +54,8 @@ CONFIGURE_ARGS+= --enable-a4-paper
.endif
X11_CONFIGURE_WITH= x
-X11_USES= motif
+X11_USES= desktop-file-utils motif
+X11_PLIST_SUB= DESKTOPDIR=${DESKTOPDIR}
post-patch:
${REINPLACE_CMD} -e 's|undef USE_COMBO_BOX|define USE_COMBO_BOX 1|' \
@@ -70,4 +71,7 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
+post-install-X11-on:
+ ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${STAGEDIR}${DESKTOPDIR}
+
.include <bsd.port.mk>
diff --git a/graphics/xpdf3/files/xpdf.desktop b/graphics/xpdf3/files/xpdf.desktop
new file mode 100644
index 000000000000..ffac5a8a7d26
--- /dev/null
+++ b/graphics/xpdf3/files/xpdf.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=xpdf
+GenericName=PDF viewer
+Comment=Display PDF files
+Exec=xpdf %f
+Icon=xpdf
+Terminal=false
+Type=Application
+MimeType=application/pdf;
+Categories=Viewer;Graphics;
+Keywords=Viewer;Graphics;
diff --git a/graphics/xpdf3/pkg-plist b/graphics/xpdf3/pkg-plist
index 724f3f9360bc..bd82d3e29e51 100644
--- a/graphics/xpdf3/pkg-plist
+++ b/graphics/xpdf3/pkg-plist
@@ -9,6 +9,7 @@ libexec/xpdf/pdftops
libexec/xpdf/pdftotext
%%X11%%libexec/xpdf/xpdf
%%X11%%bin/xpdf
+%%X11%%%%DESKTOPDIR%%/xpdf.desktop
etc/man.d/xpdf.conf
%%DATADIR%%/man/man1/pdfdetach.1.gz
%%DATADIR%%/man/man1/pdffonts.1.gz
diff --git a/graphics/xpdf4/Makefile b/graphics/xpdf4/Makefile
index a95d08ce157c..958515498ea3 100644
--- a/graphics/xpdf4/Makefile
+++ b/graphics/xpdf4/Makefile
@@ -2,6 +2,7 @@
PORTNAME= xpdf
PORTVERSION= 4.00
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= graphics print
MASTER_SITES= https://xpdfreader-dl.s3.amazonaws.com/
@@ -45,10 +46,12 @@ 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,svg
+GUI_PLIST_SUB= DESKTOPDIR="${DESKTOPDIR}"
+GUI_USES= desktop-file-utils
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_DESC= Print support (CUPS dependency)
PRINT_LDFLAGS= -L${LOCALBASE}/lib
PRINT_LIB_DEPENDS= libcups.so:print/cups
@@ -60,4 +63,7 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
+post-install-GUI-on:
+ ${INSTALL_DATA} ${FILESDIR}/xpdf.desktop ${STAGEDIR}${DESKTOPDIR}
+
.include <bsd.port.mk>
diff --git a/graphics/xpdf4/files/xpdf.desktop b/graphics/xpdf4/files/xpdf.desktop
new file mode 100644
index 000000000000..ffac5a8a7d26
--- /dev/null
+++ b/graphics/xpdf4/files/xpdf.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=xpdf
+GenericName=PDF viewer
+Comment=Display PDF files
+Exec=xpdf %f
+Icon=xpdf
+Terminal=false
+Type=Application
+MimeType=application/pdf;
+Categories=Viewer;Graphics;
+Keywords=Viewer;Graphics;
diff --git a/graphics/xpdf4/pkg-plist b/graphics/xpdf4/pkg-plist
index 664c9f1b270e..e6cd3e15dd75 100644
--- a/graphics/xpdf4/pkg-plist
+++ b/graphics/xpdf4/pkg-plist
@@ -9,6 +9,7 @@ libexec/xpdf/pdftops
libexec/xpdf/pdftotext
%%GUI%%libexec/xpdf/xpdf
%%GUI%%bin/xpdf
+%%GUI%%%%DESKTOPDIR%%/xpdf.desktop
etc/man.d/xpdf.conf
%%DATADIR%%/man/man1/pdfdetach.1.gz
%%DATADIR%%/man/man1/pdffonts.1.gz