# Template file for 'cmake-bootstrap' pkgname=cmake-bootstrap version=3.30.1 revision=1 build_style=cmake configure_args="-DCMake_INSTALL_INFIX=libexec/xbps-src/ -DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=OFF -DCMAKE_USE_OPENSSL=OFF -DBUILD_CursesDialog=OFF -DBUILD_QtDialog=OFF -DCMake_ENABLE_DEBUGGER=OFF -DCMAKE_USE_SYSTEM_LIBRARIES=OFF -DCTEST_TEST_CPACK=OFF -DCMake_TEST_NO_NETWORK=ON -DCMake_NO_SELF_BACKTRACE=1 -DKWSYS_LFS_WORKS=1" hostmakedepends="samurai" short_desc="CMake for xbps-src" maintainer="Đoàn Trần Công Danh " license="BSD-3-Clause, ICU" homepage="https://www.cmake.org" distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz" checksum=df9b3c53e3ce84c3c1b7c253e5ceff7d8d1f084ff0673d048f260e04ccb346e1 repository="bootstrap" provides="cmake-${version}_1" make_cmd=samu pre_configure() { local f rm -rf build mkdir build cd build CC=$CC_FOR_BUILD CFLAGS="$CFLAGS_FOR_BUILD" \ CXX=$CXX_FOR_BUILD CXXFLAGS="$CXXFLAGS_FOR_BUILD" \ LD=$LD_FOR_BUILD LDFLAGS="$LDFLAGS_FOR_BUILD" \ ../bootstrap --system-libs --generator=Ninja \ ${XBPS_MAKEJOBS:+--parallel=$XBPS_MAKEJOBS} # Make sure build directory is clean for f in *; do if [ "$f" != Bootstrap.cmk ]; then return 1 fi done cd ${wrksrc} PATH="${wrksrc}/build/Bootstrap.cmk:$PATH" } do_check() { local _ignore mkdir -p /tmp/fake-bin ln -sf /usr/bin/bsdtar /tmp/fake-bin/tar PATH=$PATH:/tmp/fake-bin # Requires git-submodule _ignore="ExternalProject|UpdateGIT|CMP0150" # Cra(y)pe Compiler _ignore="${_ignore}|ParseImplicitLinkInfo" # Broken on musl, depends on ldconfig _ignore="${_ignore}|file-GET_RUNTIME_DEPENDENCIES" cd build ./bin/ctest -E "${_ignore}" } post_install() { # We installs license manually because cmake forgets some of them. test ! -d ${DESTDIR}/usr/libexec/xbps-src/share/doc { cat Copyright.txt printf '%s\n' '' =============================== "FreeBSD ELF library" sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h # nghttp2: disabled in curl for _lib in bzip2 curl expat jsoncpp libarchive libuv zstd do printf '%s\n' '' =============================== "$_lib" for _file in COPYING LICENSE NOTICE; do if [ -f "Utilities/cm${_lib}/${_file}" ]; then cat "Utilities/cm${_lib}/${_file}" fi done done }>license vlicense license }