diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2021-11-22 15:33:43 +0000 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-11-22 15:35:47 +0000 |
commit | e711ad31857c587194c3077d2f1bb08c2124e8cd (patch) | |
tree | a02ef5aa9ff110f59445744cea3916a5bedb9a67 | |
parent | 18ab016be1f1846254b054fa937b539487d2bbdb (diff) | |
download | guix-e711ad31857c587194c3077d2f1bb08c2124e8cd.tar.gz |
gnu: awesome: Fix build.
* gnu/packages/patches/awesome-4.3-fno-common.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/wm.scm (awesome)[source]: Use it. [arguments]{set-paths}: Set HOME and XDG_CACHE_HOME variables.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/awesome-4.3-fno-common.patch | 178 | ||||
-rw-r--r-- | gnu/packages/wm.scm | 6 |
3 files changed, 183 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index ec65c9a3a6..862dbfda2d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -872,6 +872,7 @@ dist_patch_DATA = \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ + %D%/packages/patches/awesome-4.3-fno-common.patch \ %D%/packages/patches/aws-c-auth-install-private-headers.patch \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ diff --git a/gnu/packages/patches/awesome-4.3-fno-common.patch b/gnu/packages/patches/awesome-4.3-fno-common.patch new file mode 100644 index 0000000000..62f153d012 --- /dev/null +++ b/gnu/packages/patches/awesome-4.3-fno-common.patch @@ -0,0 +1,178 @@ +Taken from: https://github.com/awesomeWM/awesome/commit/d256d9055095f27a33696e0aeda4ee20ed4fb1a0 +Author: Reiner Herrmann <reiner@reiner-h.de> + +--- a/common/lualib.c ++++ b/common/lualib.c +@@ -20,6 +20,8 @@ + #include "common/lualib.h" + #include "luaa.h" + ++lua_CFunction lualib_dofunction_on_error; ++ + void luaA_checkfunction(lua_State *L, int idx) + { + if(!lua_isfunction(L, idx)) +--- a/common/lualib.h ++++ b/common/lualib.h +@@ -28,7 +28,7 @@ + #include "common/util.h" + + /** Lua function to call on dofunction() error */ +-lua_CFunction lualib_dofunction_on_error; ++extern lua_CFunction lualib_dofunction_on_error; + + void luaA_checkfunction(lua_State *, int); + void luaA_checktable(lua_State *, int); +--- a/luaa.c ++++ b/luaa.c +@@ -91,6 +91,8 @@ extern const struct luaL_Reg awesome_mouse_meta[]; + extern const struct luaL_Reg awesome_root_methods[]; + extern const struct luaL_Reg awesome_root_meta[]; + ++signal_array_t global_signals; ++ + /** A call into the Lua code aborted with an error. + * + * This signal is used in the example configuration, @{05-awesomerc.md}, +--- a/luaa.h ++++ b/luaa.h +@@ -317,7 +317,7 @@ const char *luaA_find_config(xdgHandle *, const char *, luaA_config_callback *); + bool luaA_parserc(xdgHandle *, const char *); + + /** Global signals */ +-signal_array_t global_signals; ++extern signal_array_t global_signals; + + int luaA_class_index_miss_property(lua_State *, lua_object_t *); + int luaA_class_newindex_miss_property(lua_State *, lua_object_t *); +--- a/objects/button.c ++++ b/objects/button.c +@@ -35,6 +35,8 @@ + + #include "button.h" + ++lua_class_t button_class; ++ + /** Button object. + * + * @tfield int button The mouse button number, or 0 for any button. +--- a/objects/button.h ++++ b/objects/button.h +@@ -39,7 +39,7 @@ typedef struct button_t + xcb_button_t button; + } button_t; + +-lua_class_t button_class; ++extern lua_class_t button_class; + LUA_OBJECT_FUNCS(button_class, button_t, button) + ARRAY_FUNCS(button_t *, button, DO_NOTHING) + +--- a/objects/client.c ++++ b/objects/client.c +@@ -108,6 +108,8 @@ + #include <xcb/shape.h> + #include <cairo-xcb.h> + ++lua_class_t client_class; ++ + /** Client class. + * + * This table allow to add more dynamic properties to the clients. For example, +--- a/objects/client.h ++++ b/objects/client.h +@@ -200,7 +200,7 @@ struct client_t + ARRAY_FUNCS(client_t *, client, DO_NOTHING) + + /** Client class */ +-lua_class_t client_class; ++extern lua_class_t client_class; + + LUA_OBJECT_FUNCS(client_class, client_t, client) + +--- a/objects/drawin.c ++++ b/objects/drawin.c +@@ -46,6 +46,8 @@ + #include <cairo-xcb.h> + #include <xcb/shape.h> + ++lua_class_t drawin_class; ++ + /** Drawin object. + * + * @field border_width Border width. +--- a/objects/drawin.h ++++ b/objects/drawin.h +@@ -52,7 +52,7 @@ void luaA_drawin_systray_kickout(lua_State *); + + void drawin_class_setup(lua_State *); + +-lua_class_t drawin_class; ++extern lua_class_t drawin_class; + + #endif + // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 +--- a/objects/key.c ++++ b/objects/key.c +@@ -43,6 +43,8 @@ + #include <xkbcommon/xkbcommon.h> + #include <glib.h> + ++lua_class_t key_class; ++ + /** Key object. + * + * @tfield string key The key to trigger an event. +--- a/objects/key.h ++++ b/objects/key.h +@@ -36,7 +36,7 @@ typedef struct keyb_t + xcb_keycode_t keycode; + } keyb_t; + +-lua_class_t key_class; ++extern lua_class_t key_class; + LUA_OBJECT_FUNCS(key_class, keyb_t, key) + DO_ARRAY(keyb_t *, key, DO_NOTHING) + +--- a/objects/tag.c ++++ b/objects/tag.c +@@ -190,6 +190,8 @@ + #include "ewmh.h" + #include "luaa.h" + ++lua_class_t tag_class; ++ + /** + * @signal request::select + */ +--- a/objects/tag.h ++++ b/objects/tag.h +@@ -46,7 +46,7 @@ struct tag + client_array_t clients; + }; + +-lua_class_t tag_class; ++extern lua_class_t tag_class; + LUA_OBJECT_FUNCS(tag_class, tag_t, tag) + + void tag_class_setup(lua_State *); +--- a/objects/window.c ++++ b/objects/window.c +@@ -59,6 +59,7 @@ + #include "property.h" + #include "xwindow.h" + ++lua_class_t window_class; + LUA_CLASS_FUNCS(window, window_class) + + static xcb_window_t +--- a/objects/window.h ++++ b/objects/window.h +@@ -80,7 +80,7 @@ typedef struct + WINDOW_OBJECT_HEADER + } window_t; + +-lua_class_t window_class; ++extern lua_class_t window_class; + + void window_class_setup(lua_State *); + diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 6361530534..176c1bf36c 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -1011,7 +1011,8 @@ for wlroots-based Wayland compositors.") "\"~c\""))) #t)) (patches - (search-patches "awesome-reproducible-png.patch")))) + (search-patches "awesome-reproducible-png.patch" + "awesome-4.3-fno-common.patch")))) (build-system cmake-build-system) (native-inputs `(("asciidoc" ,asciidoc) @@ -1093,7 +1094,8 @@ for wlroots-based Wayland compositors.") (setenv "LD_LIBRARY_PATH" cairo) (setenv "LUA_PATH" (string-append "?.lua;" lua-path)) (setenv "LUA_CPATH" lua-cpath) - #t))) + (setenv "HOME" (getcwd)) + (setenv "XDG_CACHE_HOME" (getcwd))))) (replace 'check (lambda _ ;; There aren't any tests, so just make sure the binary |