aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: 92edcc0bb05f8c841faadd03ba9b9e7b71fd5940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=3.3.2
pkgrel=1
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
arch="all"
license="CMake"
depends=
makedepends="ncurses-dev curl-dev expat-dev zlib-dev bzip2-dev libarchive-dev"
subpackages="$pkgname-doc"

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

source="http://www.cmake.org/files/$_v/cmake-${pkgver}.tar.gz
	musl-header-fixes.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"

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

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	# jsoncpp seems to need cmake to build so to avoid recursive build dep
	# we use the bundled
	./bootstrap --prefix=/usr \
		--mandir=/share/man \
		--datadir=/share/$pkgname \
		--docdir=/share/doc/$pkgname \
		--system-libs \
		--no-system-jsoncpp \
		$(parallel_opt)

	make || return 1
}

package() {
	cd $startdir/src/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install
}

md5sums="5febbd11bcaac854a27eebaf4a124be2  cmake-3.3.2.tar.gz
500d40f006182e7f4e3e594347882fdf  musl-header-fixes.patch"
sha256sums="e75a178d6ebf182b048ebfe6e0657c49f0dc109779170bad7ffcb17463f2fc22  cmake-3.3.2.tar.gz
7169e21d649b35c031a615986ebc559d772d40667506ce495cbc51f828825ae8  musl-header-fixes.patch"
sha512sums="01bc0e6ca52a6836ef57360fb38dd92a4575bfa37bfe9625645db77fefd0c170383cfb07b61c6283bde96738ce1a5e18cb7569e7e0b7c98d4b99e86305c50180  cmake-3.3.2.tar.gz
36ec0e51b4b1f00f8d7439d3e5a39ee8882704f69ec1ca901010ffba4914e7949aefafdb6698c28b966d5bccfa209aca993c228a37189ced047203d02644127c  musl-header-fixes.patch"