Bug 269546 - deskutils/libportal: enable gtk4 backend
Summary: deskutils/libportal: enable gtk4 backend
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: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-14 10:42 UTC by Hiroki Tagato
Modified: 2023-02-19 11:15 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments
Patch (2.20 KB, patch)
2023-02-14 10:42 UTC, Hiroki Tagato
no flags Details | Diff
Patch (v2) (7.23 KB, patch)
2023-02-18 11:54 UTC, Hiroki Tagato
no flags Details | Diff
Patch (v3) (7.13 KB, patch)
2023-02-19 08:18 UTC, Hiroki Tagato
arrowd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroki Tagato freebsd_committer freebsd_triage 2023-02-14 10:42:20 UTC
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
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2023-02-15 17:42:43 UTC
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.
Comment 2 Hiroki Tagato freebsd_committer freebsd_triage 2023-02-18 11:54:53 UTC
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!
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2023-02-18 12:41:41 UTC
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?
Comment 4 Hiroki Tagato freebsd_committer freebsd_triage 2023-02-19 08:18:08 UTC
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.
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2023-02-19 10:40:25 UTC
(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!
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-02-19 11:12:46 UTC
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(-)
Comment 7 Hiroki Tagato freebsd_committer freebsd_triage 2023-02-19 11:15:12 UTC
Committed, thanks!