public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Florian Schmaus <flow@gentoo.org>
To: gentoo-dev@lists.gentoo.org, Eli Schwartz <eschwartz93@gmail.com>
Subject: Re: [gentoo-dev] [PATCH 1/5] gui-libs/gtk: add a "poison" macro support to disable X/wayland
Date: Mon, 24 Jun 2024 11:08:13 +0200	[thread overview]
Message-ID: <e5d2e2a3-e9bf-45f4-bae1-7cbd6996d68c@gentoo.org> (raw)
In-Reply-To: <20240623173646.3368935-2-eschwartz93@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 3729 bytes --]

On 23/06/2024 19.35, Eli Schwartz wrote:
> Many packages perform automagic dependencies on gdk's backend
> implementations by checking if the macro is defined and then using the
> code it unlocks, rather than having a buildsystem option such as
> -Dwayland=true.
> 
> It's unfeasible to patch every such package's source code to add
> configure options and respect them. Instead add a truly filthy hack and
> permit gtk itself to selectively show or hide the windowing system in
> use.
> 
> Bug: https://bugs.gentoo.org/624960
> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
> ---
>   ...-poison-macro-to-hide-GDK_WINDOWING_.patch | 25 ++++++++++---------
>   gui-libs/gtk/gtk-4.12.5-r1.ebuild             |  7 ++++++
>   ...-4.12.5-r1.ebuild => gtk-4.12.5-r2.ebuild} |  9 ++++++-
>   ...gtk-4.14.4.ebuild => gtk-4.14.3-r1.ebuild} |  7 ++++++
>   ...gtk-4.14.3.ebuild => gtk-4.14.4-r1.ebuild} |  7 ++++++
>   5 files changed, 42 insertions(+), 13 deletions(-)
>   copy {x11-libs/gtk+ => gui-libs/gtk}/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch (86%)
>   copy gui-libs/gtk/{gtk-4.12.5-r1.ebuild => gtk-4.12.5-r2.ebuild} (94%)
>   rename gui-libs/gtk/{gtk-4.14.4.ebuild => gtk-4.14.3-r1.ebuild} (96%)
>   rename gui-libs/gtk/{gtk-4.14.3.ebuild => gtk-4.14.4-r1.ebuild} (96%)
> 
> diff --git a/x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch b/gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
> similarity index 86%
> copy from x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
> copy to gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
> index 9bba12f8445b..4e078610f8cb 100644
> --- a/x11-libs/gtk+/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
> +++ b/gui-libs/gtk/files/0001-gdk-add-a-poison-macro-to-hide-GDK_WINDOWING_.patch
> @@ -1,4 +1,4 @@
> -From 25bdad805bb9e16032baf4480e9c1e432ddef49b Mon Sep 17 00:00:00 2001
> +From 0537043f72ea1a634b101efa9e11cc0a22baaf71 Mon Sep 17 00:00:00 2001
>   From: Eli Schwartz <eschwartz93@gmail.com>
>   Date: Wed, 19 Jun 2024 21:28:31 -0400
>   Subject: [PATCH] gdk: add a "poison" macro to hide GDK_WINDOWING_*
> @@ -34,10 +34,10 @@ Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
>    3 files changed, 15 insertions(+)
>   
>   diff --git a/gdk/gdkconfig.h.meson b/gdk/gdkconfig.h.meson
> -index 7db19e0470..6bee207e94 100644
> +index d5b48f3184..22baab52ae 100644
>   --- a/gdk/gdkconfig.h.meson
>   +++ b/gdk/gdkconfig.h.meson
> -@@ -10,9 +10,16 @@
> +@@ -10,10 +10,17 @@
>    G_BEGIN_DECLS
>    
>    
> @@ -46,21 +46,22 @@ index 7db19e0470..6bee207e94 100644
>   +#endif
>   +
>    #mesondefine GDK_WINDOWING_BROADWAY
> + #mesondefine GDK_WINDOWING_MACOS
>   +
>   +#ifndef GENTOO_GTK_HIDE_WAYLAND
>    #mesondefine GDK_WINDOWING_WAYLAND
>   +#endif
>   +
>    #mesondefine GDK_WINDOWING_WIN32
> - #mesondefine GDK_WINDOWING_QUARTZ
>    
> + #mesondefine GDK_RENDERING_CAIRO
>   diff --git a/gdk/wayland/gdkwayland.h b/gdk/wayland/gdkwayland.h
> -index 2b79295add..5f0e9cfa81 100644
> +index 846445910e..5d84619295 100644
>   --- a/gdk/wayland/gdkwayland.h
>   +++ b/gdk/wayland/gdkwayland.h
> -@@ -25,6 +25,10 @@
> - #ifndef __GDK_WAYLAND_H__
> - #define __GDK_WAYLAND_H__
> +@@ -24,6 +24,10 @@
> +
> + #pragma once
>    
>   +#ifdef GENTOO_GTK_HIDE_WAYLAND
>   +  #error "A Gentoo ebuild has hidden wayland and it cannot be used in this compilation unit. Please file a bug if you see this error."

Maybe this (and the other) should state where the bug is supposed to be 
filled, so that user's don't fill bugs at the wrong venue.

- Flow

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 18239 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

  reply	other threads:[~2024-06-24  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 17:35 [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayland,X], Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 1/5] gui-libs/gtk: add a "poison" macro support to disable X/wayland Eli Schwartz
2024-06-24  9:08   ` Florian Schmaus [this message]
2024-06-26  9:03   ` Sam James
2024-06-27  4:52     ` Eli Schwartz
2024-06-27  4:58       ` Sam James
2024-07-03 11:16         ` Mart Raudsepp
2024-07-03 17:26           ` Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 2/5] net-libs/gtk-vnc: prevent automagically building against gtk[X,wayland] Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 3/5] x11-libs/wxGTK: " Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 4/5] xfce-base/libxfce4ui: prevent automagically building against gtk[wayland] Eli Schwartz
2024-06-23 17:35 ` [gentoo-dev] [PATCH 5/5] dev-libs/libportal: prevent automagically building against gtk[X,wayland] Eli Schwartz
2024-06-23 18:33 ` [gentoo-dev] [PATCH 0/5] Fixing automagic dependencies on gtk[wayland,X], James Le Cuirot
2024-06-26  9:02 ` Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5d2e2a3-e9bf-45f4-bae1-7cbd6996d68c@gentoo.org \
    --to=flow@gentoo.org \
    --cc=eschwartz93@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox