graphics/djview4: update to 4.10.3

- Remove Qt version from COMMENT and pkg-descr file
- Add LICENSE_FILE
- Add build dependency from graphics/librsvg2 for icon generation
- Add libtiff.so to LIB_DEPENDS as required shared library
- Use install-strip for INSTALL_TARGET to strip files
- Add "autoreconf", "desktop-file-utils" and "gmake" to USES
- Remove QT_NONSTANDARD to use QT configure environment variables
- Add additional QT variables to CONFIGURE_ENV
- Allow to build with using Qt4 or Qt5 toolkit library through QT4 or QT5 port's options
- Adapt (sed) patches for new version
- Adapt pkg-plist file
- Add upstream patch to simplify "lrelease rule" [1]

[1] http://sourceforge.net/p/djvu/djview-git/ci/e664af/tree/src/Makefile.am?diff=975258

PR:		198088
Submitted by:	lightside <lightside@gmx.com>
This commit is contained in:
Ruslan Makhmatkhanov 2015-11-06 17:11:34 +00:00
parent 60b1cd50e9
commit 3ba99370f1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=400947
5 changed files with 37 additions and 68 deletions

View File

@ -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>

View File

@ -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

View File

@ -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."

View File

@ -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/

View File

@ -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