From 3d6dd8d7652c2f24b58a1899448a56831fe94bcb Mon Sep 17 00:00:00 2001 From: zenobit Date: Wed, 31 Jan 2024 11:44:53 +0100 Subject: [PATCH] New package: hyprland-0.34.0 Signed-off-by: zenobit --- srcpkgs/hyprland/template | 111 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 srcpkgs/hyprland/template diff --git a/srcpkgs/hyprland/template b/srcpkgs/hyprland/template new file mode 100644 index 00000000000000..dd89133194b2ae --- /dev/null +++ b/srcpkgs/hyprland/template @@ -0,0 +1,111 @@ +# Template file for 'hyprland' +pkgname=hyprland +version=0.34.0 +revision=1 +build_style=cmake +hostmakedepends="jq git pkg-config glslang hwids meson ninja autoconf mk-configure" +makedepends=" + cairo-devel + libdisplay-info-devel + libdrm-devel + libliftoff + pango-devel + tomlplusplus + wlroots-devel + xorg-server-xwayland +" +depends=" + cairo + glslang + libdisplay-info + libinput + libliftoff + libxcb + libXfixes + libxkbcommon + libdrm>=2.4.118 + pango + pixman + polkit + tomlplusplus + Vulkan-ValidationLayers + vulkan-loader + wayland>=1.22.0 + wayland-protocols + xcb-proto + xcb-util + xcb-util-errors + xcb-util-keysyms + xcb-util-renderutil + xcb-util-wm + xorg-server-xwayland +" +short_desc="Dynamic tiling Wayland compositor that doesn't sacrifice on its looks" +maintainer="Makrennel " +license="BSD-3-Clause" +homepage="https://hyprland.org/" +changelog="https://github.com/hyprwm/Hyprland/releases" +distfiles="https://github.com/hyprwm/Hyprland/releases/download/v${version}/source-v${version}.tar.gz" +checksum=234500dc726ec6cd190d95d45cf6d04766064172e75c1351ee7c49ec3405497e + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + makedepends+=" libexecinfo-devel" + depends+=" libexecinfo" +fi + +do_build() { + # build hyprland + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + cmake --no-warn-unused-cli \ + -DCMAKE_CXX_FLAGS="-lexecinfo" \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DNO_SYSTEMD:STRING=true \ + -S . -B ./build -G Ninja + else + cmake --no-warn-unused-cli \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DNO_SYSTEMD:STRING=true \ + -S . -B ./build -G Ninja + fi + cmake --build ./build --config Release --target all -j${XBPS_MAKEJOBS} + chmod -R 777 ./build +} + +do_install() { + vlicense LICENSE + + # binaries + vbin build/Hyprland + vbin build/hyprctl/hyprctl + vbin build/hyprpm/hyprpm + + # assets + vmkdir usr/share/wayland-sessions + vmkdir usr/share/hyprland + vmkdir usr/share/xdg-desktop-portal + install -Dm0644 assets/*.png ${DESTDIR}/usr/share/hyprland + vinstall assets/header.svg 644 usr/share/hyprland + vinstall assets/hyprland-portals.conf 644 usr/share/xdg-desktop-portal + vinstall example/hyprland.desktop 644 usr/share/wayland-sessions + vinstall example/hyprland.conf 644 usr/share/hyprland + vman docs/Hyprland.1 + vman docs/hyprctl.1 + + # wlroots + vinstall subprojects/wlroots/build/libwlroots.so.13032 644 usr/lib + + # headers + vmkdir usr/include/hyprland + vmkdir usr/include/hyprland/protocols + vmkdir usr/include/hyprland/wlroots + vmkdir usr/share/pkgconfig + find src -name '*.h*' -exec install -Dm0644 {} ${DESTDIR}/usr/include/hyprland/{} \; + pushd subprojects/wlroots/include + find . -name '*.h*' -exec install -Dm0644 {} ${DESTDIR}/usr/include/hyprland/wlroots/{} \; + popd + pushd subprojects/wlroots/build/include + find . -name '*.h*' -exec install -Dm0644 {} ${DESTDIR}/usr/include/hyprland/wlroots/{} \; + popd + vinstall build/hyprland.pc 644 usr/share/pkgconfig + install -Dm0644 protocols/*-protocol.h ${DESTDIR}/usr/include/hyprland/protocols +}