Bug 284977 - graphics/librsvg2-rust: Update to 2.60.0
Summary: graphics/librsvg2-rust: Update to 2.60.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Daniel Engberg
URL: https://gitlab.gnome.org/GNOME/librsv...
Keywords:
Depends on:
Blocks: 279705
  Show dependency treegraph
 
Reported: 2025-02-23 08:38 UTC by Daniel Engberg
Modified: 2025-04-01 05:04 UTC (History)
5 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments
Patch for librsvg2-rust (87.96 KB, patch)
2025-02-23 08:38 UTC, Daniel Engberg
no flags Details | Diff
Patch for librsvg2-rust v2 (88.02 KB, patch)
2025-02-25 20:07 UTC, Daniel Engberg
no flags Details | Diff
Patch for librsvg2-rust v2 (97.05 KB, patch)
2025-03-29 17:50 UTC, Daniel Engberg
no flags Details | Diff
Patch for librsvg2-rust v3 (97.76 KB, patch)
2025-03-29 18:34 UTC, Daniel Engberg
no flags Details | Diff
Patch for librsvg2-rust v4 (97.62 KB, patch)
2025-03-30 13:18 UTC, Daniel Engberg
fluffy: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2025-02-23 08:38:06 UTC
Created attachment 257761 [details]
Patch for librsvg2-rust

* Upstream switched to Meson

One test (Rust) fails to build, help would be appreciated

Poudriere testport OK 13.4-RELEASE (amd64)
Poudriere testport OK 13.4-RELEASE (i386)
Poudriere testport OK 14.2-RELEASE (amd64)

"Mini exp-run" looks fine overall with listed library dependencies from freshports.org consumers in Poudriere on 13.4-RELEASE and 14.2-RELEASE (amd64)

games/gnome-robots, x11-clocks/cairo-clock, deskutils/cairo-dock needs LDFLAGS+= -lm

graphics/gimp-app fails,
Vector icons: no (librsvg GdkPixbuf loader missing)
https://gitlab.gnome.org/GNOME/librsvg/-/issues/1075
Not sure how to fix this

