vcpkg(mfx-dispatch): rewrite AC_PROG_LIBTOOL → LT_INIT for autotools 1.17+
build-linux / build-linux-x64 (push) Failing after 28s
build-windows / build-windows-x64 (push) Has been cancelled

This commit is contained in:
2026-05-05 14:11:35 +02:00
parent f6753c66cc
commit e087770238
2 changed files with 20 additions and 0 deletions
+6
View File
@@ -79,6 +79,7 @@ export DEBIAN_FRONTEND=noninteractive
apt-get update -qq
apt-get install -y --no-install-recommends \
build-essential clang gcc g++ cmake ninja-build pkg-config nasm yasm \
autoconf automake libtool \
libgtk-3-dev libayatana-appindicator3-dev \
libasound2-dev libpulse-dev libpam0g-dev libssl-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
@@ -173,6 +174,11 @@ chown -R "$SERVICE_USER:$SERVICE_USER" "$FLUTTER_DIR"
chown -R "$SERVICE_USER:$SERVICE_USER" "$VCPKG_DIR"
# LLVM: read+execute is enough; we never write here at build time.
chown -R "$SERVICE_USER:$SERVICE_USER" "$LLVM_DIR"
# /opt/cargo-tools: workflow installs cargo-expand and flutter_rust_bridge_codegen
# here via `cargo install --root`. Pre-create with the right owner so the first
# job doesn't try to mkdir under root-owned /opt.
mkdir -p /opt/cargo-tools
chown -R "$SERVICE_USER:$SERVICE_USER" /opt/cargo-tools
# git "dubious ownership": same fix as Windows. Trust system-wide.
git config --system --add safe.directory '*' || true
+14
View File
@@ -18,6 +18,20 @@ vcpkg_from_github(
${MISSING_CSTDINT_IMPORT_PATCH}
)
# autotools 1.17+ (Debian 13, Ubuntu 24.04+) doesn't trace the deprecated
# `AC_PROG_LIBTOOL` for libtoolize, so the libtool m4 macros never get pulled
# in and automake fails with "Libtool library used but 'LIBTOOL' is undefined".
# Swap to the modern `LT_INIT` macro at extract time so this works on any
# distro. No-op on hosts that already have AC_PROG_LIBTOOL working.
if(EXISTS "${SOURCE_PATH}/configure.ac")
file(READ "${SOURCE_PATH}/configure.ac" _mfx_configure_ac)
string(REPLACE "AC_PROG_LIBTOOL" "LT_INIT" _mfx_configure_ac_patched "${_mfx_configure_ac}")
if(NOT _mfx_configure_ac STREQUAL _mfx_configure_ac_patched)
file(WRITE "${SOURCE_PATH}/configure.ac" "${_mfx_configure_ac_patched}")
message(STATUS "mfx-dispatch: replaced AC_PROG_LIBTOOL with LT_INIT for autotools >= 1.17")
endif()
endif()
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"