aboutsummaryrefslogtreecommitdiffstats
path: root/community/glm/APKBUILD
blob: 83b326298d8f4fb292c996c01a0cf1dfacfed272 (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=glm
pkgver=0.9.9.6
pkgrel=1
pkgdesc="C++ mathematics library for graphics programming"
url="http://glm.g-truc.net/"
arch="noarch"
license="MIT"
makedepends="cmake"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/g-truc/glm/archive/$pkgver.tar.gz
	fix-endian-test.patch
	glm.pc
	"
builddir="$srcdir/$pkgname-$pkgver"
patch_args="--binary -p1"

build() {
	cd "$builddir"
	mkdir build
	cd build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DGLM_TEST_ENABLE=TRUE
	make
}

check() {
	cd "$builddir"/build
	make test
}

package() {
	mkdir -p "$pkgdir"/usr/include/
	cp -r glm "$pkgdir"/usr/include/
	mkdir -p "$pkgdir"/usr/share/doc
	cp -r doc "$pkgdir"/usr/share/doc/glm
	mkdir -p "$pkgdir"/usr/lib/pkgconfig
	cp ../glm.pc "$pkgdir"/usr/lib/pkgconfig/
}

sha512sums="1bc8fc1da21e19f95d4a24259993c7932db328fdd2d0db68dbf60c07f372e19003a8df094fb4e153bb7f50df584c17cf0a540d3d3c38b7a287f3b55314ec2d70  glm-0.9.9.6.tar.gz
93e02285b7530bb5fdad71905a55150e64cda3d036f43fca166eddb2e8d2f2d03025543c96dfd44234a37f860ea0682be2c683a66c9d4ef33f5bc269c95bbdfa  fix-endian-test.patch
185a9eae06b4bd291c72351239a969e37b83feb1b2de64c397f657370aff81241bf489f0109c74d50cd7106389c2740b0f620f39cdd3604dc51ed9b5046442af  glm.pc"