From 58f8e71d9dadfdafb9f2048a114836e2f1a96eff Mon Sep 17 00:00:00 2001 From: zenobit Date: Sat, 16 Mar 2024 18:20:11 +0100 Subject: [PATCH] New package: hyprland-0.38.0 --- srcpkgs/hyprland-devel | 1 + srcpkgs/hyprland/template | 99 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 120000 srcpkgs/hyprland-devel create mode 100644 srcpkgs/hyprland/template diff --git a/srcpkgs/hyprland-devel b/srcpkgs/hyprland-devel new file mode 120000 index 00000000000000..a3e8067e4e81f6 --- /dev/null +++ b/srcpkgs/hyprland-devel @@ -0,0 +1 @@ +hyprland \ No newline at end of file diff --git a/srcpkgs/hyprland/template b/srcpkgs/hyprland/template new file mode 100644 index 00000000000000..89164fbcf9f170 --- /dev/null +++ b/srcpkgs/hyprland/template @@ -0,0 +1,99 @@ +# Template file for 'hyprland' +pkgname=hyprland +version=0.38.0 +revision=1 +build_style=cmake +hostmakedepends="cpio glslang hwids jq meson + ninja pkg-config wayland-devel" +makedepends="cairo-devel hyprcursor hyprlang libdisplay-info-devel + libdrm-devel libgbm-devel libglvnd-devel libinput-devel libliftoff-devel + libseat-devel libxcb-devel libxkbcommon-devel pango-devel tomlplusplus + wayland-devel wayland-protocols xcb-util-errors-devel + xcb-util-renderutil-devel xcb-util-wm-devel 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/archive/refs/tags/v${version}.tar.gz" +checksum=da143e1d685b8d7f4a8b79142ad7030ebdb4e0d65a210accd934f421e7f9f4d6 + +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() { + # license + 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*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland + + pushd subprojects/wlroots/include + find . -name '*.h*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland/wlroots + popd + + pushd subprojects/wlroots/build/include + find . -name '*.h*' -print0 | cpio --quiet -0dump ${DESTDIR}/usr/include/hyprland/wlroots + popd + + vinstall build/hyprland.pc 644 usr/share/pkgconfig + install -Dm0644 protocols/*-protocol.h ${DESTDIR}/usr/include/hyprland/protocols + +} + +hyprland-devel_package() { + depends="${sourcepkg}>=${version}_${revision} ${hostmakedepends} ${makedepends}" + short_desc="Dynamic tiling Wayland compositor - development files" + pkg_install() { + vmove usr/include + vmove usr/share/pkgconfig + } +}