core/cmake/Pkgfile

41 lines
1.1 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
2022-01-09 03:16:54 +01:00
# Depends on: curl expat jsoncpp libarchive libnghttp2 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
2022-11-16 21:59:28 +01:00
version=3.25.0
2022-04-18 00:10:45 +02:00
release=1
2021-12-11 22:30:57 +01:00
source=(https://cmake.org/files/v${version%.*}/$name-$version.tar.gz)
build() {
cd $name-$version
sed -i Source/CMakeInstallDestinations.cmake \
-e 's|share/cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}|share/cmake|'
2022-03-05 16:05:21 +01:00
prt-get isinst ccache && PKGMK_CMAKE+=' --enable-ccache'
./bootstrap --generator=Ninja $PKGMK_CMAKE \
2021-12-11 22:30:57 +01:00
--prefix=/usr \
2022-01-09 03:16:54 +01:00
--datadir=/share/cmake \
2022-03-05 16:05:21 +01:00
--bootstrap-system-libuv \
--bootstrap-system-jsoncpp \
--bootstrap-system-librhash \
2022-01-09 03:16:54 +01:00
--system-libs \
2021-12-11 22:30:57 +01:00
--parallel=${JOBS:-1} \
2022-03-05 16:05:21 +01:00
$(prt-get isinst python3-sphinx >/dev/null && echo --sphinx-man) \
2022-04-18 00:10:45 +02:00
-- -D CMake_BUILD_LTO=ON \
-D BUILD_TESTING=OFF
2021-12-11 22:30:57 +01:00
ninja
DESTDIR=$PKG ninja install
rm -r $PKG/usr/{doc,share/cmake/Help}
ln -sf $name $PKG/usr/share/$name-${version%.*}
2022-03-05 16:05:21 +01:00
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
}