x11/tilix fails during linking, having a quick look at it I can't figure out why
ld: error: undefined symbol: _D4core8internal5array8equality__T8__equalsTxDFC2gx5tilix7session7SessionZvTxQBgZQBvFNaNbNiNfMAxQBzMQgZb
>>> referenced by appwindow.d
>>>               tilix.p/source_gx_tilix_appwindow.d.o:(_D2gx5tilix6common__T12GenericEventTCQBjQBj7session7SessionZQBn11__xopEqualsMxFKxSQDcQDcQCz__TQCvTQCkZQDdZb)
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2025-02-25 14:05:55 UTC
(In reply to Daniel Engberg from comment #0)
What tests are failing? is it test pdf_has_text and pdf_has_link_inside_text?
If yes, can you install x11-fonts/urw-base35-fonts and retest?
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2025-02-25 18:45:26 UTC
It's during compilation
https://projects.pyret.net/files/freebsd-patches/librsvg2-rust-test-fail.txt
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2025-02-25 19:26:18 UTC
(In reply to Daniel Engberg from comment #2)
There are more info in /usr/ports/graphics/librsvg2-rust/work/librsvg-2.59.2/_build/meson-logs/testlog.txt
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2025-02-25 20:07:32 UTC
Created attachment 257939 [details]
Patch for librsvg2-rust v2

Fix unit tests
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2025-02-25 20:07:47 UTC
(In reply to Mikael Urankar from comment #3)
That fixed it, thanks!
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2025-02-26 08:17:17 UTC
for x11/tilix, I don't know why but if you remove gmodule-2.0 >=  2.50.0 in /usr/local/libdata/pkgconfig/librsvg-2.0.pc the error goes away.
Or, if you keep gmodule in librsvg.pc and remove Libs: -Wl,--export-dynamic in gmodule-2.0.pc it builds fine.
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2025-02-27 11:04:41 UTC
(In reply to Daniel Engberg from comment #0)

graphics/gimp-app fails,
Vector icons: no (librsvg GdkPixbuf loader missing)
there is no libpixbufloader-svg.so with newer librsvg

from librsvg-2.59.2/NEWS:
One detail that I forgot to document in the last version: with the new
Meson build system, the filename of the gdk-pixbuf loader module is
libpixbufloader_svg.so, with an underscore, which is different from
libpixbufloader-svg.so from the Autotools, which uses a hyphen.  This
filename is never actually used by people, and
gdk-pixbuf-query-loaders will automatically detect it at installation
time.  Packaging scripts may need to be changed to use this filename.

so: 
sed -i "" "s/libpixbufloader-svg.so/libpixbufloader_svg.so/g" work/gimp-2.10.38/configure
will fix it (or rename libpixbufloader_svg.so in librsvg)
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2025-02-27 11:56:24 UTC
I don't know what to do for tilix, maybe something like this:
+post-configure:
+       ${REINPLACE_CMD} 's#-L=--export-dynamic##g' \
+               ${WRKSRC}/_build/build.ninja
+
Comment 9 Charlie Li freebsd_committer freebsd_triage 2025-02-28 02:48:17 UTC
(In reply to Mikael Urankar from comment #7)
I'm going to runtime test this (gimp) further. Reading further it seems like the graphics/gdk-pixbuf2 trigger isn't triggering as intended with the rename so investigating there too.
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2025-03-29 17:50:55 UTC
Created attachment 259153 [details]
Patch for librsvg2-rust v2
Comment 11 Daniel Engberg freebsd_committer freebsd_triage 2025-03-29 17:52:17 UTC
doctest in tests fails

I haven't been able to figure out why having a quick look at it
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2025-03-29 18:34:20 UTC
Created attachment 259154 [details]
Patch for librsvg2-rust v3

Fix detection for version script / symbols
Comment 13 Mikael Urankar freebsd_committer freebsd_triage 2025-03-29 18:39:54 UTC
(In reply to Daniel Engberg from comment #11)
do you have a log?
Comment 14 Daniel Engberg freebsd_committer freebsd_triage 2025-03-29 20:45:54 UTC
(In reply to Mikael Urankar from comment #13)
Sure, https://projects.pyret.net/files/public/freebsd/failures/librsvg2-log.txt
Comment 15 Mikael Urankar freebsd_committer freebsd_triage 2025-03-30 10:25:38 UTC
(In reply to Daniel Engberg from comment #14)
do you have rustdoc (lang/rust DOCS on) installed?
Comment 16 Daniel Engberg freebsd_committer freebsd_triage 2025-03-30 13:18:25 UTC
Created attachment 259186 [details]
Patch for librsvg2-rust v4

Remove unnecessary post-install section
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2025-03-30 13:18:52 UTC
(In reply to Mikael Urankar from comment #15)
You're correct, DOCS needs to be enabled for all tests to pass
Comment 18 commit-hook freebsd_committer freebsd_triage 2025-03-30 18:12:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b3464f30b7552590003efe5d41255c29ff6785fa

commit b3464f30b7552590003efe5d41255c29ff6785fa
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-03-30 18:10:15 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-03-30 18:11:20 +0000

    x11-clocks/cairo-clock: Fix build with newer versions of librsvg2-rust

    Add -lm to LDFLAGS

    PR:             284977
    Approved by:    portmgr (blanket)

 x11-clocks/cairo-clock/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 19 commit-hook freebsd_committer freebsd_triage 2025-03-30 18:12:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d32c11d8fce6b8b2a9bbccd1d72c670e9a307c2a

commit d32c11d8fce6b8b2a9bbccd1d72c670e9a307c2a
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-03-30 18:06:08 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-03-30 18:11:20 +0000

    deskutils/cairo-dock: Fix build with newer versions of librsvg2-rust

    Add -lm to LDFLAGS

    PR:             284977
    Approved by:    portmgr (blanket)

 deskutils/cairo-dock/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 20 commit-hook freebsd_committer freebsd_triage 2025-03-30 18:12:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5acdade6e6f756109fc74f22e7ec329c6191f95a

commit 5acdade6e6f756109fc74f22e7ec329c6191f95a
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-03-30 18:09:03 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-03-30 18:11:20 +0000

    games/gnome-robots: Fix build with newer versions of librsvg2-rust

    Add -lm to LDFLAGS

    PR:             284977
    Approved by:    portmgr (blanket)

 games/gnome-robots/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 21 Daniel Engberg freebsd_committer freebsd_triage 2025-03-30 19:42:51 UTC
x11/tilix builds with 2.60.0 (14.2-RELEASE, amd64)
Comment 22 Dima Panov freebsd_committer freebsd_triage 2025-03-31 19:51:46 UTC
Comment on attachment 259186 [details]
Patch for librsvg2-rust v4

LGTM

Dima, on behalf of desktop@
Comment 23 commit-hook freebsd_committer freebsd_triage 2025-03-31 20:08:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=77c505ee59c85f183d9db1d7cf293dfa0bfcd0e9

commit 77c505ee59c85f183d9db1d7cf293dfa0bfcd0e9
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2025-03-31 19:54:57 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-03-31 20:07:52 +0000

    graphics/librsvg2-rust: Update to 2.60.0

    * Upstream switched to Meson

    Changelog: https://gitlab.gnome.org/GNOME/librsvg/-/releases/2.60.0

    Thanks to mikael@ and fluffy@ for testing and suggesting fixes
    including for consumers

    PR:             284977
    Tested by:      fluffy
    Approved by:    desktop (vishwin (previous version), fluffy)

 graphics/librsvg2-rust/Makefile                    |  37 +-
 graphics/librsvg2-rust/Makefile.crates             | 398 +++++-----
 graphics/librsvg2-rust/distinfo                    | 802 +++++++++++----------
 .../files/patch-meson_cargo__wrapper.py (new)      |  12 +
 .../files/patch-rsvg_meson.build (new)             |  11 +
 graphics/librsvg2-rust/pkg-plist                   |  14 +-
 6 files changed, 702 insertions(+), 572 deletions(-)
Comment 24 commit-hook freebsd_committer freebsd_triage 2025-03-31 20:08:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cb870666d86e74d2124f6ebdb12e26c23ec32dd7

commit cb870666d86e74d2124f6ebdb12e26c23ec32dd7
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2025-03-31 20:01:18 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2025-03-31 20:07:52 +0000

    graphics/gimp-app: Fix build with librsvg2-rust 2.58.90+

    Fix suggested by mikael@ and adapted by fluffy@

    Reference:
    https://gitlab.gnome.org/GNOME/librsvg/-/blob/2.58.91/NEWS?ref_type=tags

    Patch sent privately via Matrix

    PR:             284977
    Tested by:      fluffy
    Approved by:    portmgr (blanket, build fix)

 graphics/gimp-app/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 25 Daniel Engberg freebsd_committer freebsd_triage 2025-03-31 20:09:20 UTC
Thanks for help!
Comment 26 Vladimir Druzenko freebsd_committer freebsd_triage 2025-03-31 23:38:36 UTC
Fails if DOCS=off:
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: share/man/man1/rsvg-convert.1.gz
===> Error: Plist issues found.
*** Error code 1
Comment 27 Vladimir Druzenko freebsd_committer freebsd_triage 2025-04-01 00:22:57 UTC
pkg-plist:
-share/man/man1/rsvg-convert.1.gz
+%%PORTDOCS%%share/man/man1/rsvg-convert.1.gz
Comment 28 Daniel Engberg freebsd_committer freebsd_triage 2025-04-01 05:04:33 UTC
(In reply to Vladimir Druzenko from comment #27)
Fixed in https://cgit.freebsd.org/ports/commit/?id=11a5a9d072a950f3ca6cfc0bfa5a34e8dc897dd8

Upstream changed how this was handled between previous version 2.59.2 and current which I didn't catch.