summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian POIDEVIN2023-05-14 19:40:45 +0200
committerJulian POIDEVIN2023-05-14 19:40:45 +0200
commit78ad0f3cb422239199feb7dbf1afe96886b825fa (patch)
treea235ee89b25b7c172179c2efc65f6a6b0ad8d0ef
downloadaur-78ad0f3cb422239199feb7dbf1afe96886b825fa.tar.gz
feat: initial AUR release
-rw-r--r--.SRCINFO58
-rw-r--r--.gitignore5
-rwxr-xr-xPKGBUILD87
-rw-r--r--displaylink.patch64
4 files changed, 214 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5ffa7a5dbb80
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,58 @@
+pkgbase = hyprland-displaylink-git
+ pkgdesc = A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (DisplayLink patch)
+ pkgver = 0.25.0
+ pkgrel = 1
+ url = https://github.com/hyprwm/Hyprland
+ arch = any
+ license = BSD
+ makedepends = git
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = gcc
+ makedepends = gdb
+ makedepends = meson
+ makedepends = vulkan-headers
+ makedepends = wayland-protocols
+ makedepends = xorgproto
+ depends = libxcb
+ depends = xcb-proto
+ depends = xcb-util
+ depends = xcb-util-keysyms
+ depends = libxfixes
+ depends = libx11
+ depends = libxcomposite
+ depends = xorg-xinput
+ depends = libxrender
+ depends = pixman
+ depends = wayland-protocols
+ depends = cairo
+ depends = pango
+ depends = polkit
+ depends = glslang
+ depends = libinput
+ depends = libxcb
+ depends = libxkbcommon
+ depends = opengl-driver
+ depends = pixman
+ depends = wayland
+ depends = xcb-util-errors
+ depends = xcb-util-renderutil
+ depends = xcb-util-wm
+ depends = seatd
+ depends = vulkan-icd-loader
+ depends = vulkan-validation-layers
+ depends = xorg-xwayland
+ depends = libliftoff
+ depends = libdisplay-info
+ provides = hyprland
+ conflicts = hyprland
+ conflicts = hyprland-git
+ options = !makeflags
+ options = !buildflags
+ options = !strip
+ source = hyprland-displaylink-git-0.25.0.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v0.25.0/source-v0.25.0.tar.gz
+ source = displaylink.patch
+ sha256sums = 0d43297469268457311a916ea3c40bed602c8c8957db81cf862d74c3d5ffbe6b
+ sha256sums = 444bcd0f95ea7955a02da1a99481f33da6f7a4c4d0e6b06d3c3bda8133671484
+
+pkgname = hyprland-displaylink-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..601a9cae3fb0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
+!displaylink.patch \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..585f5c2ae596
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,87 @@
+# Maintainer: Julian Poidevin <poidevin dot julian at gmail dot com>
+
+_pkgname="hyprland"
+pkgname="${_pkgname}-displaylink-git"
+pkgver="0.25.0"
+pkgrel=1
+pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (DisplayLink patch)"
+arch=(any)
+url="https://github.com/hyprwm/Hyprland"
+license=('BSD')
+depends=(
+ libxcb
+ xcb-proto
+ xcb-util
+ xcb-util-keysyms
+ libxfixes
+ libx11
+ libxcomposite
+ xorg-xinput
+ libxrender
+ pixman
+ wayland-protocols
+ cairo
+ pango
+ polkit
+ glslang
+ libinput
+ libxcb
+ libxkbcommon
+ opengl-driver
+ pixman
+ wayland
+ xcb-util-errors
+ xcb-util-renderutil
+ xcb-util-wm
+ seatd
+ vulkan-icd-loader
+ vulkan-validation-layers
+ xorg-xwayland
+ libliftoff
+ libdisplay-info)
+makedepends=(
+ git
+ cmake
+ ninja
+ gcc
+ gdb
+ meson
+ vulkan-headers
+ wayland-protocols
+ xorgproto)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v${pkgver}/source-v${pkgver}.tar.gz"
+ "displaylink.patch")
+conflicts=("${_pkgname}" "${_pkgname}"-git)
+provides=(hyprland)
+sha256sums=('0d43297469268457311a916ea3c40bed602c8c8957db81cf862d74c3d5ffbe6b'
+ '444bcd0f95ea7955a02da1a99481f33da6f7a4c4d0e6b06d3c3bda8133671484')
+options=(!makeflags !buildflags !strip)
+
+prepare() {
+ cd "$srcdir/hyprland-source"
+ patch --directory="$srcdir/hyprland-source/subprojects/wlroots/" --forward --strip=0 \
+ --input="${srcdir}/displaylink.patch"
+}
+
+build() {
+ cd "$srcdir/hyprland-source"
+ make fixwlr
+ 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 ..
+}
+
+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}"
+ install -Dm755 "${srcdir}/tmpwlr/lib/libwlroots.so.12032" -t "${pkgdir}/usr/lib"
+}
diff --git a/displaylink.patch b/displaylink.patch
new file mode 100644
index 000000000000..e0327cb7f477
--- /dev/null
+++ b/displaylink.patch
@@ -0,0 +1,64 @@
+diff --unified --recursive --text hyprland-test/src/hyprland-source/subprojects/wlroots/render/egl.c hyprland-git/src/hyprland-source/subprojects/wlroots/render/egl.c
+--- render/egl.c 2023-05-14 11:18:56.598893482 +1000
++++ render/egl.c 2022-10-23 11:16:25.923036282 +1000
+@@ -492,25 +492,41 @@
+ }
+
+ static int open_render_node(int drm_fd) {
+- char *render_name = drmGetRenderDeviceNameFromFd(drm_fd);
+- if (render_name == NULL) {
+- // This can happen on split render/display platforms, fallback to
+- // primary node
+- render_name = drmGetPrimaryDeviceNameFromFd(drm_fd);
+- if (render_name == NULL) {
+- wlr_log_errno(WLR_ERROR, "drmGetPrimaryDeviceNameFromFd failed");
+- return -1;
+- }
+- wlr_log(WLR_DEBUG, "DRM device '%s' has no render node, "
+- "falling back to primary node", render_name);
+- }
+-
+- int render_fd = open(render_name, O_RDWR | O_CLOEXEC);
+- if (render_fd < 0) {
+- wlr_log_errno(WLR_ERROR, "Failed to open DRM node '%s'", render_name);
+- }
+- free(render_name);
+- return render_fd;
++ char* render_name = drmGetRenderDeviceNameFromFd(drm_fd);
++ if (render_name == NULL) {
++ // This can happen on split render/display platforms, fallback to
++ // primary node
++ render_name = drmGetPrimaryDeviceNameFromFd(drm_fd);
++ if (render_name == NULL) {
++ wlr_log_errno(WLR_ERROR, "drmGetPrimaryDeviceNameFromFd failed");
++ return -1;
++ }
++ wlr_log(WLR_DEBUG,
++ "DRM device '%s' has no render node, "
++ "falling back to primary node",
++ render_name);
++
++ drmVersion* render_version = drmGetVersion(drm_fd);
++ if (render_version != NULL && render_version->name != NULL) {
++ wlr_log(WLR_DEBUG, "DRM device version.name '%s'", render_version->name);
++ if (strcmp(render_version->name, "evdi") == 0) {
++ free(render_name);
++ render_name = malloc(sizeof(char) * 15);
++ strcpy(render_name, "/dev/dri/card0");
++ }
++
++ drmFreeVersion(render_version);
++ }
++ }
++
++ wlr_log(WLR_DEBUG, "open_render_node() DRM device '%s'", render_name);
++
++ int render_fd = open(render_name, O_RDWR | O_CLOEXEC);
++ if (render_fd < 0) {
++ wlr_log_errno(WLR_ERROR, "Failed to open DRM node '%s'", render_name);
++ }
++ free(render_name);
++ return render_fd;
+ }
+
+ struct wlr_egl *wlr_egl_create_with_drm_fd(int drm_fd) {