From 3146b16681267f2416c258351fb941abf824de82 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Tue, 28 Nov 2023 09:52:25 +0100 Subject: [PATCH] . --- packages/hyprland-meson-build.patch | 59 +++++++++++++++++++++++++++ packages/hyprland.scm | 62 +---------------------------- 2 files changed, 60 insertions(+), 61 deletions(-) create mode 100644 packages/hyprland-meson-build.patch diff --git a/packages/hyprland-meson-build.patch b/packages/hyprland-meson-build.patch new file mode 100644 index 0000000..844eaca --- /dev/null +++ b/packages/hyprland-meson-build.patch @@ -0,0 +1,59 @@ +diff --git a/meson.build b/meson.build +index 1d2c7f9f..c5ef4e67 100644 +--- a/meson.build ++++ b/meson.build +@@ -33,20 +33,7 @@ if cpp_compiler.check_header('execinfo.h') + add_project_arguments('-DHAS_EXECINFO', language: 'cpp') + endif + +-wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2']) +-have_xwlr = wlroots.get_variable('features').get('xwayland') +-xcb_dep = dependency('xcb', required: get_option('xwayland')) +- +-cmake = import('cmake') +-udis = cmake.subproject('udis86') +-udis86 = udis.dependency('libudis86') +- +-if get_option('xwayland').enabled() and not have_xwlr +- error('Cannot enable Xwayland in Hyprland: wlroots has been built without Xwayland support') +-endif +-have_xwayland = xcb_dep.found() and have_xwlr +- +-if not have_xwayland ++if get_option('xwayland').disabled() + add_project_arguments('-DNO_XWAYLAND', language: 'cpp') + endif + +@@ -69,8 +56,6 @@ if get_option('buildtype') == 'debug' + add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp') + endif + +-version_h = run_command('sh', '-c', 'scripts/generateVersion.sh') +- + globber = run_command('find', 'src', '-name', '*.h*', check: true) + headers = globber.stdout().strip().split('\n') + foreach file : headers +diff --git a/src/meson.build b/src/meson.build +index 0af864b9..38723b8c 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -9,16 +9,16 @@ executable('Hyprland', src, + server_protos, + dependency('wayland-server'), + dependency('wayland-client'), +- wlroots.get_variable('wlroots'), ++ dependency('wlroots'), + dependency('cairo'), + dependency('libdrm'), + dependency('egl'), + dependency('xkbcommon'), + dependency('libinput'), +- xcb_dep, ++ dependency('xcb', required: get_option('xwayland')), + backtrace_dep, + systemd_dep, +- udis86, ++ dependency('udis86'), + + dependency('pixman-1'), + dependency('gl', 'opengl'), diff --git a/packages/hyprland.scm b/packages/hyprland.scm index 419574e..5b91c81 100644 --- a/packages/hyprland.scm +++ b/packages/hyprland.scm @@ -85,67 +85,7 @@ Wayland compositor based on wlroots") (description "Hyprland.") (sha256 (base32 "17h8gy7wvsxg1ypq70b0cldz6h599xi7fibawlm2g6cvxkmzdwzh")) (modules '((guix build utils))) - (patches (plain-file "meson-build.patch" - "diff --git a/meson.build b/meson.build -index 1d2c7f9f..c5ef4e67 100644 ---- a/meson.build -+++ b/meson.build -@@ -33,20 +33,7 @@ if cpp_compiler.check_header('execinfo.h') - add_project_arguments('-DHAS_EXECINFO', language: 'cpp') - endif - --wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2']) --have_xwlr = wlroots.get_variable('features').get('xwayland') --xcb_dep = dependency('xcb', required: get_option('xwayland')) -- --cmake = import('cmake') --udis = cmake.subproject('udis86') --udis86 = udis.dependency('libudis86') -- --if get_option('xwayland').enabled() and not have_xwlr -- error('Cannot enable Xwayland in Hyprland: wlroots has been built without Xwayland support') --endif --have_xwayland = xcb_dep.found() and have_xwlr -- --if not have_xwayland -+if get_option('xwayland').disabled() - add_project_arguments('-DNO_XWAYLAND', language: 'cpp') - endif - -@@ -69,8 +56,6 @@ if get_option('buildtype') == 'debug' - add_project_arguments('-DHYPRLAND_DEBUG', language: 'cpp') - endif - --version_h = run_command('sh', '-c', 'scripts/generateVersion.sh') -- - globber = run_command('find', 'src', '-name', '*.h*', check: true) - headers = globber.stdout().strip().split('\n') - foreach file : headers -diff --git a/src/meson.build b/src/meson.build -index 0af864b9..38723b8c 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -9,16 +9,16 @@ executable('Hyprland', src, - server_protos, - dependency('wayland-server'), - dependency('wayland-client'), -- wlroots.get_variable('wlroots'), -+ dependency('wlroots'), - dependency('cairo'), - dependency('libdrm'), - dependency('egl'), - dependency('xkbcommon'), - dependency('libinput'), -- xcb_dep, -+ dependency('xcb', required: get_option('xwayland')), - backtrace_dep, - systemd_dep, -- udis86, -+ dependency('udis86'), - - dependency('pixman-1'), - dependency('gl', 'opengl'), -")) + (patches (find-patch "hyprland-meson-build.patch")) (snippet #~(begin ;;(delete-file-recursively "subprojects/wlroots")