core/cmake/Pkgfile

42 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-12-11 22:30:57 +01:00
# Description: A cross-platform, open-source make system
# URL: https://www.cmake.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu
2023-08-11 06:50:51 +02:00
# Depends on: curl expat jsoncpp libarchive libuv lzlib ncurses rhash
2022-01-30 14:36:05 +01:00
# Optional: python3-sphinx
2021-12-11 22:30:57 +01:00
name=cmake
2023-09-21 08:29:02 +02:00
version=3.27.6
2023-07-18 23:21:41 +02:00
release=1
2021-12-11 22:30:57 +01:00
source=(https://cmake.org/files/v${version%.*}/$name-$version.tar.gz)
build() {
2023-08-21 21:49:13 +02:00
cd $name-$version
sed -i Source/CMakeInstallDestinations.cmake \
-e 's|share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}|share/cmake|'
prt-get isinst ccache && PKGMK_CMAKE+=' --enable-ccache'
./bootstrap --generator=Ninja $PKGMK_CMAKE \
--prefix=/usr \
--datadir=/share/cmake \
--bootstrap-system-libuv \
--bootstrap-system-jsoncpp \
--bootstrap-system-librhash \
--no-system-cppdap \
--system-libs \
--parallel=${JOBS:-1} \
$(prt-get isinst python3-sphinx >/dev/null && echo --sphinx-man) \
-- -D CMake_BUILD_LTO=ON \
-D BUILD_TESTING=OFF
ninja -j ${JOBS:-1}
DESTDIR=$PKG ninja install
rm -r $PKG/usr/{doc,share/cmake/Help}
ln -sf $name $PKG/usr/share/$name-${version%.*}
prt-get isinst bash-completion || rm -r $PKG/usr/share/bash-completion
rm -r $PKG/usr/share/emacs
2021-12-11 22:30:57 +01:00
}