all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: muradm <mail@muradm.net>
To: 50627@debbugs.gnu.org
Subject: [bug#50627] [PATCH v1] gnu: gtk: Move wayland-protocols to inputs.
Date: Fri, 17 Sep 2021 17:11:08 +0300	[thread overview]
Message-ID: <20210917141108.801-1-mail@muradm.net> (raw)
In-Reply-To: <20210916192331.29606-1-mail@muradm.net>

I was building some packages on Guix. I figured out that
wayland-protocols was listed among propagated-inputs for gtk+ package.

wayland-protocols is not runtime dependency, so I moved it to
inputs of gtk+ package, once moved, building of other applications
that depening on gtk+ started to fail.

Investigation showed that, all .pc (pkg-config) files prepared by gtk+
package, was including:

Requires.private: ... wayland-protocols ...

Since it becomes requirement, other applications was failing with
missing dependency wayland-protocols of dependency gtk+, for instance:

-- Checking for module 'gtk+-3.0'
--   Package 'wayland-protocols', required by 'gdk-3.0', not found

While actually wayland-protocols is not even a build time dependency
of application that depends on gtk+. Advertisement of such
requirement, is a bit misleading, because one does not need it at
runtime, especially applications based on gtk.

Same change also merged upstream for both master and gtk-3-24 branch.

* gnu/packages/patches/gtk3-wayland-protocols-dependency.patch:
Upstream change
* gnu/packages/gtk.scm (gtk+): move wayland-protocols to inputs
---
 gnu/packages/gtk.scm                          |  9 ++++----
 .../gtk3-wayland-protocols-dependency.patch   | 23 +++++++++++++++++++
 2 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 gnu/packages/patches/gtk3-wayland-protocols-dependency.patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 24c24d5653..f164005416 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -948,7 +948,8 @@ application suites.")
         (base32
          "1a9vg840fjq1mmm403b67k624qrkxh9shaz9pv7z9l8a6bzvyxds"))
        (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch"
-                                "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"))))
+                                "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch"
+                                "gtk3-wayland-protocols-dependency.patch"))))
     (propagated-inputs
      `(("atk" ,atk)
        ("at-spi2-atk" ,at-spi2-atk)
@@ -978,8 +979,7 @@ application suites.")
        ("libxrender" ,libxrender)
        ("mesa" ,mesa)
        ("pango" ,pango)
-       ("wayland" ,wayland)
-       ("wayland-protocols" ,wayland-protocols)))
+       ("wayland" ,wayland)))
     (inputs
      `(("colord" ,colord)
        ("cups" ,cups)
@@ -988,7 +988,8 @@ application suites.")
        ("iso-codes" ,iso-codes)
        ("json-glib" ,json-glib)
        ("libxml2" ,libxml2)
-       ("rest" ,rest)))
+       ("rest" ,rest)
+       ("wayland-protocols" ,wayland-protocols)))
     (native-inputs
      `(("docbook-xml" ,docbook-xml-4.1.2)
        ("gettext" ,gettext-minimal)
diff --git a/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
new file mode 100644
index 0000000000..03196713bc
--- /dev/null
+++ b/gnu/packages/patches/gtk3-wayland-protocols-dependency.patch
@@ -0,0 +1,23 @@
+diff --git a/configure b/configure
+index edd41ad..cb36877 100755
+--- a/configure
++++ b/configure
+@@ -23247,7 +23247,8 @@ $as_echo "no" >&6; }
+ 	fi
+ fi
+ 
+-WAYLAND_DEPENDENCIES="wayland-client >= 1.14.91 wayland-protocols >= 1.17 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_RUNTIME_DEPENDENCIES="wayland-client >= 1.14.91 xkbcommon >= 0.2.0 wayland-cursor >= 1.14.91 wayland-egl"
++WAYLAND_DEPENDENCIES="wayland-protocols >= 1.17 $WAYLAND_RUNTIME_DEPENDENCIES"
+ if test "$enable_wayland_backend" = "maybe" ; then
+   # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+@@ -23320,7 +23321,7 @@ if test "$enable_wayland_backend" = "yes"; then
+   GDK_WINDOWING="$GDK_WINDOWING
+ #define GDK_WINDOWING_WAYLAND"
+   backend_immodules="$backend_immodules,wayland"
+-  WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
++  WAYLAND_PACKAGES="$WAYLAND_RUNTIME_DEPENDENCIES"
+   # Extract the first word of "wayland-scanner", so it can be a program name with args.
+ set dummy wayland-scanner; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-- 
2.33.0





  parent reply	other threads:[~2021-09-17 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 19:23 [bug#50627] [PATCH 0/2] Make wayland-protocols dependency native-input muradm
2021-09-16 19:26 ` [bug#50627] [PATCH 1/2] gnu: gtk: Move wayland-protocols to native-inputs muradm
2021-09-16 19:26   ` [bug#50627] [PATCH 2/2] gnu: Fix wayland-protocols dependency to be in native-inputs muradm
2021-09-16 19:57 ` [bug#50627] [PATCH 0/2] Make wayland-protocols dependency native-input Liliana Marie Prikler
2021-09-17  2:35   ` muradm
2021-09-17  7:46     ` Liliana Marie Prikler
2021-09-17  8:20       ` muradm
2021-09-17 13:01         ` Liliana Marie Prikler
2021-09-17 14:11           ` muradm
2021-09-17 17:01             ` Liliana Marie Prikler
2021-09-17 14:11 ` muradm [this message]
2022-10-06  8:18 ` [bug#50627] [PATCH v1] gnu: gtk: Move wayland-protocols to inputs Maxime Devos via Guix-patches

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=20210917141108.801-1-mail@muradm.net \
    --to=mail@muradm.net \
    --cc=50627@debbugs.gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.