summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-28 05:01:23 +0000
committerSam James <sam@gentoo.org>2023-01-28 05:10:53 +0000
commit5144810b848e0bf43bbdd7185e4405f5cc5cea2b (patch)
tree583090fc8565d49de5977a8bca9957fbbe7b5cb6 /games-util
parentgames-action/supertuxkart: make vulkan unconditional for now (diff)
downloadgentoo-5144810b848e0bf43bbdd7185e4405f5cc5cea2b.tar.gz
gentoo-5144810b848e0bf43bbdd7185e4405f5cc5cea2b.tar.bz2
gentoo-5144810b848e0bf43bbdd7185e4405f5cc5cea2b.zip
games-util/basis_universal: new package, add 1.16.3
Bug: https://bugs.gentoo.org/879319 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-util')
-rw-r--r--games-util/basis_universal/Manifest1
-rw-r--r--games-util/basis_universal/basis_universal-1.16.3.ebuild43
-rw-r--r--games-util/basis_universal/files/basis_universal-1.16.3-fix-RPATH.patch10
-rw-r--r--games-util/basis_universal/files/basis_universal-1.16.3-respect-CFLAGS.patch11
-rw-r--r--games-util/basis_universal/metadata.xml14
5 files changed, 79 insertions, 0 deletions
diff --git a/games-util/basis_universal/Manifest b/games-util/basis_universal/Manifest
new file mode 100644
index 000000000000..58fd6f56d6b3
--- /dev/null
+++ b/games-util/basis_universal/Manifest
@@ -0,0 +1 @@
+DIST basis_universal-1.16.3.tar.gz 29151155 BLAKE2B e3ef3ead6223aa73012bd74e51dae269746cfcf2720c524be8096ce8643777723888f98a140d2e28c881ed60ab54b7ea6fef4205b72757d72e766f85806b4484 SHA512 3dca02ad6c14e74df7a89d3b2a59b970635cf5e268b96eb91b10033e2b8e635c83aca6b8e9b34a1b689ed5ffe7c8348d15b8524385f6d07a51cc34a46246a0b7
diff --git a/games-util/basis_universal/basis_universal-1.16.3.ebuild b/games-util/basis_universal/basis_universal-1.16.3.ebuild
new file mode 100644
index 000000000000..d89b78821f60
--- /dev/null
+++ b/games-util/basis_universal/basis_universal-1.16.3.ebuild
@@ -0,0 +1,43 @@
+# 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"
+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="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.16.3-respect-CFLAGS.patch
+ "${FILESDIR}"/${PN}-1.16.3-fix-RPATH.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
+}
diff --git a/games-util/basis_universal/files/basis_universal-1.16.3-fix-RPATH.patch b/games-util/basis_universal/files/basis_universal-1.16.3-fix-RPATH.patch
new file mode 100644
index 000000000000..d15ba0d4ddfb
--- /dev/null
+++ b/games-util/basis_universal/files/basis_universal-1.16.3-fix-RPATH.patch
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -103,7 +103,6 @@ if (NOT MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBASISU_SUPPORT_SSE=0")
+ endif()
+
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_LINK_FLAGS} -Wl,-rpath .")
+ endif()
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COMPILE_FLAGS}")
diff --git a/games-util/basis_universal/files/basis_universal-1.16.3-respect-CFLAGS.patch b/games-util/basis_universal/files/basis_universal-1.16.3-respect-CFLAGS.patch
new file mode 100644
index 000000000000..e7c1db7ea2bf
--- /dev/null
+++ b/games-util/basis_universal/files/basis_universal-1.16.3-respect-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -72,7 +72,7 @@ if (NOT MSVC)
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined")
+ endif()
+
+- set(CMAKE_CXX_FLAGS -std=c++11)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(GCC_COMPILE_FLAGS "-fvisibility=hidden -fPIC -fno-strict-aliasing -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-unused-local-typedefs -Wno-unused-value -Wno-unused-parameter -Wno-unused-variable")
+
+ if (NOT BUILD_X64)
diff --git a/games-util/basis_universal/metadata.xml b/games-util/basis_universal/metadata.xml
new file mode 100644
index 000000000000..20e5846d4192
--- /dev/null
+++ b/games-util/basis_universal/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="opencl">Enable OpenCL support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">BinomialLLC/basis_universal</remote-id>
+ </upstream>
+</pkgmetadata>