Bug 286205 - [patch] Unify (flavorize) net/geocode-glib with a shared -icons FLAVOR
Summary: [patch] Unify (flavorize) net/geocode-glib with a shared -icons FLAVOR
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-19 14:15 UTC by Harald Schmalzbauer
Modified: 2025-04-19 14:28 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
Unified port with three FLAVORs for net/geocode-glib (7.81 KB, patch)
2025-04-19 14:15 UTC, Harald Schmalzbauer
no flags Details | Diff
Unified port with three FLAVORs for net/geocode-glib (7.81 KB, patch)
2025-04-19 14:28 UTC, Harald Schmalzbauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Schmalzbauer 2025-04-19 14:15:54 UTC
Created attachment 259699 [details]
Unified port with three FLAVORs for net/geocode-glib

While minimizing dependency-variants, I found net/geocode-glib2 depends on net/geocode-glib, which implies having libsoup(-2.) and libsoup3 installed at the same time.
The reason is a somewhot unfortunate hack to solve a duplicate file install problem.

Please find attached a patch for a unified port of geocode-glib, which solves the problem that two legitimately parallel installed packages would need to installing files in the same place, by introducing FLAVORs.

Besides the obvious v1api and v2api FLAVORs, there's also a icons FLAVOR which both other FLAVORs depend on.
So you'll always have geocode-glib-icons as run time dependency, but only the libsoup version corresponding to the geocode-glib API version selected.
There's a strong default for version 2.
Package name for version 2 will be the same as previously, but version 1 package name will have the digit appended now (i.e. geocode-glib1, which in my opinion better indicates that geocode-glib-icons is API version independent).

Ports depending on libgeocode-glib-2.so will need to be adjusted to depend on net/geocode-glib instead of net/geocode-glib2.
Ports depending on libgeocode-glib.so will need to be adjusted to depend on net/geocode-glib@apiv1 instead of net/geocode-glib.

Example for net-im/telegram-desktop:
index d591a97d8319..cb4f8d052ac9 100644
--- a/net-im/telegram-desktop/Makefile
+++ b/net-im/telegram-desktop/Makefile
@@ -34,7 +34,7 @@ LIB_DEPENDS=  libabsl_base.so:devel/abseil \
                libdispatch.so:devel/libdispatch \
                libfmt.so:devel/libfmt \
                libgeoclue-2.so:net/geoclue \
-               libgeocode-glib-2.so:net/geocode-glib2 \
+               libgeocode-glib-2.so:net/geocode-glib \
                libhunspell-1.7.so:textproc/hunspell \
                liblz4.so:archivers/liblz4 \
                libopenh264.so:multimedia/openh264 \

The patch is just a proposal, doing its job locally - just briefly tested.
If it helps I could provide the diff to update dependet ports too, for now this is just for review.
Comment 1 Harald Schmalzbauer 2025-04-19 14:28:57 UTC
Created attachment 259700 [details]
Unified port with three FLAVORs for net/geocode-glib

Solve a dependency loop which previously slipped through