echawk / kiss-xorg

A KISS Linux Repository for Xorg
MIT License
34 stars 9 forks source link

proposal: add checks for wayland to relevant pkgs in `extra` #101

Closed echawk closed 8 months ago

echawk commented 1 year ago

Currently this would only affect the following packages:

The proposed changes are in the following diff:

diff --git a/extra/gtk+3/build b/extra/gtk+3/build
index c18271fa..f6a4b692 100755
--- a/extra/gtk+3/build
+++ b/extra/gtk+3/build
@@ -25,10 +25,13 @@ sed '/<atk-bridge.h>/d;/atk_bridge_adaptor_init/d' \
     gtk/a11y/gtkaccessibility.c > _
 mv -f _ gtk/a11y/gtkaccessibility.c

+# Conditionally enable wayland support.
+pkg-config --exists wayland-protocols && wayland=true
+
 meson setup \
     -Dprefix=/usr \
     -Dx11_backend=true \
-    -Dwayland_backend=false \
+    -Dwayland_backend="${wayland:-false}" \
     -Dxinerama=yes \
     -Dprint_backends=file,lpr \
     -Dcolord=no \
diff --git a/extra/libva/build b/extra/libva/build
index 5db86bd6..70f5013a 100755
--- a/extra/libva/build
+++ b/extra/libva/build
@@ -2,12 +2,15 @@

 export DESTDIR="$1"

+# Conditionally enable wayland support.
+pkg-config --exists wayland-client && wayland=yes
+
 meson setup \
     -Dprefix=/usr \
     -Dsysconfdir=/etc \
     -Dmandir=/usr/share/man \
     -Dpkg_config_path=/usr/lib/pkgconfig \
-    -Dwith_wayland=no \
+    -Dwith_wayland="${wayland:-no}" \
     -Dwith_x11=yes \
     -Dwith_glx=yes \
     output
diff --git a/extra/libxkbcommon/build b/extra/libxkbcommon/build
index 515f5bd3..9dc28a3d 100755
--- a/extra/libxkbcommon/build
+++ b/extra/libxkbcommon/build
@@ -6,14 +6,16 @@ export DESTDIR="$1"
 sed "s/valgrind.found()/false/" meson.build > _
 mv -f _ meson.build

+# Conditionally enable wayland support.
+pkg-config --exists wayland-client && wayland=true
+
 meson setup \
     -Dprefix=/usr \
     -Dlibexecdir=/usr/lib \
     -Ddefault_library=both \
     -Denable-docs=false \
-    -Denable-wayland=false \
+    -Denable-wayland="${wayland:-false}" \
     -Denable-xkbregistry=false \
-    -Dpkg_config_path=/usr/lib/pkgconfig \
     output

 ninja -C output
diff --git a/extra/mesa/build b/extra/mesa/build
index 9336e2cf..bd73c899 100755
--- a/extra/mesa/build
+++ b/extra/mesa/build
@@ -12,6 +12,9 @@ mv -f _ meson.build
 # and enables it if present. ie: install glvnd, rebuild mesa.
 pkg-config --exists libglvnd || glvnd_enabled=false

+# Conditionally enable wayland support.
+pkg-config --exists wayland-protocols && platforms=x11,wayland
+
 meson setup \
     -Dprefix=/usr \
     -Dsysconfdir=/etc \
@@ -19,7 +22,7 @@ meson setup \
     -Dlocalstatedir=/var \
     -Dbuildtype=release \
     -Dglx-read-only-text=true \
-    -Dplatforms=x11 \
+    -Dplatforms="${platforms:-x11}" \
     -Dglx=auto \
     -Degl=enabled \
     -Dvalgrind=false \
apprehensions commented 1 year ago

why not use kiss l?

apprehensions commented 1 year ago

firefox: --enable-default-toolkit=cairo-gtk3-x11-wayland

echawk commented 1 year ago

@wael444 I try to avoid the use of kiss l since for people who use forks of kiss, yet are kiss compatible, they wouldn't be able to use this repo.

kyx0r commented 1 year ago

I think this check is fine, however it may be more of a philosophical issue. Since if we were to do that, we could also do this for everything else, not necessarily pretending to wayland vs xorg. I think long term it might become too cumbersome to maintain and test both platforms. So since this is kiss-xorg I would not warrant this change. Let things be separated repos despite the duplication of packages. Coherency.

kyx0r commented 1 year ago

Like, there is a reason why kiss is primarily x86_64 distro. We could make every package have cross builds for arm (with appropriate checks), but we don't do that, so for the same reason I would not do the wayland check.

apprehensions commented 1 year ago

Not sure, I don't think new kiss users would enjoy having to fork and maintain the package to have it work for gtk and wayland for the use of xwayland

hovercats commented 1 year ago

This is more or less what carbslinux does in its repo. And I belive it works more or less well there.

Is this somewhat in the direction youre pointing to here?

in any case; is this even needed? if users wish to use wayland, they wouldnt be bothering with this repo at all, and if they want to use X, theyd use this. The only usecase that comes to mind would be the transision between X and wayland would possibly be made easier with this.

@kyx0r also brought up a valid point about maintainance getting cumbersome if things get complex. This is kiss-**xorg** after all, should we really prioritize wayland? A similar point was brought up in the s6 discusion aswell. The details is here

Now, im not entierly against this, if this can be acheived without things breaki, but adding wayland stuff here (with the exception of xwayland perhaps) would break away from the whole point of this repo imo.

echawk commented 1 year ago

This is more or less what carbslinux does in its repo. And I belive it works more or less well there.

Is this somewhat in the direction youre pointing to here?

in any case; is this even needed? if users wish to use wayland, they wouldnt be bothering with this repo at all, and if they want to use X, theyd use this. The only usecase that comes to mind would be the transision between X and wayland would possibly be made easier with this.

Somewhat - it is moreso for people who use wayland but also want access to some X libraries. I think in retrospect, I think it would be suffice to add the check only in mesa since I'm ok with making the assumption that any wayland user is using xwayland aswell. Therefore, adding the wayland checks to other X software is totally unnecessary. I'd have to double check if this is the case, but I think it is.

@kyx0r also brought up a valid point about maintainance getting cumbersome if things get complex. This is kiss-**xorg** after all, should we really prioritize wayland? A similar point was brought up in the s6 discusion aswell. The details is here

Now, im not entierly against this, if this can be acheived without things breaki, but adding wayland stuff here (with the exception of xwayland perhaps) would break away from the whole point of this repo imo.

I think the overall maintenance burden would be pretty minimal, since if we go the route that I just suggested, only one package needs to be maintained.

echawk commented 8 months ago

closing due to the presence of xwayland/