aboutsummaryrefslogtreecommitdiffstats
path: root/main/cmake/APKBUILD
blob: 0086e9f6804732e52ce5462df813faa723788401 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cmake
pkgver=2.8.5
pkgrel=0
pkgdesc="CMake is a cross-platform open-source make system"
url="http://www.cmake.org"
arch="all"
license="CMake"
depends=
makedepends="ncurses-dev"
source="http://www.$pkgname.org/files/v${pkgver%.*}/$pkgname-$pkgver.tar.gz"
subpackages="$pkgname-doc"


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 ()
{
	cd $startdir/src/$pkgname-$pkgver
	# bug in cmake.
	# http://www.mail-archive.com/cmake@cmake.org/msg09515.html
#	export CC="gcc"
#	export CXX="g++"

	./bootstrap --prefix=/usr \
		--mandir=/share/man \
		--docdir=/share/cmake-${pkgver%.*}/doc \
		$(parallel_opt)

	make || return 1
}

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

md5sums="3c5d32cec0f4c2dc45f4c2e84f4a20c5  cmake-2.8.5.tar.gz"