diff options
author | Julien Roy <julien@jroy.ca> | 2023-09-29 09:40:55 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-01 08:45:52 +0100 |
commit | a486e82beae83e480cf6d18cf0fe10bdb77086a5 (patch) | |
tree | 8fad82858f43176652f3e67189934d5ef359c08e /gui-wm | |
parent | net-nds/ldapvi: Fix call to undeclared function on_exit (diff) | |
download | gentoo-a486e82beae83e480cf6d18cf0fe10bdb77086a5.tar.gz gentoo-a486e82beae83e480cf6d18cf0fe10bdb77086a5.tar.bz2 gentoo-a486e82beae83e480cf6d18cf0fe10bdb77086a5.zip |
gui-wm/hyprland: add 0.30.0
Signed-off-by: Julien Roy <julien@jroy.ca>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'gui-wm')
-rw-r--r-- | gui-wm/hyprland/Manifest | 1 | ||||
-rw-r--r-- | gui-wm/hyprland/files/hyprland-0.30.0-3400-fix-build.patch | 49 | ||||
-rw-r--r-- | gui-wm/hyprland/files/hyprland-0.30.0-no-wlroots-automagic-r1.patch | 18 | ||||
-rw-r--r-- | gui-wm/hyprland/hyprland-0.30.0.ebuild | 121 |
4 files changed, 189 insertions, 0 deletions
diff --git a/gui-wm/hyprland/Manifest b/gui-wm/hyprland/Manifest index 03e51408765b..8c67519043f1 100644 --- a/gui-wm/hyprland/Manifest +++ b/gui-wm/hyprland/Manifest @@ -1,2 +1,3 @@ DIST hyprland-0.28.0.gh.tar.gz 14060441 BLAKE2B 25059b74b67df222867e84f5f1d44219302e7e454ec68110b70d6e915e95913bfdc8c6112bc8725e9be61f10a44603a96ba70980a9835d4b7757363825b93326 SHA512 c0802f2b061d5c9265c7767fae6ddaf00c1bbf6dc620f75593ba1538f94105a9ebe1517b7be444a1e70b81fd3a4205afd8154ba9ad02b3d610b00a9440ee6a63 DIST hyprland-0.29.1.gh.tar.gz 14056843 BLAKE2B 9e9f1b15d354cf5e391b1add5dc5ce8cf2e4b206853465028a6170e613c7c5435e9a6e3318cd1006d3c2874d885128b95495bba08444fade0185b2a69d9ab950 SHA512 abbfd244b7473ec521a639b0d424e2873193ab9ef0d24e6272e15b79da9ade8ee56ea4cffdc328713f99600c1d320384839d32eb223034945659b015125e98b1 +DIST hyprland-0.30.0.gh.tar.gz 14064946 BLAKE2B 188328ed08ca8a9db97ae94b77159f9ebe5361a050a177ec586f376b168dab4c9dcd6b6d71d3314e9470f46b57f0610a92cdfe73ff1704b9f55f21399895e69f SHA512 f8053c19460e7768aa00944d1fc624d85ff9e042d0750a74d28e08147fe50e45262bdb1c259642bb7241746a8fb967344841e58fa598213f8c333f15246f9c94 diff --git a/gui-wm/hyprland/files/hyprland-0.30.0-3400-fix-build.patch b/gui-wm/hyprland/files/hyprland-0.30.0-3400-fix-build.patch new file mode 100644 index 000000000000..3ee5ca710015 --- /dev/null +++ b/gui-wm/hyprland/files/hyprland-0.30.0-3400-fix-build.patch @@ -0,0 +1,49 @@ +From 8637bfb1b79d7778447d93349f14b86dea41d2a4 Mon Sep 17 00:00:00 2001 +From: Jan Beich <jbeich@FreeBSD.org> +Date: Sat, 23 Sep 2023 12:31:37 +0000 +Subject: [PATCH] build: Unbreak build without precompiled headers (#3400) + +* helpers: add missing header after 2e34548aea5b + +src/helpers/VarList.cpp: In constructor 'CVarList::CVarList(const std::string&, size_t, char, bool)': +src/helpers/VarList.cpp:19:34: error: 'removeBeginEndSpacesTabs' was not declared in this scope + 19 | m_vArgs.emplace_back(removeBeginEndSpacesTabs(in.substr(pos))); + | ^~~~~~~~~~~~~~~~~~~~~~~~ +src/helpers/VarList.cpp:23:30: error: 'removeBeginEndSpacesTabs' was not declared in this scope + 23 | m_vArgs.emplace_back(removeBeginEndSpacesTabs(std::string_view{s}.data())); + | ^~~~~~~~~~~~~~~~~~~~~~~~ + +* helpers: add missing C linkage after 0dbd99700319 + +ld.lld: error: undefined symbol: wlr_region_scale(pixman_region32*, pixman_region32 const*, float) +>>> referenced by Region.cpp +>>> src/Hyprland.p/helpers_Region.cpp.o:(CRegion::scale(float)) +>>> did you mean: extern "C" wlr_region_scale +>>> defined in: /usr/lib/libwlroots.so.12032 +--- + src/helpers/Region.cpp | 2 ++ + src/helpers/VarList.cpp | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp +index e2db466438..5515e71e7e 100644 +--- a/src/helpers/Region.cpp ++++ b/src/helpers/Region.cpp +@@ -1,6 +1,8 @@ + #include "Region.hpp" ++extern "C" { + #include <wlr/util/box.h> + #include <wlr/util/region.h> ++} + + CRegion::CRegion() { + pixman_region32_init(&m_rRegion); +diff --git a/src/helpers/VarList.cpp b/src/helpers/VarList.cpp +index c29a1e9641..780ea9a045 100644 +--- a/src/helpers/VarList.cpp ++++ b/src/helpers/VarList.cpp +@@ -1,3 +1,4 @@ ++#include "MiscFunctions.hpp" + #include "VarList.hpp" + #include <ranges> + #include <algorithm> diff --git a/gui-wm/hyprland/files/hyprland-0.30.0-no-wlroots-automagic-r1.patch b/gui-wm/hyprland/files/hyprland-0.30.0-no-wlroots-automagic-r1.patch new file mode 100644 index 000000000000..452c1cc80f5e --- /dev/null +++ b/gui-wm/hyprland/files/hyprland-0.30.0-no-wlroots-automagic-r1.patch @@ -0,0 +1,18 @@ +diff --git a/meson.build b/meson.build +index d515621e..08993f8a 100644 +--- a/meson.build ++++ b/meson.build +@@ -39,7 +39,12 @@ add_project_arguments( + ], + language: 'cpp') + +-wlroots = subproject('wlroots', default_options: ['examples=false', 'renderers=gles2']) ++if get_option('xwayland').enabled() ++ wlroots = subproject('wlroots', default_options: ['backends=drm,libinput,x11','examples=false','renderers=gles2','xcb-errors=disabled','xwayland=enabled']) ++else ++ wlroots = subproject('wlroots', default_options: ['backends=drm,libinput','examples=false','renderers=gles2','xcb-errors=disabled','xwayland=disabled']) ++endif ++ + have_xwlr = wlroots.get_variable('features').get('xwayland') + xcb_dep = dependency('xcb', required: get_option('xwayland')) + diff --git a/gui-wm/hyprland/hyprland-0.30.0.ebuild b/gui-wm/hyprland/hyprland-0.30.0.ebuild new file mode 100644 index 000000000000..d243a16f1b60 --- /dev/null +++ b/gui-wm/hyprland/hyprland-0.30.0.ebuild @@ -0,0 +1,121 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson toolchain-funcs + +DESCRIPTION="A dynamic tiling Wayland compositor that doesn't sacrifice on its looks" +HOMEPAGE="https://github.com/hyprwm/Hyprland" + +SRC_URI="https://github.com/hyprwm/${PN^}/releases/download/v${PV}/source-v${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${PN}-source" + +KEYWORDS="~amd64" +LICENSE="BSD" +SLOT="0" +IUSE="X legacy-renderer systemd video_cards_nvidia" + +# bundled wlroots has the following dependency string according to included headers. +# wlroots[drm,gles2-renderer,libinput,x11-backend?,X?] +# enable x11-backend with X and vice versa +WLROOTS_RDEPEND=" + >=dev-libs/libinput-1.14.0:= + dev-libs/libliftoff + >=dev-libs/wayland-1.22 + media-libs/libdisplay-info + media-libs/libglvnd + media-libs/mesa[egl(+),gles2] + sys-apps/hwdata:= + sys-auth/seatd:= + >=x11-libs/libdrm-2.4.114 + x11-libs/libxkbcommon + >=x11-libs/pixman-0.42.0 + virtual/libudev:= + X? ( + x11-base/xwayland + x11-libs/libxcb:0= + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) +" +WLROOTS_DEPEND=" + >=dev-libs/wayland-protocols-1.32 +" +WLROOTS_BDEPEND=" + dev-util/glslang + dev-util/wayland-scanner +" + +RDEPEND=" + ${WLROOTS_RDEPEND} + dev-libs/glib:2 + dev-libs/libinput + dev-libs/wayland + media-libs/libglvnd + x11-libs/cairo + x11-libs/libdrm + x11-libs/libxkbcommon + x11-libs/pango + x11-libs/pixman + X? ( + x11-libs/libxcb:0= + ) +" +DEPEND=" + ${RDEPEND} + ${WLROOTS_DEPEND} + dev-libs/hyprland-protocols + >=dev-libs/wayland-protocols-1.25 +" +BDEPEND=" + ${WLROOTS_BDEPEND} + app-misc/jq + dev-util/cmake + dev-util/wayland-scanner + dev-vcs/git + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/hyprland-0.30.0-no-wlroots-automagic-r1.patch" + "${FILESDIR}/hyprland-0.30.0-3400-fix-build.patch" +) + +pkg_setup() { + [[ ${MERGE_TYPE} == binary ]] && return + + if tc-is-gcc && ver_test $(gcc-version) -lt 13 ; then + eerror "Hyprland requires >=sys-devel/gcc-13 to build" + eerror "Please upgrade GCC: emerge -v1 sys-devel/gcc" + die "GCC version is too old to compile Hyprland!" + elif tc-is-clang && ver_test $(clang-version) -lt 16 ; then + eerror "Hyprland requires >=sys-devel/clang-16 to build" + eerror "Please upgrade Clang: emerge -v1 sys-devel/clang" + die "Clang version is too old to compile Hyprland!" + fi +} + +src_prepare() { + if use video_cards_nvidia; then + cd "${S}/subprojects/wlroots" || die + eapply "${S}/nix/patches/wlroots-nvidia.patch" + cd "${S}" || die + fi + + default +} + +src_configure() { + local emesonargs=( + $(meson_feature legacy-renderer legacy_renderer) + $(meson_feature X xwayland) + $(meson_feature systemd) + ) + + meson_src_configure +} + +src_install() { + meson_src_install --skip-subprojects wlroots +} |