From b508e211a0e45b6d3c6c77138c76c36d509336f5 Mon Sep 17 00:00:00 2001 From: Markus Volk Date: Sun, 7 Apr 2024 19:54:27 +0200 Subject: [PATCH] hyprland: add recipe for 0.38 update to 0.38.1 --- .../hyprland/hyprland-0.38/meson-build.patch | 71 +++++++++++++++++++ .../hyprland/hyprland-0.38_0.38.1.bb | 57 +++++++++++++++ recipes-wlroots/hyprland/hyprland_git.bb | 2 +- 3 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 recipes-wlroots/hyprland/hyprland-0.38/meson-build.patch create mode 100644 recipes-wlroots/hyprland/hyprland-0.38_0.38.1.bb diff --git a/recipes-wlroots/hyprland/hyprland-0.38/meson-build.patch b/recipes-wlroots/hyprland/hyprland-0.38/meson-build.patch new file mode 100644 index 0000000..54ba881 --- /dev/null +++ b/recipes-wlroots/hyprland/hyprland-0.38/meson-build.patch @@ -0,0 +1,71 @@ +From 596cf2f2e1cbe68ce5673711d84cbfd576d40db1 Mon Sep 17 00:00:00 2001 +From: Markus Volk +Date: Sun, 23 Jul 2023 10:19:54 +0200 +Subject: [PATCH] hyprland: update + +--- + meson.build | 17 +---------------- + src/meson.build | 6 +++--- + 2 files changed, 4 insertions(+), 19 deletions(-) + +diff --git a/meson.build b/meson.build +index 81d6e403..04503a3c 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 59771fcf..a77349c4 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -9,7 +9,7 @@ executable('Hyprland', src, + server_protos, + dependency('wayland-server'), + dependency('wayland-client'), +- wlroots.get_variable('wlroots'), ++ dependency('wlroots'), + dependency('cairo'), + dependency('hyprcursor'), + dependency('hyprlang', version: '>= 0.3.2'), +@@ -17,10 +17,10 @@ executable('Hyprland', src, + 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/recipes-wlroots/hyprland/hyprland-0.38_0.38.1.bb b/recipes-wlroots/hyprland/hyprland-0.38_0.38.1.bb new file mode 100644 index 0000000..20e3dfe --- /dev/null +++ b/recipes-wlroots/hyprland/hyprland-0.38_0.38.1.bb @@ -0,0 +1,57 @@ +SUMMARY = "A Wayland WM" +HOMEPAGE = "https://hyprland.org/" +SECTION = "graphics" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=e5285450935e9c47f839569c8cbd4e29" + +REQUIRED_DISTRO_FEATURES = "wayland opengl" + +DEPENDS += " \ + cairo \ + hyprcursor \ + hyprlang \ + jq-native \ + libdrm \ + libinput \ + libxkbcommon \ + pango \ + pixman \ + tomlplusplus \ + udis86 \ + virtual/egl \ + wayland \ + wayland-native \ + wlroots \ +" + +RRECOMMENDS:${PN} ?= " \ + foot \ + jq \ + grim \ + slurp \ + wl-clipboard \ + hyprland-contrib \ +" + +SRC_URI = " \ + gitsm://github.com/hyprwm/Hyprland.git;protocol=https;branch=v0.38.1-b \ + file://meson-build.patch \ +" + +SRCREV = "360ede79d124ffdeebbe8401f1ac4bc0dbec2c91" +S = "${WORKDIR}/git" + +inherit meson pkgconfig features_check + +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd xwayland', d)}" + +PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled" +PACKAGECONFIG[xwayland] = "-Dxwayland=enabled,-Dxwayland=disabled,libxcb xcb-util-wm xcb-util-renderutil xwayland,xwayland" +PACKAGECONFIG[legacy_renderer] = "-Dlegacy_renderer=enabled,-Dlegacy_renderer=disabled" + +do_configure:prepend() { + cd ${S} && scripts/generateVersion.sh +} + +FILES:${PN} += "${datadir}" diff --git a/recipes-wlroots/hyprland/hyprland_git.bb b/recipes-wlroots/hyprland/hyprland_git.bb index 214d88c..4355af6 100644 --- a/recipes-wlroots/hyprland/hyprland_git.bb +++ b/recipes-wlroots/hyprland/hyprland_git.bb @@ -1,4 +1,3 @@ - SUMMARY = "A Wayland WM" HOMEPAGE = "https://hyprland.org/" SECTION = "graphics" @@ -57,3 +56,4 @@ do_configure:prepend() { } FILES:${PN} += "${datadir}" +