aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorrm <rm@FreeBSD.org>2015-09-28 05:01:38 +0800
committerrm <rm@FreeBSD.org>2015-09-28 05:01:38 +0800
commita9a99af5bdf600b1df5cbe22d0a277650f956217 (patch)
treeda896544e55217fcc1031f5f1ea68ddf83062656 /graphics
parentb15827fcceabf58f3f475b9ae2626148d550b33f (diff)
downloadfreebsd-ports-gnome-a9a99af5bdf600b1df5cbe22d0a277650f956217.tar.gz
freebsd-ports-gnome-a9a99af5bdf600b1df5cbe22d0a277650f956217.tar.zst
freebsd-ports-gnome-a9a99af5bdf600b1df5cbe22d0a277650f956217.zip
graphics/djview4: port improvements
There are some improvements for graphics/djview4 port to make it usable on desktop. For example, while there is a need to use register-djview-menu shell script (on post-install stage, which is not available currently) to setup the djview4 menu entries and icons, it is possible to install them manually, as described in ${WRKSRC}/desktopfiles/README file. Also this application is translated to different languages. - add LICENSE_FILE - add libtiff.so to LIB_DEPENDS as required shared library - add desktop-file-utils to USES and sort it - add linguist to USE_QT4, because there are available messages to translate - add --disable-desktopfiles option to CONFIGURE_ARGS, which do not install scripts to register icons and menus - replace CFLAGS and CXXFLAGS with CPPFLAGS for include directory - improve sed patch by using & for replacement part - strip web-plugin library, install icons and desktop files on post-install stage - remove unneeded files after --disable-desktopfiles option from pkg-plist - add translated files, icons and desktop files to pkg-plist PR: 196409 Submitted by: lightside <lightside@gmx.com>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/djview4/Makefile28
-rw-r--r--graphics/djview4/pkg-plist17
2 files changed, 30 insertions, 15 deletions
diff --git a/graphics/djview4/Makefile b/graphics/djview4/Makefile
index ebd6c2750f67..bce9b7fed167 100644
--- a/graphics/djview4/Makefile
+++ b/graphics/djview4/Makefile
@@ -3,7 +3,7 @@
PORTNAME= djview
PORTVERSION= 4.9
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= graphics
MASTER_SITES= SF/djvu/DjView/${PORTVERSION}
@@ -11,21 +11,23 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= Standalone Djvu viewer and plugin based on Qt4 toolkit
LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre
+LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre \
+ libtiff.so:${PORTSDIR}/graphics/tiff
GNU_CONFIGURE= yes
-USES= pkgconfig webplugin:native libtool
-USE_QT4= gui network rcc_build uic_build moc_build qmake_build
+USES= desktop-file-utils libtool pkgconfig webplugin:native
+USE_QT4= gui network linguisttools_build moc_build qmake_build rcc_build \
+ uic_build
USE_XORG= sm ice xt
QT_NONSTANDARD= yes
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \
- --x-libraries="${LOCALBASE}/lib"
+ --x-libraries="${LOCALBASE}/lib" --disable-desktopfiles
CONFIGURE_ENV= QMAKE="${QMAKE}" \
QMAKESPEC="${QMAKESPEC}"
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CFLAGS+= -I${LOCALBASE}/include
-CXXFLAGS+= -I${LOCALBASE}/include
MAKE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}"
WRKSRC= ${WRKDIR}/djview4-${PORTVERSION}
@@ -36,10 +38,20 @@ WEBPLUGIN_FILES= nsdejavu.so
post-patch:
@${REINPLACE_CMD} -e 's,/netscape/,/djview4/,' \
${WRKSRC}/nsdejavu/Makefile.in ${WRKSRC}/nsdejavu/nsdejavu.1.in
- @${REINPLACE_CMD} -e 's,@NSDEJAVU_LIBS@,@NSDEJAVU_LIBS@ -lXt -lXext,g' \
+ @${REINPLACE_CMD} -e 's,@NSDEJAVU_LIBS@,& -lXt -lXext,g' \
${WRKSRC}/nsdejavu/Makefile.in
post-install:
+.for f in ${WEBPLUGIN_FILES}
+ @${STRIP_CMD} ${STAGEDIR}${WEBPLUGIN_DIR}/${f}
+.endfor
+.for d in 32 64
+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${d}x${d}/apps
+ ${INSTALL_DATA} ${WRKSRC}/desktopfiles/hi${d}-djview4.png \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${d}x${d}/apps/djvulibre-djview4.png
+.endfor
+ ${INSTALL_DATA} ${WRKSRC}/desktopfiles/djvulibre-djview4.desktop \
+ ${STAGEDIR}${PREFIX}/share/applications
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/djview4/plugins/nsdejavu.so
.include <bsd.port.mk>
diff --git a/graphics/djview4/pkg-plist b/graphics/djview4/pkg-plist
index 3c08e466a64e..fba1810c46c0 100644
--- a/graphics/djview4/pkg-plist
+++ b/graphics/djview4/pkg-plist
@@ -4,10 +4,13 @@ lib/djview4/plugins/nsdejavu.so
man/man1/djview.1.gz
man/man1/djview4.1.gz
man/man1/nsdejavu.1.gz
-share/djvu/djview4/desktop/djvulibre-djview4.desktop
-share/djvu/djview4/desktop/hi-djview4.svgz
-share/djvu/djview4/desktop/hi32-djview4.png
-share/djvu/djview4/desktop/hi64-djview4.png
-share/djvu/djview4/desktop/prebuilt-hi32-djview4.png
-share/djvu/djview4/desktop/prebuilt-hi64-djview4.png
-share/djvu/djview4/desktop/register-djview-menu
+share/applications/djvulibre-djview4.desktop
+share/djvu/djview4/djview_cs.qm
+share/djvu/djview4/djview_de.qm
+share/djvu/djview4/djview_fr.qm
+share/djvu/djview4/djview_ru.qm
+share/djvu/djview4/djview_uk.qm
+share/djvu/djview4/djview_zh_cn.qm
+share/djvu/djview4/djview_zh_tw.qm
+share/icons/hicolor/32x32/apps/djvulibre-djview4.png
+share/icons/hicolor/64x64/apps/djvulibre-djview4.png