# Contributor: Valery Kartel # Maintainer: A. Wilcox pkgname=cmake pkgver=3.31.8 pkgrel=0 pkgdesc="Cross-platform build system" url="https://cmake.org" arch="all" license="CMake" depends="" checkdepends="musl-utils file" makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev libuv-dev xz-dev rhash-dev" subpackages="$pkgname-doc" case $pkgver in *.*.*.*) _v=v${pkgver%.*.*};; *.*.*) _v=v${pkgver%.*};; esac source="https://cmake.org/files/$_v/cmake-${pkgver}.tar.gz musl-ldso.patch " _parallel_opt() { local i n for i in $MAKEFLAGS; do case "$i" in -j*) n=${i#-j};; esac; done [ -n "$n" ] && echo "--parallel=$n" } build() { # jsoncpp needs cmake to build so to avoid recursive build # dependency, we use the bundled version of jsoncpp ./bootstrap \ --prefix=/usr \ --mandir=/share/man \ --datadir=/share/$pkgname \ --docdir=/share/doc/$pkgname \ --system-libs \ --no-system-cppdap \ --no-system-jsoncpp \ $(_parallel_opt) make } check() { # disable only one part of this test (see #417) sed -i Tests/RunCMake/ctest_submit/RunCMakeTest.cmake \ -e '/^run_ctest_submit_FailDrop(https)/d' \ ; # skip CTestTestUpload: tries to upload something during check... # BundleUtilities fails in autobuilder env due to LD_PRELOAD hack # RunCMake.CrosscompilingEmulator and RunCMake.add_test don't support # running with parallel level > 1. CTEST_PARALLEL_LEVEL=${JOBS} \ CTEST_OUTPUT_ON_FAILURE=TRUE \ bin/ctest \ -E '(CTestTestUpload|BundleUtilities|RunCMake\.(CrosscompilingEmulator|add_test))' \ ; } package() { make DESTDIR="$pkgdir" install } sha512sums="07dbb5af1d449760ef92a921e43c0a0a091989ac51ce3f8b7607bf617b8b56e47c675486d3c620c04f1105b7dfa3852b926915e0888ff46ea473cd01e572f461 cmake-3.31.8.tar.gz 4ad2da9781f55686f4c5dbbb93f909748097f23760208a81109117b3b0976e02f2228253c3a916a6b26575a27f8b67012d2458c35a9cacf6668261d8cede9582 musl-ldso.patch"