76 lines
2.3 KiB
Bash
76 lines
2.3 KiB
Bash
# Template file for 'cmake-bootstrap'
|
|
pkgname=cmake-bootstrap
|
|
version=3.29.5
|
|
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"
|
|
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"
|
|
checksum=dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e
|
|
repository="bootstrap"
|
|
provides="cmake-${version}_1"
|
|
|
|
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
|
|
}
|