maintainer-feedback requested: [Bug 286066] graphics/librsvg2-rust: wrong LIB_DEPENDS, missing OPTIONS

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 12 Apr 2025 19:37:57 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-desktop (Team)
<desktop@FreeBSD.org> for maintainer-feedback:
Bug 286066: graphics/librsvg2-rust: wrong LIB_DEPENDS, missing OPTIONS
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286066



--- Description ---
Some dependencies listed in LIB_DEPENDS appear to be superfluous.

$ pkg info -d -F librsvg2-rust-2.60.0.pkg yields:
librsvg2-rust-2.60.0:
	cairo-1.18.2,3
	dav1d-1.5.1
	fontconfig-2.15.0_3,1
	freetype2-2.13.3
	gdk-pixbuf2-2.42.12_1
	gettext-runtime-0.23.1
	glib-2.82.4_1,2
	harfbuzz-10.3.0
	libxml2-2.11.9
	pango-1.56.1
	png-1.6.47

# pkg info -B -F librsvg2-rust-2.60.0.pkg shows (system libraries removed):
librsvg2-rust-2.60.0:
	libcairo.so.2
	libgio-2.0.so.0
	libxml2.so.2
	libpangocairo-1.0.so.0
	libpango-1.0.so.0
	libgobject-2.0.so.0
	libglib-2.0.so.0
	libdav1d.so.7
	libgdk_pixbuf-2.0.so.0

According to the listed shared libraries the following dependencies are not
required:
- fontconfig
- freetype2
- gettext-runtime
- harfbuzz
- png

fontconfig is not mentioned in librsvg2-rust/meson.build, harfbuzz and
freetype2 are listed in private_dependencies there. The FreeBSD port inherits
harfbuzz and gettext-runtime dependencies via Uses/gnome.mk (pango and glib20).

Additionally prior to 2.60, the package exposed its pixbuf loader:
$ pkg info -b librsvg2-rust
librsvg2-rust-2.58.5:
	librsvg-2.so.2
	libpixbufloader-svg.so

$ pkg info -b -F librsvg2-rust-2.60.0.pkg
librsvg2-rust-2.60.0:
	librsvg-2.so.2

A locally created package with pkg 1.21.3 gives the same output for
librsvg2-rust 2.60.0 omitting the loader.

Then there is a compatibility issue when generating the man page. The rst2man
invocation requires textproc/py-docutils >= 0.20 since it uses --output= to
specify the destination file. The docutils documentation suggests using
redirection as an alternative which works fine for older versions as well.

The port unconditionally enables vala and now dav1d. These should be OPTIONS
enabled by default. That way a user could disable them with the ports
framework.