You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
2.5 KiB
120 lines
2.5 KiB
1 year ago
|
# 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"
|
||
1 year ago
|
HOMEPAGE="https://github.com/hyprwm/Hyprland"
|
||
1 year ago
|
|
||
1 year ago
|
SRC_URI="https://github.com/hyprwm/${PN^}/releases/download/v${PV}/source-v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||
1 year ago
|
S="${WORKDIR}/${PN}-source"
|
||
|
|
||
|
KEYWORDS="~amd64"
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
|
IUSE="X legacy-renderer systemd video_cards_nvidia"
|
||
|
|
||
1 year ago
|
# 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:=
|
||
1 year ago
|
dev-libs/libliftoff
|
||
1 year ago
|
>=dev-libs/wayland-1.22
|
||
1 year ago
|
media-libs/libdisplay-info
|
||
1 year ago
|
media-libs/libglvnd
|
||
|
media-libs/mesa[egl(+),gles2]
|
||
|
sys-apps/hwdata:=
|
||
1 year ago
|
sys-auth/seatd:=
|
||
1 year ago
|
>=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
|
||
1 year ago
|
x11-libs/cairo
|
||
|
x11-libs/libdrm
|
||
|
x11-libs/libxkbcommon
|
||
1 year ago
|
x11-libs/pango
|
||
1 year ago
|
x11-libs/pixman
|
||
|
X? (
|
||
1 year ago
|
x11-libs/libxcb:0=
|
||
1 year ago
|
)
|
||
|
"
|
||
1 year ago
|
DEPEND="
|
||
|
${RDEPEND}
|
||
|
${WLROOTS_DEPEND}
|
||
1 year ago
|
dev-libs/hyprland-protocols
|
||
1 year ago
|
>=dev-libs/wayland-protocols-1.25
|
||
|
"
|
||
|
BDEPEND="
|
||
|
${WLROOTS_BDEPEND}
|
||
|
app-misc/jq
|
||
|
dev-util/cmake
|
||
1 year ago
|
dev-util/wayland-scanner
|
||
1 year ago
|
dev-vcs/git
|
||
1 year ago
|
virtual/pkgconfig
|
||
1 year ago
|
"
|
||
|
|
||
1 year ago
|
pkg_setup() {
|
||
|
[[ ${MERGE_TYPE} == binary ]] && return
|
||
|
|
||
|
if tc-is-gcc; then
|
||
|
STDLIBVER=$(echo '#include <string>' | $(tc-getCXX) -x c++ -dM -E - | \
|
||
1 year ago
|
grep GLIBCXX_RELEASE | sed 's/.*\([1-9][0-9]\)/\1/')
|
||
1 year ago
|
|
||
|
if ! [[ ${STDLIBVER} -ge 12 ]]; then
|
||
|
die "Hyprland requires >=sys-devel/gcc-12.1.0 to build"
|
||
|
fi
|
||
1 year ago
|
elif [[ $(clang-major-version) -lt 16 ]]; then
|
||
|
die "Hyprland requires >=sys-devel/clang-16.0.3 to build";
|
||
1 year ago
|
fi
|
||
1 year ago
|
}
|
||
1 year ago
|
|
||
1 year ago
|
src_prepare() {
|
||
1 year ago
|
if use video_cards_nvidia; then
|
||
|
cd "${S}/subprojects/wlroots" || die
|
||
1 year ago
|
eapply "${S}/nix/patches/wlroots-nvidia.patch"
|
||
1 year ago
|
cd "${S}" || die
|
||
|
fi
|
||
|
|
||
1 year ago
|
eapply "${FILESDIR}/hyprland-0.28.0-no-wlroots-automagic-r1.patch"
|
||
|
|
||
1 year ago
|
default
|
||
1 year ago
|
}
|
||
|
|
||
|
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
|
||
|
}
|