Created
September 23, 2025 14:35
-
-
Save wooparadog/3dae4ae7080aba8396982d436bceba30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/PKGBUILD b/PKGBUILD | |
| index f582a43..2b976bb 100644 | |
| --- a/PKGBUILD | |
| +++ b/PKGBUILD | |
| @@ -9,7 +9,7 @@ | |
| _pkgname=awesome | |
| pkgname=${_pkgname}-git | |
| -pkgver=4.3.1683.g691e36425 | |
| +pkgver=4.3.1684.gf009815cb | |
| pkgrel=1 | |
| pkgdesc='Highly configurable framework window manager' | |
| arch=('i686' 'x86_64') | |
| @@ -28,8 +28,10 @@ optdepends=('rlwrap: readline support for awesome-client' | |
| provides=('notification-daemon' 'awesome') | |
| conflicts=('awesome') | |
| backup=('etc/xdg/awesome/rc.lua') | |
| -source=("$pkgname::git+https://github.com/awesomeWM/awesome.git") | |
| -md5sums=('SKIP') | |
| +source=("$pkgname::git+https://github.com/awesomeWM/awesome.git" | |
| + 'awesome-pr4022.patch') | |
| +md5sums=('SKIP' | |
| + 'SKIP') | |
| _LUA_VER=5.4 | |
| pkgver() { | |
| @@ -37,6 +39,11 @@ pkgver() { | |
| git describe | sed 's/^v//;s/-/./g' | |
| } | |
| +prepare() { | |
| + cd "$pkgname" | |
| + patch -Np1 --forward -i "$srcdir/awesome-pr4022.patch" | |
| +} | |
| + | |
| build() { | |
| mkdir -p build | |
| cd build | |
| diff --git a/awesome-pr4022.patch b/awesome-pr4022.patch | |
| new file mode 100644 | |
| index 0000000..b1fef7d | |
| --- /dev/null | |
| +++ b/awesome-pr4022.patch | |
| @@ -0,0 +1,150 @@ | |
| +From 5ae48086fbc87cc7086e9da43bfc1e3407214e5e Mon Sep 17 00:00:00 2001 | |
| +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <[email protected]> | |
| +Date: Sat, 17 May 2025 20:32:58 +0200 | |
| +Subject: [PATCH 1/2] lib, tests: use GioUnix to use platform-specific Gio | |
| + classes | |
| + | |
| +In newest glib GioUnix symbols are not anymore exposed in GioUnix, | |
| +while lua-lgi should handle the change transparently, it's better to | |
| +adapt awesome to just use the right namespace. | |
| +--- | |
| + lib/awful/spawn.lua | 5 +++-- | |
| + tests/_client.lua | 11 ++++++----- | |
| + tests/test-spawn.lua | 8 ++++---- | |
| + 3 files changed, 13 insertions(+), 11 deletions(-) | |
| + | |
| +diff --git a/lib/awful/spawn.lua b/lib/awful/spawn.lua | |
| +index 7d3e945087..8eb7847627 100644 | |
| +--- a/lib/awful/spawn.lua | |
| ++++ b/lib/awful/spawn.lua | |
| +@@ -225,6 +225,7 @@ local capi = | |
| + } | |
| + local lgi = require("lgi") | |
| + local Gio = lgi.Gio | |
| ++local GioUnix = lgi.GioUnix | |
| + local GLib = lgi.GLib | |
| + local util = require("awful.util") | |
| + local gtable = require("gears.table") | |
| +@@ -418,11 +419,11 @@ function spawn.with_line_callback(cmd, callbacks) | |
| + end | |
| + end | |
| + if have_stdout then | |
| +- spawn.read_lines(Gio.UnixInputStream.new(stdout, true), | |
| ++ spawn.read_lines(GioUnix.InputStream.new(stdout, true), | |
| + stdout_callback, step_done, true) | |
| + end | |
| + if have_stderr then | |
| +- spawn.read_lines(Gio.UnixInputStream.new(stderr, true), | |
| ++ spawn.read_lines(GioUnix.InputStream.new(stderr, true), | |
| + stderr_callback, step_done, true) | |
| + end | |
| + assert(stdin == nil) | |
| +diff --git a/tests/_client.lua b/tests/_client.lua | |
| +index 3eb015f312..d45786bb28 100644 | |
| +--- a/tests/_client.lua | |
| ++++ b/tests/_client.lua | |
| +@@ -16,6 +16,7 @@ local GLib = lgi.require('GLib') | |
| + local Gdk = lgi.require('Gdk') | |
| + local Gtk = lgi.require('Gtk', '3.0') | |
| + local Gio = lgi.require('Gio') | |
| ++local GioUnix = lgi.require('GioUnix') | |
| + Gtk.init() | |
| + | |
| + local function open_window(class, title, options) | |
| +@@ -88,7 +89,7 @@ end) | |
| + coro() | |
| + | |
| + -- Read lines from stdin and feed them to the coroutine | |
| +-local stdin = Gio.UnixInputStream.new(0, false) | |
| ++local stdin = GioUnix.InputStream.new(0, false) | |
| + stdin = Gio.DataInputStream.new(stdin) | |
| + | |
| + local read_start, read_finish | |
| +@@ -116,7 +117,7 @@ Gtk:main{...} | |
| + ]] | |
| + | |
| + local lgi = require("lgi") | |
| +-local Gio = lgi.require("Gio") | |
| ++local GioUnix = lgi.require("GioUnix") | |
| + | |
| + local initialized = false | |
| + local pipe, pid | |
| +@@ -126,10 +127,10 @@ local function init() | |
| + initialized = true | |
| + local cmd = { lua_executable, "-e", test_client_source } | |
| + local _pid, _, stdin, stdout, stderr = awesome.spawn(cmd, false, true, true, true) | |
| +- pipe = Gio.UnixOutputStream.new(stdin, true) | |
| ++ pipe = GioUnix.OutputStream.new(stdin, true) | |
| + pid = _pid | |
| +- stdout = Gio.UnixInputStream.new(stdout, true) | |
| +- stderr = Gio.UnixInputStream.new(stderr, true) | |
| ++ stdout = GioUnix.InputStream.new(stdout, true) | |
| ++ stderr = GioUnix.InputStream.new(stderr, true) | |
| + spawn.read_lines(stdout, function(...) print("_client", ...) end) | |
| + spawn.read_lines(stderr, function(...) print("_client", ...) end) | |
| + end | |
| +diff --git a/tests/test-spawn.lua b/tests/test-spawn.lua | |
| +index dfc3cc5f8d..a24a94238a 100644 | |
| +--- a/tests/test-spawn.lua | |
| ++++ b/tests/test-spawn.lua | |
| +@@ -109,7 +109,7 @@ local steps = { | |
| + local pid, _, _, stdout = awesome.spawn({ "sh", "-c", "echo $AWESOME_SPAWN_TEST_VAR $HOME $USER" }, | |
| + false, false, true, false, nil, { "AWESOME_SPAWN_TEST_VAR=42" }) | |
| + assert(type(pid) ~= "string", pid) | |
| +- spawn.read_lines(require("lgi").Gio.UnixInputStream.new(stdout, true), | |
| ++ spawn.read_lines(require("lgi").GioUnix.InputStream.new(stdout, true), | |
| + function(line) | |
| + assert(not read_line) | |
| + read_line = true | |
| +@@ -171,7 +171,7 @@ local steps = { | |
| + false, false, true, "DEV_NULL") | |
| + assert(type(pid) ~= "string", pid) | |
| + assert(stderr == nil) | |
| +- spawn.read_lines(require("lgi").Gio.UnixInputStream.new(stdout, true), | |
| ++ spawn.read_lines(require("lgi").GioUnix.InputStream.new(stdout, true), | |
| + function(line) | |
| + assert(not read_line) | |
| + read_line = true | |
| +@@ -189,7 +189,7 @@ local steps = { | |
| + false, "INHERIT", true, false) | |
| + assert(type(pid) ~= "string", pid) | |
| + assert(stdin == nil) | |
| +- spawn.read_lines(require("lgi").Gio.UnixInputStream.new(stdout, true), | |
| ++ spawn.read_lines(require("lgi").GioUnix.InputStream.new(stdout, true), | |
| + function(line) | |
| + assert(not read_line) | |
| + read_line = true | |
| +@@ -215,7 +215,7 @@ local steps = { | |
| + assert(stdin ~= nil) | |
| + assert(stdout ~= nil) | |
| + assert(stderr ~= nil) | |
| +- spawn.read_lines(require("lgi").Gio.UnixInputStream.new(stdout, true), | |
| ++ spawn.read_lines(require("lgi").GioUnix.InputStream.new(stdout, true), | |
| + function(line) | |
| + assert(not read_line) | |
| + read_line = true | |
| + | |
| +From 80b7fa8262495e331da3c98a48adf94a5a806fef Mon Sep 17 00:00:00 2001 | |
| +From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <[email protected]> | |
| +Date: Sat, 13 Sep 2025 02:13:01 +0200 | |
| +Subject: [PATCH 2/2] awesomeConfig: Bump dependency on GLib 2.79.2 | |
| + | |
| +This is the version that provided GioUnix symbols, so we need to depend | |
| +on that | |
| +--- | |
| + awesomeConfig.cmake | 2 +- | |
| + 1 file changed, 1 insertion(+), 1 deletion(-) | |
| + | |
| +diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake | |
| +index 592c2b2526..b27baa456c 100644 | |
| +--- a/awesomeConfig.cmake | |
| ++++ b/awesomeConfig.cmake | |
| +@@ -132,7 +132,7 @@ pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED | |
| + | |
| + set(AWESOME_DEPENDENCIES | |
| + glib-2.0 | |
| +- glib-2.0>=2.40 | |
| ++ glib-2.0>=2.79.2 | |
| + gdk-pixbuf-2.0 | |
| + cairo | |
| + x11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment