void-packages/srcpkgs/cmake/template

54 lines
1.6 KiB
Bash

# Template file for 'cmake'
pkgname=cmake
version=3.29.5
revision=1
build_style=cmake
configure_args="-DCMAKE_DOC_DIR=/share/doc/cmake
-DSPHINX_MAN=1 -DCMAKE_MAN_DIR=/share/man
-DBUILD_CursesDialog=ON -DBUILD_QtDialog=ON
-DCMAKE_SKIP_BOOTSTRAP_TEST=1 -DCMAKE_SKIP_RPATH=1
-DCMAKE_USE_SYSTEM_LIBRARIES=ON -DKWSYS_LFS_WORKS=1"
hostmakedepends="gcc-fortran python3-Sphinx qt6-base qt6-tools"
makedepends="expat-devel libarchive-devel libcurl-devel libuv-devel cppdap-devel
ncurses-devel rhash-devel jsoncpp-devel qt6-base-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=dd63da7d763c0db455ca232f2c443f5234fe0b11f8bd6958a81d29cc987dfd6e
if [ "$XBPS_TARGET_LIBC" = musl ]; then
configure_args+=" -DCMake_NO_SELF_BACKTRACE=1"
fi
do_check() {
cd build
./bin/ctest
}
post_install() {
# No license would be installed
# or something were bundled without our knowledge
test ! -d ${DESTDIR}/usr/share/doc
sed -n -e '/Copyright/,/authorization[.]/p' \
Source/CursesDialog/form/fld_arg.c >fld.license
vlicense fld.license
sed -e '/\$FreeBSD\$/q' Utilities/cmelf/elf_common.h >elf.license
vlicense elf.license
vlicense Copyright.txt
}
cmake-gui_package() {
depends="desktop-file-utils shared-mime-info cmake>=${version}"
pkg_install() {
vmove usr/bin/cmake-gui
vmove usr/share/man/man1/cmake-gui.1
vmove usr/share/applications
vmove usr/share/icons
vmove usr/share/mime
}
}