From 5d47307fb8608a52b720533fe8bd7150e79958ed Mon Sep 17 00:00:00 2001 From: Qianqiang Liu Date: Mon, 25 Aug 2025 17:06:47 +0800 Subject: [PATCH] updated the version of hyprland to v0.50.1 Signed-off-by: Qianqiang Liu --- assets/0001-fix-hyprland-compile-issue.patch | 26 ++++++++++++++++++++ install-scripts/hyprland.sh | 9 ++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 assets/0001-fix-hyprland-compile-issue.patch diff --git a/assets/0001-fix-hyprland-compile-issue.patch b/assets/0001-fix-hyprland-compile-issue.patch new file mode 100644 index 0000000..57fc791 --- /dev/null +++ b/assets/0001-fix-hyprland-compile-issue.patch @@ -0,0 +1,26 @@ +diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp +index daf8d4a8..62ab8578 100644 +--- a/hyprctl/main.cpp ++++ b/hyprctl/main.cpp +@@ -268,7 +268,7 @@ int requestIPC(std::string_view filename, std::string_view arg) { + sockaddr_un serverAddress = {0}; + serverAddress.sun_family = AF_UNIX; + +- std::string socketPath = getRuntimeDir() + "/" + instanceSignature + "/" + filename; ++ std::string socketPath = getRuntimeDir() + "/" + std::string(instanceSignature) + "/" + std::string(filename); + + strncpy(serverAddress.sun_path, socketPath.c_str(), sizeof(serverAddress.sun_path) - 1); + +diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp +index 4e5c4080..1944f22e 100644 +--- a/src/helpers/Monitor.cpp ++++ b/src/helpers/Monitor.cpp +@@ -549,7 +549,7 @@ bool CMonitor::applyMonitorRule(SMonitorRule* pMonitorRule, bool force) { + std::ranges::sort(sortedModes, sortFunc); + if (sortedModes.size() > 3) + sortedModes.erase(sortedModes.begin() + 3, sortedModes.end()); +- requestedModes.insert_range(requestedModes.end(), sortedModes | std::views::reverse); ++ requestedModes.insert(requestedModes.end(), sortedModes.rbegin(), sortedModes.rend()); + }; + + // last fallback is always preferred mode diff --git a/install-scripts/hyprland.sh b/install-scripts/hyprland.sh index 6339c89..88c99af 100755 --- a/install-scripts/hyprland.sh +++ b/install-scripts/hyprland.sh @@ -3,9 +3,11 @@ # Main Hyprland Package# #specific branch or release -tag="v0.49.0" +tag="v0.50.1" hyprland=( + clang + llvm libxcb-errors-dev libre2-dev libglaze-dev @@ -65,7 +67,8 @@ fi if git clone --recursive -b $tag "https://github.com/hyprwm/Hyprland"; then cd "Hyprland" || exit 1 - make all + patch -p1 < ../assets/0001-fix-hyprland-compile-issue.patch + CXX=clang++ CXXFLAGS=-std=gnu++26 make all if sudo make install 2>&1 | tee -a "$MLOG"; then printf "${OK} ${MAGENTA}Hyprland tag${RESET} installed successfully.\n" 2>&1 | tee -a "$MLOG" else @@ -77,4 +80,4 @@ else echo -e "${ERROR} Download failed for ${YELLOW}Hyprland $tag${RESET}" 2>&1 | tee -a "$LOG" fi -printf "\n%.0s" {1..2} \ No newline at end of file +printf "\n%.0s" {1..2}