Created attachment 240150 [details] Patch Hi, I'm making a port of a desktop wallpaper application called damask[1], which requires gtk4 backend of libportal. So I would like to enable gtk4 backend as well as qt and gtk3. [1] https://gitlab.gnome.org/subpop/damask
Ohayo Tagato-san, thanks for your patch! May I ask you to try flavorizing this port or maybe splitting it into several slave ports? If you don't want to do it, I'm fine with this patch as it is and you may push it.
Created attachment 240231 [details] Patch (v2) (In reply to Gleb Popov from comment #1) Hi Gleb, Thanks for the suggestion. I have splitted the port into 1 master and 3 slave ports, namely: - libportal: common non-GUI part - libportal-gtk3: gtk3 backend - libportal-gtk4: gtk4 backend - libportal-qt5: qt5 backend Additionally, corrected license and made dependency adjustments for comsumer ports. If you are comfortable with the change, I'd like to push it. Thanks!
This looks really good, just a little comment: You can define USE_GNOME and USES with += in the master port. This will allow you to put, for example, USE_GNOME=gtk40 knob into the slave Makefile and get rid of .if defined(BACKEND) block altogether. I'd also change RUN_DEPENDS=libportal to LIB_DEPENDS, this is probably more correct?
Created attachment 240254 [details] Patch (v3) (In reply to Gleb Popov from comment #3) Thank you for the valuable comments! I put backend-specific USES/USE_GNOME/USE_QT knobs to each slave port's Makefile. I think .if defined(BACKEND) block in the master port should remain here since they are common to all backends.
(In reply to Hiroki Tagato from comment #4) > I think .if defined(BACKEND) block in the master port should remain here since they are common to all backends. Yes, you're right. This is looking great, thanks for working on this!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=03396f7bbf82a31317c72b5051d5db6422b04567 commit 03396f7bbf82a31317c72b5051d5db6422b04567 Author: Hiroki Tagato <tagattie@FreeBSD.org> AuthorDate: 2023-02-19 11:03:56 +0000 Commit: Hiroki Tagato <tagattie@FreeBSD.org> CommitDate: 2023-02-19 11:11:44 +0000 deskutils/libportal: split into slave ports corresponding to GUI backend The port has been splitted into 1 master and 3 slave ports for those who want only a subset of the supported backends and don't want excessive dependency, namely: - deskutils/libportal: common non-GUI part (master port) - deskutils/libportal-gtk3: gtk3 backend - deskutils/libportal-gtk4: gtk4 backend - deskutils/libportal-qt5: qt5 backend While here, correct license and make dependency adjustments of consumer ports. PR: 269546 Reviewed by: arrowd Approved by: arrowd (maintainer) deskutils/Makefile | 3 +++ deskutils/libportal-gtk3/Makefile (new) | 10 ++++++++++ deskutils/libportal-gtk4/Makefile (new) | 10 ++++++++++ deskutils/libportal-qt5/Makefile (new) | 11 +++++++++++ deskutils/libportal/Makefile | 25 +++++++++++++++++-------- deskutils/libportal/pkg-plist | 14 -------------- deskutils/libportal/pkg-plist.gtk3 (new) | 9 +++++++++ deskutils/libportal/pkg-plist.gtk4 (new) | 9 +++++++++ deskutils/libportal/pkg-plist.qt5 (new) | 5 +++++ devel/gnome-builder/Makefile | 3 ++- graphics/gcolor3/Makefile | 4 +++- x11-fm/nautilus/Makefile | 2 ++ 12 files changed, 81 insertions(+), 24 deletions(-)
Committed, thanks!