public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-util/basis_universal/, games-util/basis_universal/files/
Date: Sat, 28 Jan 2023 05:11:04 +0000 (UTC)	[thread overview]
Message-ID: <1674882653.5144810b848e0bf43bbdd7185e4405f5cc5cea2b.sam@gentoo> (raw)

commit:     5144810b848e0bf43bbdd7185e4405f5cc5cea2b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 05:01:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 05:10:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5144810b

games-util/basis_universal: new package, add 1.16.3

Bug: https://bugs.gentoo.org/879319
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-util/basis_universal/Manifest                |  1 +
 .../basis_universal/basis_universal-1.16.3.ebuild  | 43 ++++++++++++++++++++++
 .../files/basis_universal-1.16.3-fix-RPATH.patch   | 10 +++++
 .../basis_universal-1.16.3-respect-CFLAGS.patch    | 11 ++++++
 games-util/basis_universal/metadata.xml            | 14 +++++++
 5 files changed, 79 insertions(+)

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>


             reply	other threads:[~2023-01-28  5:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28  5:11 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-03 19:52 [gentoo-commits] repo/gentoo:master commit in: games-util/basis_universal/, games-util/basis_universal/files/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1674882653.5144810b848e0bf43bbdd7185e4405f5cc5cea2b.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox