graphics/librsvg2: add options, remove libgsf dependency

This is a combination of patches from two PRs, from Andriy Voskoboinyk
and Andrew Romanenko, which have been languishing. Both added a DOCS
option, and Andrew makes Vala optional while Andriy removes an unneeded
dependency on libgsf and gettext.

Note that graphics/librsvg2 is the outdated version, used only on
platforms where the newer librsvg2-rust is not available.

PR:		243071 239346
Reported by:	Andrew Romanenkom, Andriy Voskoboinyk
This commit is contained in:
Adriaan de Groot 2021-12-06 20:31:56 +01:00
parent 1690fb2740
commit 154ff63388
3 changed files with 45 additions and 32 deletions

View file

@ -246,7 +246,7 @@ librsvg2_BUILD_DEPENDS= librsvg2>=0:graphics/librsvg2
librsvg2_LIB_DEPENDS= librsvg-2.so:graphics/librsvg2
librsvg2_RUN_DEPENDS= librsvg2>=0:graphics/librsvg2
.endif
librsvg2_USE_GNOME_IMPL=libgsf gdkpixbuf2 pango
librsvg2_USE_GNOME_IMPL=gdkpixbuf2 pango
nautilus3_LIB_DEPENDS= libnautilus-extension.so:x11-fm/nautilus
nautilus3_USE_GNOME_IMPL=gnomedesktop3 libxml2

View file

@ -2,6 +2,7 @@
PORTNAME= librsvg
PORTVERSION= 2.40.21
PORTREVISION= 1
CATEGORIES= graphics gnome
MASTER_SITES= GNOME
PKGNAMESUFFIX= 2
@ -13,26 +14,38 @@ COMMENT= Library for parsing and rendering SVG vector-graphic files
LICENSE= GPLv2 LGPL20
LICENSE_COMB= multi
CONFLICTS_INSTALL= librsvg2-rust
# librsvg2 2.42+ needs rust to build, which is not available on all
# FreeBSD archs. So limit pure C version 2.40.x.
PORTSCOUT= limit:^2\.40\.
BUILD_DEPENDS= valac:lang/vala
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig \
libpng.so:graphics/png \
libcroco-0.6.so:textproc/libcroco
USES= cpe gettext gmake gnome libtool localbase pathfix pkgconfig tar:xz
USE_GNOME= cairo gnomeprefix libgsf gdkpixbuf2 introspection:build \
USES= cpe gmake gnome libtool localbase pathfix pkgconfig tar:xz
CONFLICTS_INSTALL= librsvg2-rust
# librsvg2 2.42+ needs rust to build, which is not available on all
# FreeBSD archs. So limit pure C version 2.40.x.
PORTSCOUT= limit:^2\.40\.
OPTIONS_DEFINE= DOCS VAPI
OPTIONS_DEFAULT= DOCS VAPI
OPTIONS_SUB= yes
DOCS_CONFIGURE_ENABLE= grk-doc-html
VAPI_BUILD_DEPENDS= valac:lang/vala
VAPI_CONFIGURE_ON= --enable-vala=yes
VAPI_CONFIGURE_OFF= --enable-vala=no
USE_GNOME= cairo gnomeprefix gdkpixbuf2 introspection:build \
libxml2 pango
CPE_VENDOR= gnome
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
CONFIGURE_ARGS= --enable-vala \
--disable-Bsymbolic
CONFIGURE_ARGS= --disable-Bsymbolic
DOCSDIR?= ${PREFIX}/share/doc
GNOME_HTML_DIR= ${DOCSDIR}
PLIST_SUB+= PORTVERSION=${PORTVERSION}

View file

@ -12,28 +12,28 @@ lib/librsvg-2.so.2
lib/librsvg-2.so.%%PORTVERSION%%
libdata/pkgconfig/librsvg-2.0.pc
man/man1/rsvg-convert.1.gz
share/doc/rsvg-2.0/RsvgHandle.html
share/doc/rsvg-2.0/annotation-glossary.html
share/doc/rsvg-2.0/api-index-full.html
share/doc/rsvg-2.0/home.png
share/doc/rsvg-2.0/index.html
share/doc/rsvg-2.0/left-insensitive.png
share/doc/rsvg-2.0/left.png
share/doc/rsvg-2.0/licence.html
share/doc/rsvg-2.0/object-tree.html
share/doc/rsvg-2.0/right-insensitive.png
share/doc/rsvg-2.0/right.png
share/doc/rsvg-2.0/rsvg-2.0.devhelp2
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html
share/doc/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html
share/doc/rsvg-2.0/rsvg-Version-check-and-feature-tests.html
share/doc/rsvg-2.0/rsvg.html
share/doc/rsvg-2.0/style.css
share/doc/rsvg-2.0/up-insensitive.png
share/doc/rsvg-2.0/up.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/RsvgHandle.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/annotation-glossary.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/api-index-full.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/home.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/index.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/left-insensitive.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/left.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/licence.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/object-tree.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/right-insensitive.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/right.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg-2.0.devhelp2
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg-Using-RSVG-with-GIO.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg-Using-RSVG-with-GdkPixbuf.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg-Using-RSVG-with-cairo.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg-Version-check-and-feature-tests.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/rsvg.html
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/style.css
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/up-insensitive.png
%%PORTDOCS%%%%DOCSDIR%%/rsvg-2.0/up.png
share/gir-1.0/Rsvg-2.0.gir
share/thumbnailers/librsvg.thumbnailer
share/vala/vapi/librsvg-2.0.vapi
%%VAPI%%share/vala/vapi/librsvg-2.0.vapi
@postexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true
@postunexec %D/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && %D/bin/gdk-pixbuf-query-loaders > %D/lib/gdk-pixbuf-2.0/%%GTK2_VERSION%%/loaders.cache 2>/dev/null || /usr/bin/true