diff --git a/hypr-tags.env b/hypr-tags.env index 28fade9..6757bbe 100644 --- a/hypr-tags.env +++ b/hypr-tags.env @@ -11,4 +11,4 @@ HYPRWAYLAND_SCANNER_TAG=v0.4.5 HYPRLAND_PROTOCOLS_TAG=v0.6.4 HYPRLAND_QT_SUPPORT_TAG=v0.1.0 HYPRLAND_QTUTILS_TAG=v0.1.4 -WAYLAND_PROTOCOLS_TAG=1.46 +WAYLAND_PROTOCOLS_TAG=1.45 diff --git a/install-scripts/wayland-protocols-src.sh b/install-scripts/wayland-protocols-src.sh index cc9c979..f48f09d 100644 --- a/install-scripts/wayland-protocols-src.sh +++ b/install-scripts/wayland-protocols-src.sh @@ -4,7 +4,7 @@ # Provides a newer wayland-protocols.pc for pkg-config when distro version is too old #specific tag or release (e.g., 1.45, 1.46) -tag="1.46" +tag="1.45" # Allow environment override if [ -n "${WAYLAND_PROTOCOLS_TAG:-}" ]; then tag="$WAYLAND_PROTOCOLS_TAG"; fi @@ -42,8 +42,25 @@ fi # Clone and build (meson) # Upstream: https://gitlab.freedesktop.org/wayland/wayland-protocols.git printf "${INFO} Installing ${YELLOW}wayland-protocols $tag${RESET} ...\n" -if git clone --depth=1 -b "$tag" https://gitlab.freedesktop.org/wayland/wayland-protocols.git; then +repo_url="https://gitlab.freedesktop.org/wayland/wayland-protocols.git" +if git clone --depth=1 --filter=blob:none "$repo_url" wayland-protocols; then cd wayland-protocols || exit 1 + # Fetch tags and attempt to checkout the requested tag, trying both raw and v-prefixed + git fetch --tags --depth=1 >/dev/null 2>&1 || true + checked_out=0 + for candidate in "$tag" "v$tag"; do + if git rev-parse -q --verify "refs/tags/$candidate" >/dev/null; then + git checkout -q "refs/tags/$candidate" + checked_out=1 + break + fi + done + if [ "$checked_out" -ne 1 ]; then + echo "${ERROR} Tag $tag not found in $repo_url" | tee -a "$LOG" + echo "${NOTE} Available tags (truncated):" | tee -a "$LOG" + git tag --list | tail -n 20 | tee -a "$LOG" || true + exit 1 + fi # Install to /usr/local so pkg-config can prefer it over distro /usr meson setup build --prefix=/usr/local meson compile -C build -j"$(nproc 2>/dev/null || getconf _NPROCESSORS_CONF)" diff --git a/update-hyprland.sh b/update-hyprland.sh index 5328467..94e10ef 100644 --- a/update-hyprland.sh +++ b/update-hyprland.sh @@ -196,7 +196,7 @@ run_stack() { # shellcheck disable=SC1090 source "$TAGS_FILE" # Export tags so child scripts inherit them - export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG +export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG # Optionally install dependencies (not dry-run) if [[ $WITH_DEPS -eq 1 ]]; then @@ -369,7 +369,7 @@ if [[ $VIA_HELPER -eq 1 ]]; then fi # shellcheck disable=SC1090 source "$TAGS_FILE" - export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG +export HYPRLAND_TAG AQUAMARINE_TAG HYPRUTILS_TAG HYPRLANG_TAG HYPRGRAPHICS_TAG HYPRWAYLAND_SCANNER_TAG HYPRLAND_PROTOCOLS_TAG HYPRLAND_QT_SUPPORT_TAG HYPRLAND_QTUTILS_TAG WAYLAND_PROTOCOLS_TAG helper="$REPO_ROOT/dry-run-build.sh" if [[ ! -x "$helper" ]]; then echo "[ERROR] dry-run-build.sh not found or not executable at $helper" | tee -a "$SUMMARY_LOG"