Update patches

This commit is contained in:
alan (NyxTrail) 2024-09-22 12:24:55 +00:00
parent b30531e302
commit 5ff1ae540a
No known key found for this signature in database
GPG Key ID: 32C5D29762C48D4A
4 changed files with 73 additions and 86 deletions

View File

@ -3,43 +3,45 @@ Description: Use system version of udis86
which the binaries are built. We will instead build against
the Debian version of the library.
Author: Alan M Varghese <alan@digistorm.in>
Last-Update: 2024-05-15
Last-Update: 2024-09-22
Forwarded: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
@@ -26,7 +26,7 @@
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
# udis
-add_subdirectory("subprojects/udis86")
+# add_subdirectory("subprojects/udis86")
# wlroots
message(STATUS "Setting up wlroots")
@@ -86,7 +86,7 @@
"src/"
"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)
@@ -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.5
+ udis86
)
if(CMAKE_BUILD_TYPE)
string(TOLOWER ${CMAKE_BUILD_TYPE} BUILDTYPE_LOWER)
@@ -63,7 +63,7 @@
message(STATUS "Configuring Hyprland in Release with CMake")
endif()
-include_directories(. "src/" "subprojects/udis86/" "protocols/")
+include_directories(. "src/" "protocols/")
set(CMAKE_CXX_STANDARD 26)
add_compile_options(
-Wall
@@ -111,7 +111,8 @@
gio-2.0
hyprlang>=0.3.2
hyprcursor>=0.1.7
- hyprutils>=0.2.1)
+ hyprutils>=0.2.1
+ udis86)
find_package(hyprwayland-scanner 0.3.10 REQUIRED)
@@ -270,7 +271,7 @@
OpenGL::EGL
OpenGL::GL
Threads::Threads
- libudis86
+ udis86
uuid
)
@@ -256,7 +257,7 @@
endfunction()
target_link_libraries(Hyprland OpenGL::EGL OpenGL::GL Threads::Threads
- libudis86)
+ udis86)
protocolnew("subprojects/hyprland-protocols/protocols"
"hyprland-global-shortcuts-v1" true)

View File

@ -2,57 +2,43 @@ Description: Use system version of hyprland-protocols
Hyprland sources include a copy of hyprland-protocols. We will,
instead, use the system version of this package.
Author: Alan M Varghese <alan@digistorm.in>
Last-Update: 2024-06-15
Last-Update: 2024-09-22
Forwarded: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,7 +221,13 @@
@@ -229,6 +229,13 @@
function(protocolnew protoPath protoName external)
if(external)
set(path ${CMAKE_SOURCE_DIR}/${protoPath})
+ string(FIND ${protoPath} "/usr/share" protocol_found)
+ if(protocol_found EQUAL 0)
+ message(STATUS "Protocol found under /usr.")
+ set(path ${protoPath})
+ else()
+ set(path ${CMAKE_SOURCE_DIR}/${protoPath})
+ endif()
else()
set(path ${WAYLAND_PROTOCOLS_DIR}/${protoPath})
endif()
@@ -259,10 +266,10 @@
target_link_libraries(Hyprland OpenGL::EGL OpenGL::GL Threads::Threads
udis86)
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("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)
-protocolnew("subprojects/hyprland-protocols/protocols"
+protocolnew("/usr/share/hyprland-protocols/protocols"
"hyprland-global-shortcuts-v1" true)
protocolnew("unstable/text-input" "text-input-unstable-v1" false)
-protocolnew("subprojects/hyprland-protocols/protocols"
+protocolnew("/usr/share/hyprland-protocols/protocols"
"hyprland-toplevel-export-v1" true)
protocolnew("protocols" "wlr-screencopy-unstable-v1" true)
protocolnew("protocols" "wlr-gamma-control-unstable-v1" true)
@@ -274,7 +281,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"
+protocolnew("/usr/share/hyprland-protocols/protocols" "hyprland-focus-grab-v1"
true)
protocolnew("protocols" "wlr-layer-shell-unstable-v1" true)
protocolnew("protocols" "wayland-drm" true)

View File

@ -3,16 +3,16 @@ Description: Add FORTIFY_SOURCE flag directly in Makefile
modules built by the project. Use 'checksec' and 'hardening-check'
for verifying fortification on binaries.
Author: Alan M Varghese
Last-Update: 2024-06-20
Last-Update: 2024-09-22
Forwarded: not-needed
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,7 +92,7 @@
add_compile_definitions(WLR_USE_UNSTABLE)
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value
-Wno-missing-field-initializers -Wno-narrowing -Wno-pointer-arith
- -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=)
+ -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/= -D_FORTIFY_SOURCE=2)
@@ -73,7 +73,7 @@
-Wno-missing-field-initializers
-Wno-narrowing
-Wno-pointer-arith
- -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=)
+ -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/= -D_FORTIFY_SOURCE=2)
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

View File

@ -1,5 +1,4 @@
001-use-bash-in-makefile.patch
002-use-system-udis86.patch
003-use-system-hyprland-protocols.patch
004-fix-hyprland-symlink.patch
005-add-fortify-flags-for-subprojects.patch