summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k (Evgeny Grin) <k2k@narod.ru>2020-07-29 15:12:50 +0300
committerAlfredo Tupone <tupone@gentoo.org>2020-08-01 16:59:15 +0200
commitb13b2f98879179773c114256350c5a2d21f4c15d (patch)
tree0b26fe95d43910033a74659fd69d4579b55d3351 /media-libs
parentxfce-base/xfwm4: Bump to 4.15.0 (diff)
downloadgentoo-b13b2f98879179773c114256350c5a2d21f4c15d.tar.gz
gentoo-b13b2f98879179773c114256350c5a2d21f4c15d.tar.bz2
gentoo-b13b2f98879179773c114256350c5a2d21f4c15d.zip
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)
Bug: https://bugs.gentoo.org/714778 Closes: https://bugs.gentoo.org/717004 Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/glm/glm-0.9.9.8-r1.ebuild59
1 files changed, 59 insertions, 0 deletions
diff --git a/media-libs/glm/glm-0.9.9.8-r1.ebuild b/media-libs/glm/glm-0.9.9.8-r1.ebuild
new file mode 100644
index 000000000000..d247d9fdf8e6
--- /dev/null
+++ b/media-libs/glm/glm-0.9.9.8-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+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=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.9.6-simd.patch
+ "${FILESDIR}"/${P}-clang.patch
+)
+
+src_configure() {
+ # Header-only library
+ 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)"
+ )
+ cmake_src_configure
+ fi
+
+ sed \
+ -e "s:@CMAKE_INSTALL_PREFIX@:${EPREFIX}/usr:" \
+ -e "s:@GLM_VERSION@:$(ver_cut 1-3):" \
+ "${FILESDIR}"/glm.pc.in \
+ > "${BUILD_DIR}/glm.pc" || die
+}
+
+src_compile() {
+ # Header-only library
+ if use test; then
+ cmake_src_compile
+ fi
+}
+
+src_install() {
+ doheader -r glm
+ insinto /usr/share/pkgconfig
+ doins "${BUILD_DIR}/glm.pc"
+ insinto /usr/share
+ doins -r cmake
+ dodoc readme.md manual.md
+}