From 2028e8afeacfd4b0a16b77d8072ac70b186ee985 Mon Sep 17 00:00:00 2001 From: "alan (NyxTrail)" Date: Fri, 14 Jun 2024 17:57:06 +0000 Subject: [PATCH] Fix and update patches for new version --- ...move-libwlroots-to-hyprland-location.patch | 36 ------------- ...e.patch => 001-use-bash-in-makefile.patch} | 0 debian/patches/002-use-system-udis86.patch | 38 +++++++------- .../003-use-system-hyprland-protocols.patch | 51 ++++++++++++++++--- debian/patches/series | 4 +- 5 files changed, 65 insertions(+), 64 deletions(-) delete mode 100644 debian/patches/001-move-libwlroots-to-hyprland-location.patch rename debian/patches/{004-use-bash-in-makefile.patch => 001-use-bash-in-makefile.patch} (100%) diff --git a/debian/patches/001-move-libwlroots-to-hyprland-location.patch b/debian/patches/001-move-libwlroots-to-hyprland-location.patch deleted file mode 100644 index 02dac61..0000000 --- a/debian/patches/001-move-libwlroots-to-hyprland-location.patch +++ /dev/null @@ -1,36 +0,0 @@ -Description: Move libwlroots to private directory - Hyprland builds a custom version of wlroots that is based - on the latter's latest commit. This library is placed under - /usr/lib/ which pollutes the shared library space. We will, - instead, install the library to the 'hyprland' directory - under /usr/lib/. This patch is intended to follow the Debian - policies and recommendations as closely as possible while - following Hyprland's requirements to use a specific commit - for wlroots. See discussion below: - https://github.com/hyprwm/Hyprland/issues/648 - https://github.com/hyprwm/Hyprland/issues/302 -Author: Alan M Varghese -Last-Update: 2024-03-01 -Forwarded: not-needed ---- a/Makefile -+++ b/Makefile -@@ -52,8 +52,8 @@ - mkdir -p ${PREFIX}/share/man/man1 - install -m644 ./docs/*.1 ${PREFIX}/share/man/man1 - -- mkdir -p ${PREFIX}/lib/ -- cp ./subprojects/wlroots/build/libwlroots.so.13032 ${PREFIX}/lib/ -+ mkdir -p ${PREFIX}/lib/hyprland -+ cp ./subprojects/wlroots/build/libwlroots.so.13032 ${PREFIX}/lib/hyprland/ - - $(MAKE) installheaders - -@@ -62,7 +62,7 @@ - rm -f ${PREFIX}/bin/hyprland - rm -f ${PREFIX}/bin/hyprctl - rm -f ${PREFIX}/bin/hyprpm -- rm -f ${PREFIX}/lib/libwlroots.so.13032 -+ rm -rf ${PREFIX}/lib/hyprland - rm -rf ${PREFIX}/share/hyprland - rm -f ${PREFIX}/share/man/man1/Hyprland.1 - rm -f ${PREFIX}/share/man/man1/hyprctl.1 diff --git a/debian/patches/004-use-bash-in-makefile.patch b/debian/patches/001-use-bash-in-makefile.patch similarity index 100% rename from debian/patches/004-use-bash-in-makefile.patch rename to debian/patches/001-use-bash-in-makefile.patch diff --git a/debian/patches/002-use-system-udis86.patch b/debian/patches/002-use-system-udis86.patch index c083e8c..66e45f8 100644 --- a/debian/patches/002-use-system-udis86.patch +++ b/debian/patches/002-use-system-udis86.patch @@ -5,41 +5,41 @@ Description: Use system version of udis86 Author: Alan M Varghese Last-Update: 2024-02-02 Forwarded: not-needed + --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -26,9 +26,6 @@ - # - # +@@ -29,7 +29,7 @@ + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) --# udis + # udis -add_subdirectory("subprojects/udis86") -- ++# add_subdirectory("subprojects/udis86") + # wlroots message(STATUS "Setting up wlroots") - -@@ -88,7 +85,6 @@ +@@ -86,7 +86,7 @@ "src/" - "subprojects/wlroots/include/" - "subprojects/wlroots/build/include/" + "subprojects/wlroots-hyprland/include/" + "subprojects/wlroots-hyprland/build/include/" - "subprojects/udis86/" ++ # "subprojects/udis86/" "protocols/") set(CMAKE_CXX_STANDARD 23) add_compile_definitions(WLR_USE_UNSTABLE) -@@ -101,7 +97,7 @@ - find_package(Threads REQUIRED) - find_package(PkgConfig REQUIRED) - find_package(OpenGL REQUIRED) --pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2 hyprcursor) # we do not check for wlroots, as we provide it ourselves -+pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2 hyprcursor udis86) # we do not check for wlroots, as we provide it ourselves +@@ -114,6 +114,7 @@ + cairo pango pangocairo pixman-1 + libdrm libinput hwdata libseat libdisplay-info libliftoff libudev gbm + hyprlang>=0.3.2 hyprcursor>=0.1.7 hyprutils>=0.1.1 ++ udis86 + ) - file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp") - -@@ -225,7 +221,7 @@ + find_package(hyprwayland-scanner 0.3.10 REQUIRED) +@@ -270,7 +271,7 @@ OpenGL::EGL OpenGL::GL Threads::Threads - libudis86 + udis86 + uuid ) - protocol("protocols/idle.xml" "idle" true) diff --git a/debian/patches/003-use-system-hyprland-protocols.patch b/debian/patches/003-use-system-hyprland-protocols.patch index 976cd5a..544640e 100644 --- a/debian/patches/003-use-system-hyprland-protocols.patch +++ b/debian/patches/003-use-system-hyprland-protocols.patch @@ -6,14 +6,53 @@ Last-Update: 2024-02-02 Forwarded: not-needed --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -231,8 +231,8 @@ - protocol("protocols/wlr-layer-shell-unstable-v1.xml" "wlr-layer-shell-unstable-v1" true) - protocol("protocols/wlr-output-power-management-unstable-v1.xml" "wlr-output-power-management-unstable-v1" true) +@@ -221,7 +221,13 @@ + + function(protocol protoPath protoName external) + if (external) +- set(path ${CMAKE_SOURCE_DIR}/${protoPath}) ++ string(FIND ${protoPath} "/usr" debian_patch_found) ++ if(debian_patch_found EQUAL 0) ++ message(STATUS "Debian patch found!!!") ++ set(path ${protoPath}) ++ else() ++ set(path ${CMAKE_SOURCE_DIR}/${protoPath}) ++ endif() + else() + set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath}) + endif() +@@ -242,7 +248,13 @@ + + function(protocolNew protoPath protoName external) + if (external) +- set(path ${CMAKE_SOURCE_DIR}/${protoPath}) ++ string(FIND ${protoPath} "/usr" debian_patch_found) ++ if(debian_patch_found EQUAL 0) ++ message(STATUS "Debian patch found!!!") ++ set(path ${protoPath}) ++ else() ++ set(path ${CMAKE_SOURCE_DIR}/${protoPath}) ++ endif() + else() + set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath}) + endif() +@@ -276,8 +288,8 @@ + ) + protocol("protocols/wlr-screencopy-unstable-v1.xml" "wlr-screencopy-unstable-v1" true) -protocol("subprojects/hyprland-protocols/protocols/hyprland-global-shortcuts-v1.xml" "hyprland-global-shortcuts-v1" true) -protocol("subprojects/hyprland-protocols/protocols/hyprland-toplevel-export-v1.xml" "hyprland-toplevel-export-v1" true) +protocol("/usr/share/hyprland-protocols/protocols/hyprland-global-shortcuts-v1.xml" "hyprland-global-shortcuts-v1" true) +protocol("/usr/share/hyprland-protocols/protocols/hyprland-toplevel-export-v1.xml" "hyprland-toplevel-export-v1" true) - protocol("stable/xdg-shell/xdg-shell.xml" "xdg-shell" false) - protocol("unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml" "linux-dmabuf-unstable-v1" false) - protocol("unstable/xdg-output/xdg-output-unstable-v1.xml" "xdg-output-unstable-v1" false) + protocol("unstable/text-input/text-input-unstable-v1.xml" "text-input-unstable-v1" false) + + protocolNew("protocols" "wlr-gamma-control-unstable-v1" true) +@@ -289,7 +301,7 @@ + protocolNew("protocols" "wlr-output-management-unstable-v1" true) + protocolNew("protocols" "kde-server-decoration" true) + protocolNew("protocols" "wlr-data-control-unstable-v1" true) +-protocolNew("subprojects/hyprland-protocols/protocols" "hyprland-focus-grab-v1" true) ++protocolNew("/usr/share/hyprland-protocols/protocols" "hyprland-focus-grab-v1" true) + protocolNew("protocols" "wlr-layer-shell-unstable-v1" true) + protocolNew("protocols" "wayland-drm" true) + protocolNew("staging/tearing-control" "tearing-control-v1" false) diff --git a/debian/patches/series b/debian/patches/series index 676c921..fff5c88 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,3 @@ -001-move-libwlroots-to-hyprland-location.patch +001-use-bash-in-makefile.patch 002-use-system-udis86.patch 003-use-system-hyprland-protocols.patch -004-use-bash-in-makefile.patch -005-add-fortify-build-flags.patch