summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.SRCINFO9
-rwxr-xr-xPKGBUILD81
2 files changed, 57 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d1198334fb88..15812c8d2a7e 100755
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = hyprland-nvidia
pkgdesc = A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA patch)
pkgver = 0.31.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/hyprwm/Hyprland
arch = any
license = BSD
@@ -44,14 +44,9 @@ pkgbase = hyprland-nvidia
depends = xorg-xwayland
depends = libliftoff
depends = libdisplay-info
- provides = hyprland
+ provides = hyprland=0.31.0
conflicts = hyprland
- options = !makeflags
- options = !buildflags
- options = !strip
source = hyprland-nvidia-0.31.0.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v0.31.0/source-v0.31.0.tar.gz
- source = nvidia.patch
sha256sums = 863bf5ba1051f223a30efeb0160846784e9b68266d95c7a1c8bac36b19122536
- sha256sums = 10223a97a622ea7e641b4305a9a4f7bf0cb0526dacfbfa5970171558b3a63488
pkgname = hyprland-nvidia
diff --git a/PKGBUILD b/PKGBUILD
index 7493ec2985c0..07f8b181b847 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
_pkgname="hyprland"
pkgname="${_pkgname}-nvidia"
pkgver="0.31.0"
-pkgrel=1
+pkgrel=2
pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA patch)"
arch=(any)
url="https://github.com/hyprwm/Hyprland"
@@ -37,7 +37,7 @@ depends=(
vulkan-icd-loader
vulkan-validation-layers
xorg-xwayland
- libliftoff
+ libliftoff
libdisplay-info)
makedepends=(
git
@@ -49,35 +49,64 @@ makedepends=(
vulkan-headers
wayland-protocols
xorgproto)
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v${pkgver}/source-v${pkgver}.tar.gz"
- "nvidia.patch")
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v${pkgver}/source-v${pkgver}.tar.gz")
conflicts=("${_pkgname}")
-provides=(hyprland)
-sha256sums=('863bf5ba1051f223a30efeb0160846784e9b68266d95c7a1c8bac36b19122536'
- '10223a97a622ea7e641b4305a9a4f7bf0cb0526dacfbfa5970171558b3a63488')
-options=(!makeflags !buildflags !strip)
+provides=("${_pkgname}=${pkgver}")
+sha256sums=('863bf5ba1051f223a30efeb0160846784e9b68266d95c7a1c8bac36b19122536')
+
+prepare() {
+ cd "$srcdir/hyprland-source"
+ sed -E -i -e 's/(soversion = 12)([^032]|$$)/soversion = 12032/g' ./subprojects/wlroots/meson.build
+ rm -rf ./subprojects/wlroots/build
+ sed -i -e '/^release:/{n;s/-D/-DCMAKE_SKIP_RPATH=ON -D/}' Makefile
+ cd "$srcdir/hyprland-source/subprojects/wlroots"
+ patch -Np1 <"$srcdir/hyprland-source/nix/patches/wlroots-nvidia.patch"
+}
build() {
+ # Build wlroots
+ cd "$srcdir/hyprland-source/subprojects/wlroots"
+ meson build/ --prefix="$srcdir/tmpwlr" --buildtype=release
+ ninja -C build/
+ mkdir -p "$srcdir/tmpwlr"
+ ninja -C build/ install
+
+ # Build udis86
+ cd "$srcdir/hyprland-source/subprojects/udis86"
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -G Ninja
+ cmake --build build --config Release --target all
+
+ # Build hyprland
cd "$srcdir/hyprland-source"
- patch --directory="$srcdir/hyprland-source/subprojects/wlroots/" --forward --strip=0 \
- --input="${srcdir}/nvidia.patch"
- cd "./subprojects/wlroots/" && meson build/ --prefix="${srcdir}/tmpwlr" --buildtype=release && ninja -C build/ && mkdir -p "${srcdir}/tmpwlr" && ninja -C build/ install && cd ../
- cd udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../..
- make protocols
- make release
- cd ./hyprctl && make all && cd ..
+ make all
+ make -C hyprctl all
}
package() {
- cd "$srcdir"
- mkdir -p "${pkgdir}/usr/share/wayland-sessions"
- mkdir -p "${pkgdir}/usr/share/hyprland"
- install -Dm755 hyprland-source/build/Hyprland -t "${pkgdir}/usr/bin"
- install -Dm755 hyprland-source/hyprctl/hyprctl -t "${pkgdir}/usr/bin"
- install -Dm644 hyprland-source/assets/*.png -t "${pkgdir}/usr/share/hyprland"
- install -Dm644 hyprland-source/example/hyprland.desktop -t "${pkgdir}/usr/share/wayland-sessions"
- install -Dm644 hyprland-source/example/hyprland.conf -t "${pkgdir}/usr/share/hyprland"
- install -Dm644 hyprland-source/LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}"
- mv "${srcdir}/tmpwlr/lib/libwlroots.so.12" "${srcdir}/tmpwlr/lib/libwlroots.so.12032".
- #install -Dm755 "${srcdir}/tmpwlr/lib/libwlroots.so.12032" -t "${pkgdir}/usr/lib"
+ # Install hyprland headers
+ cd "$srcdir/hyprland-source"
+ find src -name '*.hpp' -exec install -Dm644 {} "$pkgdir/usr/include/hyprland/{}" \;
+
+ # Fix $srcdir reference
+ sed -i -e "/ICONDIR/ s,$srcdir/tmpwlr,/usr," "$srcdir/hyprland-source/subprojects/wlroots/build/include/config.h"
+
+ # Install wlroots headers
+ cd "$srcdir/hyprland-source/subprojects/wlroots/include"
+ find . -name '*.h' -exec install -Dm644 {} "$pkgdir/usr/include/hyprland/wlroots/{}" \;
+ cd "$srcdir/hyprland-source/subprojects/wlroots/build/include"
+ find . -name '*.h' -exec install -Dm644 {} "$pkgdir/usr/include/hyprland/wlroots/{}" \;
+
+ # Install hyprland
+ cd "$srcdir/hyprland-source/build"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
+ cd "$srcdir/hyprland-source"
+ install -Dm755 -t "$pkgdir/usr/bin" build/Hyprland
+ install -Dm755 -t "$pkgdir/usr/bin" hyprctl/hyprctl
+ install -Dm644 -t "$pkgdir/usr/include/hyprland/protocols" protocols/*-protocol.h
+ install -Dm644 -t "$pkgdir/usr/share/hyprland" assets/*.png
+ install -Dm644 -t "$pkgdir/usr/share/hyprland" example/hyprland.conf
+ install -Dm644 -t "$pkgdir/usr/share/licenses/hyprland" LICENSE
+ install -Dm644 -t "$pkgdir/usr/share/pkgconfig" build/hyprland.pc
+ install -Dm644 -t "$pkgdir/usr/share/wayland-sessions" example/hyprland.desktop
+ install -Dm755 -t "$pkgdir/usr/lib" "$srcdir/tmpwlr/lib/libwlroots.so.12032"
}