void-packages/srcpkgs/cmake-bootstrap/template

80 lines
2.3 KiB
Bash
Raw Normal View History

2023-06-22 18:06:20 +02:00
# Template file for 'cmake-bootstrap'
pkgname=cmake-bootstrap
2023-10-03 03:25:17 +02:00
version=3.27.6
2023-06-22 18:06:20 +02:00
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
2023-10-03 03:25:17 +02:00
-DCMake_ENABLE_DEBUGGER=OFF -DCMAKE_USE_SYSTEM_LIBRARIES=OFF
-DCTEST_TEST_CPACK=OFF -DCMake_TEST_NO_NETWORK=ON
2023-06-22 18:06:20 +02:00
-DKWSYS_LFS_WORKS=1"
short_desc="CMake for xbps-src"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="BSD-3-Clause, ICU"
homepage="https://www.cmake.org"
distfiles="https://www.cmake.org/files/v${version%.*}/cmake-${version}.tar.gz"
2023-10-03 03:25:17 +02:00
checksum=ef3056df528569e0e8956f6cf38806879347ac6de6a4ff7e4105dc4578732cfb
2023-06-22 18:06:20 +02:00
repository="bootstrap"
provides="cmake-${version}_1"
2023-06-22 18:06:20 +02:00
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" -DCMake_NO_SELF_BACKTRACE=1"
fi
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
2023-06-22 18:06:20 +02:00
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"
2023-06-22 18:06:20 +02:00
cd build
./bin/ctest -E "${_ignore}"
2023-06-22 18:06:20 +02:00
}
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
2023-10-03 03:25:17 +02:00
# nghttp2: disabled in curl
for _lib in bzip2 curl expat jsoncpp libarchive libuv zstd
2023-06-22 18:06:20 +02:00
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
}