forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glm-0.9.8.5-r1.ebuild
36 lines (28 loc) · 936 Bytes
/
glm-0.9.8.5-r1.ebuild
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
36
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit cmake-utils
DESCRIPTION="OpenGL Mathematics"
HOMEPAGE="http://glm.g-truc.net/"
SRC_URI="https://github.com/g-truc/glm/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="|| ( HappyBunny MIT )"
SLOT="0"
KEYWORDS="amd64 arm ~arm64 x86"
IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2"
RDEPEND="virtual/opengl"
PATCHES=(
"${FILESDIR}/glm-gcc73.patch"
"${FILESDIR}/${P}-gcc7_tests.patch"
)
src_configure() {
if use test; then
local mycmakeargs=(
-DGLM_TEST_ENABLE=ON
-DGLM_TEST_ENABLE_SIMD_SSE2="$(usex cpu_flags_x86_sse2 ON OFF)"
-DGLM_TEST_ENABLE_SIMD_SSE3="$(usex cpu_flags_x86_sse3 ON OFF)"
-DGLM_TEST_ENABLE_SIMD_AVX="$(usex cpu_flags_x86_avx ON OFF)"
-DGLM_TEST_ENABLE_SIMD_AVX2="$(usex cpu_flags_x86_avx2 ON OFF)"
)
fi
cmake-utils_src_configure
}