From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1B04B15838C for ; Sat, 27 Jan 2024 18:25:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39E22E29D7; Sat, 27 Jan 2024 18:25:02 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1BAE7E29D7 for ; Sat, 27 Jan 2024 18:25:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1EE1634343D for ; Sat, 27 Jan 2024 18:25:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 56C40BE7 for ; Sat, 27 Jan 2024 18:24:59 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1706379830.975efa4b289384a6af4b79fe3f151429f1e9297c.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/glm/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/glm/glm-1.0.0-r1.ebuild X-VCS-Directories: media-libs/glm/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 975efa4b289384a6af4b79fe3f151429f1e9297c X-VCS-Branch: master Date: Sat, 27 Jan 2024 18:24:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 612fa82a-4cab-441e-986e-b52cf645e34f X-Archives-Hash: 08cd38afc6c8fecd9a337fec01e2904f commit: 975efa4b289384a6af4b79fe3f151429f1e9297c Author: Chris Mayo gmail com> AuthorDate: Sat Jan 27 17:05:46 2024 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Sat Jan 27 18:23:50 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=975efa4b media-libs/glm: install CMake config files Signed-off-by: Chris Mayo gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35045 Acked-by: Alfredo Tupone gentoo.org> Signed-off-by: Ionen Wolkens gentoo.org> media-libs/glm/glm-1.0.0-r1.ebuild | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/media-libs/glm/glm-1.0.0-r1.ebuild b/media-libs/glm/glm-1.0.0-r1.ebuild new file mode 100644 index 000000000000..1f037d446d41 --- /dev/null +++ b/media-libs/glm/glm-1.0.0-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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 +) + +DOCS=( manual.md readme.md ) + +src_configure() { + # Header-only library + local mycmakeargs=( + -DGLM_BUILD_INSTALL=ON + -DGLM_BUILD_LIBRARY=OFF + -DGLM_BUILD_TESTS=$(usex test) + ) + + 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 + + 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_src_configure + + 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() { + cmake_src_install + + insinto /usr/share/pkgconfig + doins "${BUILD_DIR}/glm.pc" +}