Commit 2b4f201d authored by Chaoting Liu's avatar Chaoting Liu
Browse files

glm: import as dependency of libetonyek from Arch

- use clang
parent 1b22a60c
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Peter Hatina <phatina AT gmail.com>
pkgname=glm
pkgver=0.9.8.5
pkgrel=1
pkgdesc="C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification"
arch=('any')
license=('MIT')
url="http://glm.g-truc.net"
makedepends=('cmake' 'clang')
source=("https://github.com/g-truc/glm/releases/download/${pkgver}/glm-${pkgver}.zip")
md5sums=('456c9f54cf9da189733a74c173b840b5')
prepare() {
cd $pkgname
[[ ! -d build ]] && rm -rf build
mkdir build
}
build() {
export CXX=clang++
export CC=clang
cd $pkgname/build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DGLM_TEST_ENABLE=ON \
-DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON \
-DGLM_TEST_ENABLE_SIMD_SSE2=ON \
-DGLM_TEST_ENABLE_SIMD_SSE3=ON \
-DGLM_TEST_ENABLE_SIMD_AVX=ON \
-DGLM_TEST_ENABLE_SIMD_AVX2=ON
make
}
package() {
cd $pkgname/build
make DESTDIR=$pkgdir install
cd ..
mkdir -p $pkgdir/usr/share/doc
cp -r doc $pkgdir/usr/share/doc/glm
find $pkgdir -type f -exec chmod 644 {} \;
find $pkgdir -type d -exec chmod 755 {} \;
install -Dm644 copying.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
# Fix https://bugs.archlinux.org/task/52501
sed -i \
"s/PACKAGE_VERSION_UNSUITABLE TRUE/PACKAGE_VERSION_UNSUITABLE FALSE/g" \
$pkgdir/usr/lib/cmake/glm/glmConfigVersion.cmake
# GCC 7.3 fix
sed -i "s/(__GNUC__ == 7) && (__GNUC_MINOR__ == 2)/(__GNUC__ == 7) \&\& (__GNUC_MINOR__ >= 2)/" $pkgdir/usr/include/glm/simd/platform.h
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment