summaryrefslogtreecommitdiff
path: root/repo/system/glm.xibuild
blob: cd918c356bc620cb8e4c8e0a5c685e7be3bfe126 (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
#!/bin/sh

NAME="glm"
DESC="C++ mathematics library for graphics programming"

MAKEDEPS="cmake "
DEPS="musl "

PKG_VER=0.9.9.8
SOURCE="https://github.com/g-truc/glm/archive/refs/tags/$PKG_VER/glm-$PKG_VER.tar.gz"
ADDITIONAL="
fix-endian-test.patch
glm.pc
"

build () {
    cmake -B build -G Ninja \
        -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DBUILD_SHARED_LIBS=True \
        -DBUILD_STATIC_LIBS=OFF
	cmake --build build
}

package () {

    mkdir -p $PKG_DEST/usr/include/
    cp -r glm $PKG_DEST/usr/include/

    mkdir -p $PKG_DEST/usr/share/doc/
    cp -r doc $PKG_DEST/usr/share/doc/glm

    mkdir -p $PKG_DEST/usr/lib/pkgconfig
    cp glm.pc $PKG_DEST/usr/lib/pkgconfig/
}