diff --git a/ci/configs/newdeps.bash b/ci/configs/newdeps.bash index a86f9dee..a775f5cf 100644 --- a/ci/configs/newdeps.bash +++ b/ci/configs/newdeps.bash @@ -2,5 +2,6 @@ CI_DESC="CI job using newest Cap'n Proto and cmake versions" CI_DIR=build-newdeps export CXXFLAGS="-Werror -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-error=array-bounds" CAPNP_CHECKOUT=master # This is the v1.x release branch +CAPNP_BUILD=autotools-static # Check mpgen link order with capnpc.pc missing Requires: capnp (#367) NIX_ARGS=(--argstr capnprotoVersion "none" --argstr cmakeVersion "4.3.4") BUILD_ARGS=(-k) diff --git a/ci/scripts/ci.sh b/ci/scripts/ci.sh index 8016d921..77a8acfc 100755 --- a/ci/scripts/ci.sh +++ b/ci/scripts/ci.sh @@ -26,15 +26,31 @@ capnp_prefix= if [ -n "${CAPNP_CHECKOUT-}" ]; then capnp_prefix="$PWD/capnp-install" [ -e "capnp" ] || git clone -b "${CAPNP_CHECKOUT}" "https://github.com/capnproto/capnproto" capnp - mkdir -p capnp/build - ( - cd capnp/build - git --no-pager log -1 || true - CXXFLAGS="-std=c++20" cmake .. "-DCMAKE_INSTALL_PREFIX=${capnp_prefix}" -DBUILD_TESTING=OFF -DWITH_OPENSSL=OFF -DWITH_ZLIB=OFF - cmake --build . - cmake --build . --target install # Replacement for modern "cmake --install .". - ) + if [ "${CAPNP_BUILD-}" = "autotools-static" ]; then + ( + cd capnp/c++ + git --no-pager log -1 || true + autoreconf -i + ./configure --prefix="${capnp_prefix}" \ + --disable-shared \ + --enable-static \ + --without-openssl \ + --without-zlib \ + CXXFLAGS="-std=c++20" + make -j"$(nproc)" install + ) + else + mkdir -p capnp/build + ( + cd capnp/build + git --no-pager log -1 || true + CXXFLAGS="-std=c++20" cmake .. "-DCMAKE_INSTALL_PREFIX=${capnp_prefix}" -DBUILD_TESTING=OFF -DWITH_OPENSSL=OFF -DWITH_ZLIB=OFF + cmake --build . + cmake --build . --target install # Replacement for modern "cmake --install .". + ) + fi export CMAKE_PREFIX_PATH="${capnp_prefix}:${CMAKE_PREFIX_PATH-}" + export PKG_CONFIG_PATH="${capnp_prefix}/lib/pkgconfig:${PKG_CONFIG_PATH-}" fi src_dir=$PWD diff --git a/shell.nix b/shell.nix index 1fbfda51..94be3a05 100644 --- a/shell.nix +++ b/shell.nix @@ -72,10 +72,14 @@ in crossPkgs.mkShell { capnproto ]; nativeBuildInputs = with pkgs; [ + autoconf + automake cmakeBuild git include-what-you-use + libtool ninja + pkg-config ] ++ lib.optional (gcc != null) gcc ++ lib.optionals (!minimal) [ clang clang-tools