commit:     c8943fac113b3306a7996b1511a0e1bf6b1180d5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  1 03:51:16 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct  1 03:51:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8943fac

games-util/basis_universal: add 1.16.4

Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-util/basis_universal/Manifest                |  1 +
 .../basis_universal/basis_universal-1.16.4.ebuild  | 44 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/games-util/basis_universal/Manifest 
b/games-util/basis_universal/Manifest
index 58fd6f56d6b3..2eba747cecf8 100644
--- a/games-util/basis_universal/Manifest
+++ b/games-util/basis_universal/Manifest
@@ -1 +1,2 @@
 DIST basis_universal-1.16.3.tar.gz 29151155 BLAKE2B 
e3ef3ead6223aa73012bd74e51dae269746cfcf2720c524be8096ce8643777723888f98a140d2e28c881ed60ab54b7ea6fef4205b72757d72e766f85806b4484
 SHA512 
3dca02ad6c14e74df7a89d3b2a59b970635cf5e268b96eb91b10033e2b8e635c83aca6b8e9b34a1b689ed5ffe7c8348d15b8524385f6d07a51cc34a46246a0b7
+DIST basis_universal-1.16.4.tar.gz 29156236 BLAKE2B 
7beb64406a849e052e74a360803ddf197daaf74f6682f372535645f4e148b28da45c93607b54b81e82a70d44e878489c54cb5054155c5837fecef951e3fd9a2a
 SHA512 
7f7dd62741b4a3e13050233a2ed751e6108cde9eab7b05ea5882ded6ab49fe181cc30e795cf73f8fa625a71e77ae891fda5ea84e20b632b1397844d6539715b3

diff --git a/games-util/basis_universal/basis_universal-1.16.4.ebuild 
b/games-util/basis_universal/basis_universal-1.16.4.ebuild
new file mode 100644
index 000000000000..d5ffebc5b256
--- /dev/null
+++ b/games-util/basis_universal/basis_universal-1.16.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Basis Universal GPU Texture Codec"
+HOMEPAGE="https://github.com/BinomialLLC/basis_universal";
+# dist .zip is just a exe for windows
+SRC_URI="https://github.com/BinomialLLC/basis_universal/archive/refs/tags/${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 zstd? ( BSD )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="cpu_flags_x86_sse4_1 opencl zstd"
+
+# zstd is bundled, see https://github.com/BinomialLLC/basis_universal/pull/228
+DEPEND="
+       opencl? ( virtual/opencl )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.16.3-respect-CFLAGS.patch
+       "${FILESDIR}"/${PN}-1.16.3-fix-RPATH.patch
+       "${FILESDIR}"/${PN}-1.16.3-SSE4.1-AVX-checks.patch
+)
+
+src_configure() {
+       local x64=ON
+       if $(tc-getCC) -dM -E  -x c - < <(echo 'int main() { }') | grep -qi 
"#define __PTRDIFF_WIDTH__ 32" ; then
+               x64=OFF
+       fi
+
+       local mycmakeargs=(
+               -DBUILD_X64=${x64}
+               -DOPENCL=$(usex opencl)
+               -DSSE=$(usex cpu_flags_x86_sse4_1)
+               -DZSTD=$(usex zstd)
+       )
+
+       cmake_src_configure
+}

Reply via email to