Bug 251014 - Add default_version LIBRSVG2 to handle dependency on graphics/ligvrsvg2-rust and graphics/librsvg2
Summary: Add default_version LIBRSVG2 to handle dependency on graphics/ligvrsvg2-rust ...
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: Tobias C. Berner
URL:
Keywords:
: 251017 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-10 12:43 UTC by p5B2E9A8F
Modified: 2020-11-20 19:26 UTC (History)
5 users (show)

See Also:
antoine: exp-run+


Attachments
v1 (1.63 KB, patch)
2020-11-11 15:52 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description p5B2E9A8F 2020-11-10 12:43:45 UTC
I could lash out for a nice rant but I'm not going to do that.

As building rust is an *expensive* dependency and therefore is _not_ a preferred dependency for people looking to keep things small and minimalisic, 
please make graphics/librsvg2 a port option choice 
as there might be not few people that have no problems with it.
Comment 1 Roman Bogorodskiy freebsd_committer 2020-11-10 13:02:59 UTC
The openbox port doesn't look like a right place to control which implementation of librsvg2 is used, as it's just using GNOME=librsvg2, which, apparently, as of recently started depend on librsvg2-rust:

https://reviews.freebsd.org/D18878#change-mdWSt6VPApKC

I think if we want to give a user control which implementation to use, it's better to do somewhere in Mk/Uses/gnome.mk instead of modifying individual ports using USE_GNOME=librsvg2.
Comment 2 Tobias C. Berner freebsd_committer 2020-11-10 20:51:57 UTC
Moin moin 

The proper way would be to switch it via bsd.default_version.mk
LIBRSVG_DEFAULT?= rust

 and then do something like 

.if empty(ARCH:Naarch64:Narmv6:Narmv7:Namd64:Ni386:Npowerpc64:Npowerpc64le) && ${LIBRSVG_DEFAULT:Mrust}

in gnome.mk


mfg Tobias
Comment 3 Tobias C. Berner freebsd_committer 2020-11-10 21:08:36 UTC
*** Bug 251017 has been marked as a duplicate of this bug. ***
Comment 4 Tobias C. Berner freebsd_committer 2020-11-11 15:52:59 UTC
Created attachment 219560 [details]
v1

Moin moin

Could you give this one a go?

Add 
DEFAULT_VERSIONS+=librsvg2=legacy
to your make.conf to test.


mfg Tobias
Comment 5 Alexey Dokuchaev freebsd_committer 2020-11-12 02:18:50 UTC
(In reply to p5B2E9A8F from comment #0)
> please make graphics/librsvg2 a port option choice
Technically it is optional in Openbox, albeit enabled by default.  The problem is more serious for ports where librsvg2 is not an optional dependency, and thus cannot be easily turned off.

With this patch and DEFAULT_VERSIONS+=librsvg2=legacy, I can finally build Openbox again with default options, thank you Tobias.  Prior to this change it was impossible because apparently this Lenovo L470 laptop of mine with 8GB RAM is not potent enough.

> I could lash out for a nice rant but I'm not going to do that.
I'll just say that may it be an example of why one should *not* try to rewrite popular open-source C library (which can be compiled even on, I don't know, TI-85?) in a "better" tongue that requires 100500 GB of RAM just to build itself, not to mention it being self-hosted and thus requiring bootstrap on every architecture.  This could be tolerable for leaf ports, but really horrible for maintaining reusable open-source components serving as dependencies for vast variety of software.
Comment 6 Tobias C. Berner freebsd_committer 2020-11-12 06:19:42 UTC
Moin moin 

@antoine
bsd.defaults_versions.mk ask's for an exp-run of the change. 



mfg Tobias
Comment 7 Antoine Brodin freebsd_committer 2020-11-20 07:34:30 UTC
exp-run looks fine
Comment 8 commit-hook freebsd_committer 2020-11-20 19:02:55 UTC
A commit references this bug:

Author: tcberner
Date: Fri Nov 20 19:02:43 UTC 2020
New revision: 555776
URL: https://svnweb.freebsd.org/changeset/ports/555776

Log:
  Add new default-version variant for librsvg2

    New default version for librsvg2.

    Current versions of graphics/librsvg2 are using parts written in rust.
    For architectures that do not have support for rust, and for people
    who prefer not to have, or are not able to compile rust software due
    to hardware limitations, the version can be chosen via this new flag.

    The default on almost all architectures is rust.

    If you prefer no to use rust, add the following to your make.conf:

          DEFAULT_VERSIONS+=librsvg2=legacy

  This makes the change committed in r554733 a bit more flexible for people
  who are opposed to oxidation.

  PR:		251014
  Exp-run by:	antoine

Changes:
  head/CHANGES
  head/Mk/Uses/gnome.mk
  head/Mk/bsd.default-versions.mk
Comment 9 Tobias C. Berner freebsd_committer 2020-11-20 19:26:36 UTC
Thanks for the exp-run.

Committed.