diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-15 15:51:32 +0000 |
commit | 21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch) | |
tree | e1810a4b135afce04b34862ef0fab2bfaeb8aeca /media-libs/glm/glm-0.9.9.7.ebuild | |
parent | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff) |
gentoo resync : 15.01.2020
Diffstat (limited to 'media-libs/glm/glm-0.9.9.7.ebuild')
-rw-r--r-- | media-libs/glm/glm-0.9.9.7.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/media-libs/glm/glm-0.9.9.7.ebuild b/media-libs/glm/glm-0.9.9.7.ebuild new file mode 100644 index 000000000000..d806cb6f3757 --- /dev/null +++ b/media-libs/glm/glm-0.9.9.7.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~ppc64 ~x86" +IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2" +RESTRICT="!test? ( test )" + +RDEPEND="virtual/opengl" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.9.6-simd.patch +) + +src_prepare() { + sed \ + -e "s:@CMAKE_INSTALL_PREFIX@:${EPREFIX}/usr:" \ + -e "s:@GLM_VERSION@:0.9.9:" \ + "${FILESDIR}"/glm.pc.in \ + > glm.pc + cmake-utils_src_prepare +} + +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 +} + +src_install() { + doheader -r glm + insinto /usr/$(get_libdir)/pkgconfig + doins glm.pc + dodoc readme.md manual.md +} |