1 |
commit: b13b2f98879179773c114256350c5a2d21f4c15d |
2 |
Author: Karlson2k (Evgeny Grin) <k2k <AT> narod <DOT> ru> |
3 |
AuthorDate: Wed Jul 29 12:12:50 2020 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 1 14:59:15 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b13b2f98 |
7 |
|
8 |
media-libs/glm-0.9.9.8: fixes Fixed installation of provided CMake configuration module Skipped build when `test` is not used (header-only library) |
9 |
|
10 |
Bug: https://bugs.gentoo.org/714778 |
11 |
Closes: https://bugs.gentoo.org/717004 |
12 |
|
13 |
Signed-off-by: Karlson2k (Evgeny Grin) <k2k <AT> narod.ru> |
14 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
15 |
|
16 |
media-libs/glm/glm-0.9.9.8-r1.ebuild | 59 ++++++++++++++++++++++++++++++++++++ |
17 |
1 file changed, 59 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/glm/glm-0.9.9.8-r1.ebuild b/media-libs/glm/glm-0.9.9.8-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..d247d9fdf8e |
22 |
--- /dev/null |
23 |
+++ b/media-libs/glm/glm-0.9.9.8-r1.ebuild |
24 |
@@ -0,0 +1,59 @@ |
25 |
+# Copyright 1999-2020 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+inherit cmake |
31 |
+ |
32 |
+DESCRIPTION="OpenGL Mathematics" |
33 |
+HOMEPAGE="http://glm.g-truc.net/" |
34 |
+SRC_URI="https://github.com/g-truc/glm/archive/${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="|| ( HappyBunny MIT )" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
39 |
+IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2" |
40 |
+RESTRICT="!test? ( test )" |
41 |
+ |
42 |
+RDEPEND="" |
43 |
+ |
44 |
+PATCHES=( |
45 |
+ "${FILESDIR}"/${PN}-0.9.9.6-simd.patch |
46 |
+ "${FILESDIR}"/${P}-clang.patch |
47 |
+) |
48 |
+ |
49 |
+src_configure() { |
50 |
+ # Header-only library |
51 |
+ if use test; then |
52 |
+ local mycmakeargs=( |
53 |
+ -DGLM_TEST_ENABLE=ON |
54 |
+ -DGLM_TEST_ENABLE_SIMD_SSE2="$(usex cpu_flags_x86_sse2 ON OFF)" |
55 |
+ -DGLM_TEST_ENABLE_SIMD_SSE3="$(usex cpu_flags_x86_sse3 ON OFF)" |
56 |
+ -DGLM_TEST_ENABLE_SIMD_AVX="$(usex cpu_flags_x86_avx ON OFF)" |
57 |
+ -DGLM_TEST_ENABLE_SIMD_AVX2="$(usex cpu_flags_x86_avx2 ON OFF)" |
58 |
+ ) |
59 |
+ cmake_src_configure |
60 |
+ fi |
61 |
+ |
62 |
+ sed \ |
63 |
+ -e "s:@CMAKE_INSTALL_PREFIX@:${EPREFIX}/usr:" \ |
64 |
+ -e "s:@GLM_VERSION@:$(ver_cut 1-3):" \ |
65 |
+ "${FILESDIR}"/glm.pc.in \ |
66 |
+ > "${BUILD_DIR}/glm.pc" || die |
67 |
+} |
68 |
+ |
69 |
+src_compile() { |
70 |
+ # Header-only library |
71 |
+ if use test; then |
72 |
+ cmake_src_compile |
73 |
+ fi |
74 |
+} |
75 |
+ |
76 |
+src_install() { |
77 |
+ doheader -r glm |
78 |
+ insinto /usr/share/pkgconfig |
79 |
+ doins "${BUILD_DIR}/glm.pc" |
80 |
+ insinto /usr/share |
81 |
+ doins -r cmake |
82 |
+ dodoc readme.md manual.md |
83 |
+} |