Still fixing hyprwire build errors

On branch development
 Your branch is up to date with 'origin/development'.

 Changes to be committed:
	modified:   hyprwire.sh
This commit is contained in:
Don Williams 2025-12-29 12:00:53 -05:00
parent ef0224a2b6
commit 89a837d3c7

View File

@ -47,12 +47,12 @@ if git clone --recursive -b "$tag" https://github.com/hyprwm/hyprwire.git; then
cat > append_range_compat.hpp <<'EOF' cat > append_range_compat.hpp <<'EOF'
#pragma once #pragma once
#include <iterator> #include <iterator>
#define APPEND_RANGE(vec, rng) (vec).insert((vec).end(), std::begin((rng)), std::end((rng))) #define APPEND_RANGE(vec, ...) (vec).insert((vec).end(), std::begin(__VA_ARGS__), std::end(__VA_ARGS__))
EOF EOF
# Replace X.append_range(Y) -> APPEND_RANGE(X, Y) # Replace X.append_range(Y) -> APPEND_RANGE(X, Y)
git ls-files '*.cpp' | xargs sed -ri 's/([A-Za-z_][A-Za-z0-9_]*)\.append_range\(/APPEND_RANGE(\1, /g' git ls-files | grep -E '\\.(c|cc|cpp|cxx|h|hh|hpp)$' | xargs sed -ri 's/([A-Za-z_][A-Za-z0-9_]*)\.append_range\(/APPEND_RANGE(\1, /g'
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_FLAGS="-include ${PWD}/append_range_compat.hpp" cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_FLAGS="-include ${PWD}/append_range_compat.hpp"
cmake --build build -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" cmake --build build -j "$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)"
if [ $DO_INSTALL -eq 1 ]; then if [ $DO_INSTALL -eq 1 ]; then
if sudo cmake --install build 2>&1 | tee -a "$MLOG" ; then if sudo cmake --install build 2>&1 | tee -a "$MLOG" ; then