# Maintainer: Natanael Copa pkgname=glm pkgver=0.9.9.8 pkgrel=3 pkgdesc="C++ mathematics library for graphics programming" url="https://glm.g-truc.net/" arch="noarch" license="MIT" makedepends="cmake samurai" subpackages="$pkgname-dev $pkgname-doc" source="https://github.com/g-truc/glm/archive/refs/tags/$pkgver/glm-$pkgver.tar.gz fix-endian-test.patch glm.pc glmConfig.cmake.in glmConfigVersion.cmake.in glmTargets.cmake " patch_args="--binary -p1" build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DGLM_TEST_ENABLE=TRUE cmake --build build } check() { ctest --output-on-failure --test-dir build \ -E 'test-core_func_integer' } 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 "$srcdir"/glm.pc "$pkgdir"/usr/lib/pkgconfig/ # glm removed their install targets from cmake, so we need to put them back manually.. mkdir -p "$pkgdir"/usr/lib/cmake/glm/ sed "s/@VERSION@/$pkgver/" "$srcdir"/glmConfigVersion.cmake.in > "$pkgdir"/usr/lib/cmake/glm/glmConfigVersion.cmake sed "s/@VERSION@/$pkgver/" "$srcdir"/glmConfig.cmake.in > "$pkgdir"/usr/lib/cmake/glm/glmConfig.cmake install -Dm644 "$srcdir"/glmTargets.cmake "$pkgdir"/usr/lib/cmake/glm/glmTargets.cmake } sha512sums=" 9484b0c12175414237c5b9486a2990099b1cb727e442f25ecda18b081aa661f7e92a44481f642989553cd3da7992a773441ee5688991bd539ce19fb66a5ce9e8 glm-0.9.9.8.tar.gz 93e02285b7530bb5fdad71905a55150e64cda3d036f43fca166eddb2e8d2f2d03025543c96dfd44234a37f860ea0682be2c683a66c9d4ef33f5bc269c95bbdfa fix-endian-test.patch 185a9eae06b4bd291c72351239a969e37b83feb1b2de64c397f657370aff81241bf489f0109c74d50cd7106389c2740b0f620f39cdd3604dc51ed9b5046442af glm.pc 517b080a50f9ba80b5d1e15c27e9c1905912c1db640eb087272be853ad4e451a302e6b4bee4f7e5c936cadfda3a7a75421c4df1bab3759b147fbb770061cfa9a glmConfig.cmake.in e8342b07a44fd3fab9c1262e670dda27ac22758d2bd9a682e1d82b1caba1846c2ae8b53a75a556f8cd75e961a175d6a035abd6cf545b8c05b12d2898567119fa glmConfigVersion.cmake.in ebaf7ad8ded0abe56074cb67f8238224458587bb16223e19493819a867f0dc536114f7ddb83285b990a8bdeca246b29dacae90998386be2225397681e7c0e77d glmTargets.cmake "