Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 58f61db47c | |||
| 84fd49065e | |||
| 1acffbb820 |
128
002-giounix-platform-specific.patch
Normal file
128
002-giounix-platform-specific.patch
Normal file
@@ -0,0 +1,128 @@
|
||||
From 5ae48086fbc87cc7086e9da43bfc1e3407214e5e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
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 3ffb1f95..33202e76 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")
|
||||
@@ -411,11 +412,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 349a0070..f06a76b3 100644
|
||||
--- a/tests/_client.lua
|
||||
+++ b/tests/_client.lua
|
||||
@@ -8,6 +8,7 @@ local lgi = require 'lgi'
|
||||
local Gdk = lgi.require('Gdk')
|
||||
local Gtk = lgi.require('Gtk')
|
||||
local Gio = lgi.require('Gio')
|
||||
+local GioUnix = lgi.require('GioUnix')
|
||||
Gtk.init()
|
||||
|
||||
local function open_window(class, title, options)
|
||||
@@ -68,7 +69,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
|
||||
@@ -96,7 +97,7 @@ Gtk:main{...}
|
||||
]]
|
||||
|
||||
local lgi = require("lgi")
|
||||
-local Gio = lgi.require("Gio")
|
||||
+local GioUnix = lgi.require("GioUnix")
|
||||
|
||||
local initialized = false
|
||||
local pipe
|
||||
@@ -105,9 +106,9 @@ local function init()
|
||||
initialized = true
|
||||
local cmd = { "lua", "-e", test_client_source }
|
||||
local _, _, stdin, stdout, stderr = awesome.spawn(cmd, false, true, true, true)
|
||||
- pipe = Gio.UnixOutputStream.new(stdin, true)
|
||||
- stdout = Gio.UnixInputStream.new(stdout, true)
|
||||
- stderr = Gio.UnixInputStream.new(stderr, true)
|
||||
+ pipe = GioUnix.OutputStream.new(stdin, 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 2af09749..d5da2e51 100644
|
||||
--- a/tests/test-spawn.lua
|
||||
+++ b/tests/test-spawn.lua
|
||||
@@ -105,7 +105,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
|
||||
--
|
||||
2.47.1
|
||||
|
||||
|
||||
From 80b7fa8262495e331da3c98a48adf94a5a806fef Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
|
||||
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 592c2b25..b27baa45 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
|
||||
--
|
||||
2.47.1
|
||||
|
||||
73
003-Update-CMake-support-to-3.5.0.patch
Normal file
73
003-Update-CMake-support-to-3.5.0.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 38db71f19b739623ed55e4794b0ecbd53b4becfc Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Gomes <pjbgf@linux.com>
|
||||
Date: Wed, 8 Oct 2025 08:22:47 +0100
|
||||
Subject: [PATCH] Update CMake to 3.5.0
|
||||
|
||||
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
|
||||
---
|
||||
CMakeLists.txt | 11 ++++-------
|
||||
awesomeConfig.cmake | 1 +
|
||||
tests/examples/CMakeLists.txt | 2 +-
|
||||
3 files changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9d3d3b4d..bae09a05 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.5.0)
|
||||
project(awesome C)
|
||||
|
||||
# Require an out-of-source build. We generate an awesomerc.lua in the build dir
|
||||
@@ -16,11 +16,6 @@ directory which you first have to delete. \
|
||||
endif()
|
||||
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
||||
-
|
||||
-if(COMMAND cmake_policy)
|
||||
- cmake_policy(VERSION 2.6)
|
||||
-endif()
|
||||
-
|
||||
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
@@ -454,7 +449,9 @@ if(LUACHECK_EXECUTABLE)
|
||||
list(APPEND CHECK_QA_TARGETS luacheck)
|
||||
endif()
|
||||
add_custom_target(check-qa DEPENDS ${CHECK_QA_TARGETS})
|
||||
-add_dependencies(check check-qa check-examples)
|
||||
+if(TARGET check-examples)
|
||||
+ add_dependencies(check check-qa check-examples)
|
||||
+endif()
|
||||
# }}}
|
||||
|
||||
INCLUDE(${CMAKE_SOURCE_DIR}/Packaging.cmake)
|
||||
diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake
|
||||
index 00b08fd7..0cfc8113 100644
|
||||
--- a/awesomeConfig.cmake
|
||||
+++ b/awesomeConfig.cmake
|
||||
@@ -357,6 +357,7 @@ add_custom_target(lgi-check-run ALL
|
||||
add_custom_target(setup_directories DEPENDS lgi-check-run)
|
||||
|
||||
add_custom_command(TARGET setup_directories
|
||||
+ POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_DIR}/script_files/
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_DIR}/docs/common/
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_DIR}/doc/images/
|
||||
diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt
|
||||
index 1363fde4..f0ee933e 100644
|
||||
--- a/tests/examples/CMakeLists.txt
|
||||
+++ b/tests/examples/CMakeLists.txt
|
||||
@@ -14,7 +14,7 @@ if(NOT DEFINED PROJECT_NAME)
|
||||
project(awesome-tests-examples NONE)
|
||||
endif()
|
||||
|
||||
-cmake_minimum_required(VERSION 3.0.0)
|
||||
+cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
# Get and update the LUA_PATH so the scripts can be executed without awesome.
|
||||
execute_process(COMMAND lua -e "p = package.path:gsub(';', '\\\\;'); io.stdout:write(p)"
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 6 10:23:11 UTC 2025 - Paulo Gomes <pjbgf@linux.com>
|
||||
|
||||
- Update changelog to include added patches.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 5 12:21:29 UTC 2025 - Paulo Gomes <pjbgf@linux.com>
|
||||
|
||||
- Update lua-lgi to >= 0.9.2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 8 07:09:09 UTC 2025 - Paulo Gomes <pjbgf@linux.com>
|
||||
|
||||
- Add support for CMake 3.5.
|
||||
- Added patches:
|
||||
- 003-Update-CMake-support-to-3.5.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 8 07:06:04 UTC 2025 - Paulo Gomes <pjbgf@linux.com>
|
||||
|
||||
- Update patch to align with openSUSE version.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 7 20:38:52 UTC 2025 - Paulo Gomes <pjbgf@linux.com>
|
||||
|
||||
- Add patch for GioUnix to use platform-specific Gio classes.
|
||||
See https://github.com/awesomeWM/awesome/pull/4022
|
||||
- Added patches:
|
||||
- 002-giounix-platform-specific.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 10:41:22 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
||||
12
awesome.spec
12
awesome.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package awesome
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -27,12 +27,16 @@ Source: https://github.com/awesomeWM/awesome-releases/raw/master/%{name}
|
||||
Source1: https://github.com/awesomeWM/awesome-releases/raw/master/%{name}-%{version}.tar.xz.asc
|
||||
Source2: %{name}.keyring
|
||||
Patch0: 001-extern-vars-declaration-fix-gcc10.patch
|
||||
# PATCH-FIX-OPENSUSE 002-giounix-platform-specific.patch boo#1250526
|
||||
Patch1: 002-giounix-platform-specific.patch
|
||||
# PATCH-FIX-OPENSUSE 003-Update-CMake-support-to-3.5.0.patch
|
||||
Patch2: 003-Update-CMake-support-to-3.5.0.patch
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: grep
|
||||
BuildRequires: lua-lgi >= 0.8.0
|
||||
BuildRequires: lua-lgi >= 0.9.2
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: Lua(devel) >= 5.2
|
||||
@@ -72,7 +76,7 @@ Requires: typelib(PangoCairo)
|
||||
Requires: typelib(cairo)
|
||||
Provides: windowmanager
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%description
|
||||
awesome is a dynamic window manager.
|
||||
@@ -99,7 +103,7 @@ sed -i 's/nano/vi/g' %{name}rc.lua
|
||||
sed -i 's/^\(Type=\).*$/\1XSession/' %{name}.desktop
|
||||
sed -i 's/#!\/usr\/bin\/env bash/#!\/bin\/bash/' ./utils/awesome-client
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%patch -P 0 -p1
|
||||
%patch -P 0 -P 1 -P 2 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
|
||||
Reference in New Issue
Block a user