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