1 # Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2 # Contributor: Peter Hatina <phatina AT gmail.com>
6 pkgdesc="C++ mathematics library for 3D software based on the OpenGL Shading Language (GLSL) specification"
9 url="http://glm.g-truc.net"
10 source=("https://github.com/g-truc/glm/releases/download/${pkgver}/glm-${pkgver}.zip"
12 glmConfigVersion.cmake.in
15 sha512sums=('8c6bdaacfac600a22d7e92b86f70bfcfe7bf7f56b05ad93c503520adbdb8432ca20c01e93a5c782cf457fe4512b29defffdc94a1316bc7f3d6747f989fff0286'
16 '37f3973b9913fb820a355160717cbe881586a00210c76061c436784d240eec0094132d8fb772126f8ab9cd75d3ed2da9ccb5a5c33dbdd007d77e5eca82990d25'
17 'e8342b07a44fd3fab9c1262e670dda27ac22758d2bd9a682e1d82b1caba1846c2ae8b53a75a556f8cd75e961a175d6a035abd6cf545b8c05b12d2898567119fa'
18 '517b080a50f9ba80b5d1e15c27e9c1905912c1db640eb087272be853ad4e451a302e6b4bee4f7e5c936cadfda3a7a75421c4df1bab3759b147fbb770061cfa9a'
19 'ebaf7ad8ded0abe56074cb67f8238224458587bb16223e19493819a867f0dc536114f7ddb83285b990a8bdeca246b29dacae90998386be2225397681e7c0e77d')
24 mkdir -p "$pkgdir"/usr/include/
25 cp -r glm "$pkgdir"/usr/include/
27 mkdir -p "$pkgdir"/usr/share/doc
28 cp -r doc "$pkgdir"/usr/share/doc/glm
30 # For some stupid reason, glm upstream removed the CMake install target here:
31 # https://github.com/g-truc/glm/commit/5f352ecce21bb1ab37fa56fac0f383c779b351a3
32 # There is no reasoning for it. Discussion here: https://github.com/g-truc/glm/issues/947
33 mkdir -p "$pkgdir"/usr/lib/pkgconfig/
34 sed "s/@VERSION@/$pkgver/" "$srcdir"/glm.pc.in > "$pkgdir"/usr/lib/pkgconfig/glm.pc
36 mkdir -p "$pkgdir"/usr/lib/cmake/glm/
37 sed "s/@VERSION@/$pkgver/" "$srcdir"/glmConfigVersion.cmake.in > "$pkgdir"/usr/lib/cmake/glm/glmConfigVersion.cmake
38 sed "s/@VERSION@/$pkgver/" "$srcdir"/glmConfig.cmake.in > "$pkgdir"/usr/lib/cmake/glm/glmConfig.cmake
39 install -Dm644 "$srcdir"/glmTargets.cmake "$pkgdir"/usr/lib/cmake/glm/glmTargets.cmake