60 lines
1.7 KiB
Bash
60 lines
1.7 KiB
Bash
# Template file for 'cmake'
|
|
pkgname=cmake
|
|
version=3.25.1
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
|
|
-DSPHINX_MAN=1 -DCMAKE_MAN_DIR=/share/man
|
|
-DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=1
|
|
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
|
|
hostmakedepends="gcc-fortran python3-Sphinx"
|
|
makedepends="expat-devel libarchive-devel libcurl-devel libuv-devel
|
|
ncurses-devel rhash-devel jsoncpp-devel"
|
|
checkdepends="pax pkg-config git"
|
|
short_desc="Cross-platform, open-source build system"
|
|
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%.*}/${pkgname}-${version}.tar.gz"
|
|
checksum=1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8
|
|
replaces="cmake-bootstrap>=0"
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
configure_args+=" -DCMake_NO_SELF_BACKTRACE=1"
|
|
fi
|
|
|
|
pre_configure() {
|
|
local f
|
|
mkdir -p 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 --no-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() {
|
|
cd build
|
|
# https://gitlab.kitware.com/cmake/cmake/-/issues/23885
|
|
./bin/ctest -E RunCMake.SymlinkTrees
|
|
}
|
|
|
|
post_install() {
|
|
rm -rf ${DESTDIR}/usr/share/doc/cmake
|
|
sed -n -e '/Copyright/,/authorization[.]/p' \
|
|
Source/CursesDialog/form/fld_arg.c >fld.LICENSE
|
|
vlicense fld.LICENSE
|
|
vlicense Copyright.txt
|
|
vlicense Utilities/KWIML/Copyright.txt KWIML-Copyright.txt
|
|
}
|