diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-25 10:43:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-25 10:43:56 +0000 |
commit | 5d88bb472ef4d6659a423746d4f8717e55ffaaf5 (patch) | |
tree | 65d2bb8ba367a660de263455ccac7eabf5ccc5ab /media-libs/glm/glm-1.0.0.ebuild | |
parent | a4a19f78acc305106f3b54bec9af212e38bfe7be (diff) |
gentoo auto-resync : 25:01:2024 - 10:43:56
Diffstat (limited to 'media-libs/glm/glm-1.0.0.ebuild')
-rw-r--r-- | media-libs/glm/glm-1.0.0.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/media-libs/glm/glm-1.0.0.ebuild b/media-libs/glm/glm-1.0.0.ebuild new file mode 100644 index 000000000000..5138d21e6371 --- /dev/null +++ b/media-libs/glm/glm-1.0.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake flag-o-matic + +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 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86_avx2" +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.9.9.6-simd.patch + "${FILESDIR}"/${P}-clang.patch + "${FILESDIR}"/${PN}-0.9.9.8-big-endian-tests.patch +) + +src_configure() { + # Header-only library + if use test; then + # See https://github.com/g-truc/glm/pull/1087 + # https://bugs.gentoo.org/818235 + test-flag-CXX -fno-ipa-modref && append-cxxflags -fno-ipa-modref + + 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 +} |