graphics/djvulibre: some fixes for the icons

- Remove graphics/librsvg2 from build dependency
- Add DESKTOPFILES option for installation of icons and mime types
- Use prebuilt icons instead of conversion tool to generate them
- Adapt pkg-plist

PR:		198087
Submitted by:	lightside@gmx.com
This commit is contained in:
Kurt Jaeger 2016-06-14 17:41:06 +00:00
parent a3b664ce3e
commit ff3522902b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416902
2 changed files with 26 additions and 17 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= djvulibre
PORTVERSION= 3.5.27
PORTREVISION= 1
CATEGORIES= graphics www
MASTER_SITES= SF/djvu/DjVuLibre/${PORTVERSION}
@ -12,7 +13,6 @@ COMMENT= DjVu base libraries and utilities
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= rsvg-convert:graphics/librsvg2
LIB_DEPENDS= libtiff.so:graphics/tiff
INSTALL_TARGET= install-strip
@ -23,19 +23,23 @@ CONFIGURE_ENV= JPEG_CFLAGS="-I${LOCALBASE}/include" \
TIFF_CFLAGS="-I${LOCALBASE}/include" \
TIFF_LIBS="-L${LOCALBASE}/lib -ltiff"
LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB}
USES= cpe gmake iconv jpeg libtool shared-mime-info
USES= cpe gmake iconv jpeg libtool
CPE_VENDOR= djvulibre_project
USE_LDCONFIG= yes
INSTALLS_ICONS= yes
CONFLICTS= djvulibre-nox11-3*
PORTDOCS= *.djvu *.pdf *.txt
OPTIONS_DEFINE= DOCS ANY2DJVU
OPTIONS_DEFINE= DESKTOPFILES DOCS ANY2DJVU
OPTIONS_DEFAULT= DESKTOPFILES
OPTIONS_SUB= yes
ANY2DJVU_DESC= Install any2djvu script (requires curl)
ANY2DJVU_RUN_DEPENDS= curl:ftp/curl
DESKTOPFILES_DESC= Install icons and mime types
DESKTOPFILES_CONFIGURE_ENABLE= desktopfiles
DESKTOPFILES_USES= shared-mime-info
DESKTOPFILES_VARS= INSTALLS_ICONS=yes
post-patch:
# Remove custom optimization compiler flags
@ -52,6 +56,11 @@ post-patch-ANY2DJVU-off:
@${REINPLACE_CMD} -e 's/any2djvu // ; s/any2djvu\.1 //' \
${WRKSRC}/tools/Makefile.in
post-patch-DESKTOPFILES-on:
# Use prebuilt icons, without using conversion tool
@${SED} -i.c.bak -e 's/conversion_tool=[[:alpha:]]*/conversion_tool=no/' \
${WRKSRC}/configure
post-install-DOCS-on:
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR})

View file

@ -60,16 +60,16 @@ share/djvu/osi/zh/messages.xml
share/djvu/pubtext/DjVuMessages.dtd
share/djvu/pubtext/DjVuOCR.dtd
share/djvu/pubtext/DjVuXML-s.dtd
share/icons/hicolor/16x16/mimetypes/djvu.png
share/icons/hicolor/20x20/mimetypes/djvu.png
share/icons/hicolor/22x22/mimetypes/djvu.png
share/icons/hicolor/24x24/mimetypes/djvu.png
share/icons/hicolor/32x32/mimetypes/djvu.png
share/icons/hicolor/48x48/mimetypes/djvu.png
share/icons/hicolor/64x64/mimetypes/djvu.png
share/icons/hicolor/72x72/mimetypes/djvu.png
share/icons/hicolor/96x96/mimetypes/djvu.png
share/icons/hicolor/128x128/mimetypes/djvu.png
share/icons/hicolor/256x256/mimetypes/djvu.png
share/icons/hicolor/scalable/mimetypes/djvu.svgz
share/mime/packages/djvulibre-mime.xml
%%DESKTOPFILES%%share/icons/hicolor/16x16/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/20x20/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/22x22/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/24x24/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/32x32/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/48x48/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/64x64/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/72x72/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/96x96/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/128x128/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/256x256/mimetypes/djvu.png
%%DESKTOPFILES%%share/icons/hicolor/scalable/mimetypes/djvu.svgz
%%DESKTOPFILES%%share/mime/packages/djvulibre-mime.xml