aboutsummaryrefslogtreecommitdiff
path: root/graphics/djview4
diff options
context:
space:
mode:
authorRuslan Makhmatkhanov <rm@FreeBSD.org>2015-11-06 17:11:34 +0000
committerRuslan Makhmatkhanov <rm@FreeBSD.org>2015-11-06 17:11:34 +0000
commit3ba99370f12bd8c308920ba8ea0162aa3610185e (patch)
tree22f8b059ae93fb1124cc9bc35e40e06dd664e19b /graphics/djview4
parent60b1cd50e988ad5bfc47b8b2a13cc1ddf8c9a52f (diff)
downloadports-3ba99370f12bd8c308920ba8ea0162aa3610185e.tar.gz
ports-3ba99370f12bd8c308920ba8ea0162aa3610185e.zip
Notes
Diffstat (limited to 'graphics/djview4')
-rw-r--r--graphics/djview4/Makefile58
-rw-r--r--graphics/djview4/distinfo4
-rw-r--r--graphics/djview4/files/patch-desktopfiles_Makefile.in34
-rw-r--r--graphics/djview4/pkg-descr2
-rw-r--r--graphics/djview4/pkg-plist7
5 files changed, 37 insertions, 68 deletions
diff --git a/graphics/djview4/Makefile b/graphics/djview4/Makefile
index 01adf0b5003f..f79983b738af 100644
--- a/graphics/djview4/Makefile
+++ b/graphics/djview4/Makefile
@@ -2,55 +2,57 @@
# $FreeBSD$
PORTNAME= djview
-PORTVERSION= 4.9
-PORTREVISION= 5
+PORTVERSION= 4.10.3
CATEGORIES= graphics
-MASTER_SITES= SF/djvu/DjView/${PORTVERSION}
+MASTER_SITES= SF/djvu/DjView/${PORTVERSION:R}
MAINTAINER= ports@FreeBSD.org
-COMMENT= Standalone Djvu viewer and plugin based on Qt4 toolkit
+COMMENT= Standalone Djvu viewer and plugin based on Qt toolkit
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+BUILD_DEPENDS= rsvg-convert:${PORTSDIR}/graphics/librsvg2
LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre \
libtiff.so:${PORTSDIR}/graphics/tiff
+INSTALL_TARGET= install-strip
GNU_CONFIGURE= yes
-USES= desktop-file-utils libtool pkgconfig webplugin:native
-USE_QT4= gui network linguisttools_build moc_build qmake_build rcc_build \
- uic_build
+USES= autoreconf desktop-file-utils gmake libtool pkgconfig \
+ webplugin:native
USE_XORG= sm ice xt
-QT_NONSTANDARD= yes
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \
- --x-libraries="${LOCALBASE}/lib" --disable-desktopfiles
-CONFIGURE_ENV= QMAKE="${QMAKE}" \
- QMAKESPEC="${QMAKESPEC}"
+ --x-libraries="${LOCALBASE}/lib"
+CONFIGURE_ENV= LRELEASE="${LRELEASE}" LUPDATE="${LUPDATE}"
+
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}"
-WRKSRC= ${WRKDIR}/djview4-${PORTVERSION}
-
WEBPLUGIN_DIR= ${PREFIX}/lib/djview4/plugins
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@,& -lXt -lXext,g' \
- ${WRKSRC}/nsdejavu/Makefile.in
+OPTIONS_SINGLE= QT
+OPTIONS_SINGLE_QT= QT4 QT5
+OPTIONS_DEFAULT= QT5
+
+QT4_USE= QT4=gui,network,opengl,linguisttools_build,moc_build,qmake_build,rcc_build,uic_build
+QT5_USE= QT5=gui,network,opengl,printsupport,widgets,buildtools_build,linguisttools_build,qmake_build
+
+post-patch: .SILENT
+# Change plugins directory
+# Add GLIB cflags and libs (including -lX*)
+ ${REINPLACE_CMD} -e '/^pluginsdir/s/mozilla/djview4/ ; \
+ /NSDEJAVU_CFLAGS/s|$$| $$\(GLIB_CFLAGS\)| ; \
+ /NSDEJAVU_LIBS/s|$$| $$\(GLIB_LIBS\) -lXt -lXext|' \
+ ${WRKSRC}/nsdejavu/Makefile.am
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
+# Changing file write permissions needed to strip a file installed as a script
+ ${CHMOD} +w ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${CHMOD} -w ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+# Create a symbolic link to match desktop file exec name
+ (cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${PORTNAME} ${PORTNAME}4)
.include <bsd.port.mk>
diff --git a/graphics/djview4/distinfo b/graphics/djview4/distinfo
index 6775292cc263..43d4606a0d19 100644
--- a/graphics/djview4/distinfo
+++ b/graphics/djview4/distinfo
@@ -1,2 +1,2 @@
-SHA256 (djview-4.9.tar.gz) = d150f557aaa073356d77c1f5e566a6a566281df5f92395b6822139f0e5c90e0c
-SIZE (djview-4.9.tar.gz) = 930676
+SHA256 (djview-4.10.3.tar.gz) = 50b80ecddc5aec03c49882c91b3af2f42abfe8454d5ddc01fb313e3481e6ab25
+SIZE (djview-4.10.3.tar.gz) = 1119618
diff --git a/graphics/djview4/files/patch-desktopfiles_Makefile.in b/graphics/djview4/files/patch-desktopfiles_Makefile.in
deleted file mode 100644
index 984cc13f2d4d..000000000000
--- a/graphics/djview4/files/patch-desktopfiles_Makefile.in
+++ /dev/null
@@ -1,34 +0,0 @@
---- desktopfiles/Makefile.in.orig 2012-04-09 20:56:55.000000000 -0700
-+++ desktopfiles/Makefile.in 2012-04-21 20:39:20.000000000 -0700
-@@ -50,14 +50,14 @@
-
- hi32-djview4.png hi64-djview4.png: djview.svg
- s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \
-- ${RSVG} -w $${s} -h $${s} -o $@ $< \
-- || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \
-+ ${RSVG} -w $${s} -h $${s} -o $@ $> \
-+ || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $> $@ \
- || ${INKSCAPE} --without-gui --export-width=$${s} \
-- --export-height=$${s} --export-png=$@ $< \
-+ --export-height=$${s} --export-png=$@ $> \
- || cp ${srcdir}/prebuilt-$@ $@
-
- hi-djview4.svgz: djview.svg
-- gzip <$< >$@
-+ gzip <${.ALLSRC} >$@
-
- register-djview-menu: register-djview-menu.in
- sed < ${srcdir}/register-djview-menu.in > register-djview-menu \
-@@ -74,10 +74,10 @@
-
- install-djview-files: FORCE
- ${INSTALL} -d ${DESTDIR}${datadir_djview}
-- ${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview}
-+ ${INSTALL_SCRIPT} register-djview-menu ${DESTDIR}${datadir_djview}
- ${INSTALL_DATA} *djview4.png ${DESTDIR}${datadir_djview}
- ${INSTALL_DATA} *djview4.svgz ${DESTDIR}${datadir_djview}
-- ${INSTALL_PROGRAM} ${srcdir}/*djview4.desktop ${DESTDIR}${datadir_djview}
-+ ${INSTALL_DATA} ${srcdir}/*djview4.desktop ${DESTDIR}${datadir_djview}
- -@echo "Run ${datadir_djview}/register-djview-menu install"
- -@echo " to register the djview3 menu entries."
-
diff --git a/graphics/djview4/pkg-descr b/graphics/djview4/pkg-descr
index e497b118d8ac..c97ec0ef5ab2 100644
--- a/graphics/djview4/pkg-descr
+++ b/graphics/djview4/pkg-descr
@@ -1,4 +1,4 @@
-Standalone Djvu viewer and plugin based on the Qt4 toolkit. Uses djvulibre
+Standalone Djvu viewer and plugin based on the Qt toolkit. Uses djvulibre
for rendering.
WWW: http://djvu.sourceforge.net/
diff --git a/graphics/djview4/pkg-plist b/graphics/djview4/pkg-plist
index fba1810c46c0..a3292bada0ec 100644
--- a/graphics/djview4/pkg-plist
+++ b/graphics/djview4/pkg-plist
@@ -2,15 +2,16 @@ bin/djview
bin/djview4
lib/djview4/plugins/nsdejavu.so
man/man1/djview.1.gz
-man/man1/djview4.1.gz
man/man1/nsdejavu.1.gz
share/applications/djvulibre-djview4.desktop
share/djvu/djview4/djview_cs.qm
share/djvu/djview4/djview_de.qm
+share/djvu/djview4/djview_es.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
+share/icons/hicolor/32x32/mimetypes/djvulibre-djview4.png
+share/icons/hicolor/64x64/mimetypes/djvulibre-djview4.png
+share/icons/hicolor/scalable/mimetypes/djvulibre-djview4.svgz