summaryrefslogblamecommitdiff
path: root/system/cmake/APKBUILD
blob: 5fb979ffe39de78914cb68667432ed47a6f0dae1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                      
                                                 
             
             
        
                                     
                       

                                                                             
                                   






                              
                                                           










                                           












                                                                  


                                              

                                      
                                                                                                                                                                  
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=cmake
pkgver=3.14.3
pkgrel=0
pkgdesc="Cross-platform build system"
url="https://cmake.org"
arch="all"
license="CMake"
makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev
	libuv-dev xz-dev rhash-dev"
checkdepends="musl-utils file"
subpackages="$pkgname-doc"

case $pkgver in
*.*.*.*) _v=v${pkgver%.*.*};;
*.*.*) _v=v${pkgver%.*};;
esac

source="https://cmake.org/files/$_v/cmake-${pkgver}.tar.gz"

_parallel_opt() {
	local i n
	for i in $MAKEOPTS; do
		case "$i" in
			-j*) n=${i#-j};;
		esac;
	done
	[ -n "$n" ] && echo "--parallel $n"
}

build() {
	# jsoncpp needs cmake to build so to avoid recursive build
	# dependency, we use the bundled version of jsoncpp
	./bootstrap \
		--prefix=/usr \
		--mandir=/share/man \
		--datadir=/share/$pkgname \
		--docdir=/share/doc/$pkgname \
		--system-libs \
		--no-system-jsoncpp \
		$(_parallel_opt)
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE bin/ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e257a96334f21f2b2f17e8d43aa32c2b069d13194604393c5ac9d3da193000d5328181c6cf861696186d022aba57679ee2d08073d8a7112727746b2b145a47e2  cmake-3.14.3.tar.gz"