mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2026-02-05 17:50:14 +01:00
Compare commits
No commits in common. "0bdf84c9192e5ab035d006a45c12dc319eaedbab" and "370f7de9e4bdaf0587476edf9718f5f5e5c55a3e" have entirely different histories.
0bdf84c919
...
370f7de9e4
@ -129,29 +129,27 @@ EOF
|
|||||||
# By default, build Hyprland with bundled hyprutils/hyprlang to avoid version mismatches
|
# By default, build Hyprland with bundled hyprutils/hyprlang to avoid version mismatches
|
||||||
# You can force system libs by exporting USE_SYSTEM_HYPRLIBS=1 before running this script.
|
# You can force system libs by exporting USE_SYSTEM_HYPRLIBS=1 before running this script.
|
||||||
USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-1}
|
USE_SYSTEM=${USE_SYSTEM_HYPRLIBS:-1}
|
||||||
if [ "$USE_SYSTEM" = "1" ]; then
|
if [ "$USE_SYSTEM" = "1" ]; then
|
||||||
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:${PKG_CONFIG_PATH:-}"
|
||||||
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
export CMAKE_PREFIX_PATH="/usr/local:${CMAKE_PREFIX_PATH:-}"
|
||||||
SYSTEM_FLAGS=(
|
SYSTEM_FLAGS=(
|
||||||
"-DUSE_SYSTEM_HYPRUTILS=ON"
|
"-DUSE_SYSTEM_HYPRUTILS=ON"
|
||||||
"-DUSE_SYSTEM_HYPRLANG=ON"
|
"-DUSE_SYSTEM_HYPRLANG=ON"
|
||||||
"-DUSE_SYSTEM_HYPRWIRE=ON"
|
"-DUSE_SYSTEM_HYPRWIRE=ON"
|
||||||
)
|
)
|
||||||
# Optional preflight: verify hyprwire is discoverable by CMake/pkg-config
|
# Optional preflight: verify hyprwire is discoverable by CMake/pkg-config
|
||||||
if [ ! -e "/usr/local/lib/cmake/Hyprwire/HyprwireConfig.cmake" ] && ! pkg-config --exists hyprwire 2>/dev/null; then
|
if [ ! -e "/usr/local/lib/cmake/Hyprwire/HyprwireConfig.cmake" ] && ! pkg-config --exists hyprwire 2>/dev/null; then
|
||||||
echo "${NOTE} hyprwire not detected in /usr/local yet. Ensure install-scripts/hyprwire.sh ran successfully or set USE_SYSTEM_HYPRLIBS=0 to use subprojects."
|
echo "${NOTE} hyprwire not detected in /usr/local yet. Ensure install-scripts/hyprwire.sh ran successfully or set USE_SYSTEM_HYPRLIBS=0 to use subprojects."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Ensure we do not accidentally pick up mismatched system headers
|
||||||
|
unset PKG_CONFIG_PATH || true
|
||||||
|
SYSTEM_FLAGS=(
|
||||||
|
"-DUSE_SYSTEM_HYPRUTILS=OFF"
|
||||||
|
"-DUSE_SYSTEM_HYPRLANG=OFF"
|
||||||
|
"-DUSE_SYSTEM_HYPRWIRE=OFF"
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
# Ensure we do not accidentally pick up mismatched system headers
|
|
||||||
unset PKG_CONFIG_PATH || true
|
|
||||||
SYSTEM_FLAGS=(
|
|
||||||
"-DUSE_SYSTEM_HYPRUTILS=OFF"
|
|
||||||
"-DUSE_SYSTEM_HYPRLANG=OFF"
|
|
||||||
"-DUSE_SYSTEM_HYPRWIRE=OFF"
|
|
||||||
"-DBUILD_HYPRCTL=OFF"
|
|
||||||
"-DINSTALL_HYPRCTL=OFF"
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure submodules are present when building bundled deps
|
# Make sure submodules are present when building bundled deps
|
||||||
git submodule update --init --recursive || true
|
git submodule update --init --recursive || true
|
||||||
|
|||||||
@ -56,8 +56,6 @@ RESTORE=0
|
|||||||
VIA_HELPER=0
|
VIA_HELPER=0
|
||||||
NO_FETCH=0
|
NO_FETCH=0
|
||||||
USE_SYSTEM_LIBS=1
|
USE_SYSTEM_LIBS=1
|
||||||
AUTO_FALLBACK=0
|
|
||||||
MINIMAL=0
|
|
||||||
ONLY_LIST=""
|
ONLY_LIST=""
|
||||||
SKIP_LIST=""
|
SKIP_LIST=""
|
||||||
SET_ARGS=()
|
SET_ARGS=()
|
||||||
@ -249,21 +247,7 @@ run_stack() {
|
|||||||
if [[ -n "$ONLY_LIST" ]]; then
|
if [[ -n "$ONLY_LIST" ]]; then
|
||||||
IFS=',' read -r -a modules <<<"$ONLY_LIST"
|
IFS=',' read -r -a modules <<<"$ONLY_LIST"
|
||||||
else
|
else
|
||||||
if [[ $MINIMAL -eq 1 ]]; then
|
modules=("${DEFAULT_MODULES[@]}")
|
||||||
modules=(
|
|
||||||
wayland-protocols-src
|
|
||||||
hyprland-protocols
|
|
||||||
hyprutils
|
|
||||||
hyprlang
|
|
||||||
aquamarine
|
|
||||||
hyprgraphics
|
|
||||||
hyprwayland-scanner
|
|
||||||
hyprwire
|
|
||||||
hyprland
|
|
||||||
)
|
|
||||||
else
|
|
||||||
modules=("${DEFAULT_MODULES[@]}")
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
if [[ -n "$SKIP_LIST" ]]; then
|
if [[ -n "$SKIP_LIST" ]]; then
|
||||||
IFS=',' read -r -a _skips <<<"$SKIP_LIST"
|
IFS=',' read -r -a _skips <<<"$SKIP_LIST"
|
||||||
@ -306,20 +290,6 @@ run_stack() {
|
|||||||
[[ "$m" == "hyprlang" ]] && has_lang=1
|
[[ "$m" == "hyprlang" ]] && has_lang=1
|
||||||
done
|
done
|
||||||
if [[ $has_hl -eq 1 ]]; then
|
if [[ $has_hl -eq 1 ]]; then
|
||||||
# When using system libs, ensure required libs will be built if missing/outdated
|
|
||||||
if [[ $USE_SYSTEM_LIBS -eq 1 ]]; then
|
|
||||||
if ! pkg-config --exists hyprwire 2>/dev/null; then
|
|
||||||
modules=("hyprwire" "${modules[@]}")
|
|
||||||
fi
|
|
||||||
req_utils_ver="0.11.0"
|
|
||||||
have_utils_ver=$(pkg-config --modversion hyprutils 2>/dev/null || echo "")
|
|
||||||
if [[ -z "$have_utils_ver" ]] || [[ "$(printf '%s\n' "$req_utils_ver" "$have_utils_ver" | sort -V | head -n1)" != "$req_utils_ver" ]]; then
|
|
||||||
modules=("hyprutils" "${modules[@]}")
|
|
||||||
fi
|
|
||||||
if ! pkg-config --exists hyprlang 2>/dev/null; then
|
|
||||||
modules=("hyprlang" "${modules[@]}")
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
# ensure each prerequisite is present
|
# ensure each prerequisite is present
|
||||||
[[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}")
|
[[ $has_wp -eq 0 ]] && modules=("wayland-protocols-src" "${modules[@]}")
|
||||||
[[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}")
|
[[ $has_hlprot -eq 0 ]] && modules=("hyprland-protocols" "${modules[@]}")
|
||||||
@ -513,14 +483,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
USE_SYSTEM_LIBS=1
|
USE_SYSTEM_LIBS=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--auto)
|
|
||||||
AUTO_FALLBACK=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--minimal)
|
|
||||||
MINIMAL=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--skip)
|
--skip)
|
||||||
SKIP_LIST=${2:-}
|
SKIP_LIST=${2:-}
|
||||||
shift 2
|
shift 2
|
||||||
@ -593,19 +555,4 @@ if [[ $VIA_HELPER -eq 1 ]]; then
|
|||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if run_stack; then
|
run_stack
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
rc=$?
|
|
||||||
if [[ $AUTO_FALLBACK -eq 1 && $USE_SYSTEM_LIBS -eq 1 ]]; then
|
|
||||||
echo "[WARN] Build failed with system libs. Retrying with bundled subprojects..." | tee -a "$SUMMARY_LOG"
|
|
||||||
USE_SYSTEM_LIBS=0
|
|
||||||
if run_stack; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit $rc
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user