repo/gentoo:master commit in: dev-util/shader-slang/, dev-util/shader-slang/files/

"Ionen Wolkens" <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786026142.c965fab47ff40a337f198dc84d7d2124437c5467.ionen@gentoo>
commit:     c965fab47ff40a337f198dc84d7d2124437c5467
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  6 12:18:21 2026 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Aug  6 14:22:22 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c965fab4

dev-util/shader-slang: new package, add 2026.14.1

New dependency of x11-terms/kitty.

Kind of messy to package, ebuild likely still has rough edges.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/shader-slang/Manifest                     |  1 +
 .../files/shader-slang-2026.14.1-libdir.patch      | 27 +++++++
 .../files/shader-slang-2026.14.1-lz4.patch         |  8 ++
 .../shader-slang-2026.14.1-system-glslang.patch    |  5 ++
 dev-util/shader-slang/metadata.xml                 | 11 +++
 .../shader-slang/shader-slang-2026.14.1.ebuild     | 94 ++++++++++++++++++++++
 6 files changed, 146 insertions(+)

diff --git a/dev-util/shader-slang/Manifest b/dev-util/shader-slang/Manifest
new file mode 100644
index 000000000000..0ba6da5b56fc
--- /dev/null
+++ b/dev-util/shader-slang/Manifest
@@ -0,0 +1 @@
+DIST shader-slang-2026.14.1.tar.xz 22310728 BLAKE2B ee9e47f34145041bc28a5b3508546be06f246f8575e3ca3885db156ec55ca73ecf5ff8cd8cca3cbde86e3b0ec5716c4ba17764419afc7772099aff77c1d84a6c SHA512 5ff4d6acc6deaa1fd34266700ef39a1550a05a969ec756d1fdcda7fa3d3a358c25eadde946ef88cca1c445e3abe223e2b3bfe56241245f6a9352eede6437a798

diff --git a/dev-util/shader-slang/files/shader-slang-2026.14.1-libdir.patch b/dev-util/shader-slang/files/shader-slang-2026.14.1-libdir.patch
new file mode 100644
index 000000000000..895e7f746f5b
--- /dev/null
+++ b/dev-util/shader-slang/files/shader-slang-2026.14.1-libdir.patch
@@ -0,0 +1,27 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -732 +732 @@
+-            DESTINATION "lib/pkgconfig"
++            DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+--- a/cmake/SlangTarget.cmake
++++ b/cmake/SlangTarget.cmake
+@@ -717 +717 @@
+-set(library_subdir lib)
++set(library_subdir ${CMAKE_INSTALL_LIBDIR})
+--- a/extras/pkgconfig/slang-compiler.pc.in
++++ b/extras/pkgconfig/slang-compiler.pc.in
+@@ -3 +3 @@
+-libdir=${prefix}/lib
++libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
+--- a/source/slang/CMakeLists.txt
++++ b/source/slang/CMakeLists.txt
+@@ -502,2 +502,2 @@
+-        ARCHIVE DESTINATION lib
+-        LIBRARY DESTINATION lib
++        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+--- a/source/standard-modules/CMakeLists.txt
++++ b/source/standard-modules/CMakeLists.txt
+@@ -22 +22 @@
+-    set(slang_library_dir "lib")
++    set(slang_library_dir ${CMAKE_INSTALL_LIBDIR})

diff --git a/dev-util/shader-slang/files/shader-slang-2026.14.1-lz4.patch b/dev-util/shader-slang/files/shader-slang-2026.14.1-lz4.patch
new file mode 100644
index 000000000000..85b516364e25
--- /dev/null
+++ b/dev-util/shader-slang/files/shader-slang-2026.14.1-lz4.patch
@@ -0,0 +1,8 @@
+app-arch/lz4 only provides pkg-config files
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -557 +557,3 @@
+-    find_package(lz4 REQUIRED)
++    find_package(PkgConfig REQUIRED)
++    pkg_check_modules(lz4 REQUIRED IMPORTED_TARGET liblz4)
++    add_library(lz4_static ALIAS PkgConfig::lz4)

diff --git a/dev-util/shader-slang/files/shader-slang-2026.14.1-system-glslang.patch b/dev-util/shader-slang/files/shader-slang-2026.14.1-system-glslang.patch
new file mode 100644
index 000000000000..a5707ca43f41
--- /dev/null
+++ b/dev-util/shader-slang/files/shader-slang-2026.14.1-system-glslang.patch
@@ -0,0 +1,5 @@
+--- a/source/slang-glslang/slang-glslang.cpp
++++ b/source/slang-glslang/slang-glslang.cpp
+@@ -4 +4 @@
+-#include "SPIRV/GlslangToSpv.h"
++#include "glslang/SPIRV/GlslangToSpv.h"

diff --git a/dev-util/shader-slang/metadata.xml b/dev-util/shader-slang/metadata.xml
new file mode 100644
index 000000000000..4e72aae85657
--- /dev/null
+++ b/dev-util/shader-slang/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>[email protected]</email>
+		<name>Ionen Wolkens</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">shader-slang/slang</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-util/shader-slang/shader-slang-2026.14.1.ebuild b/dev-util/shader-slang/shader-slang-2026.14.1.ebuild
new file mode 100644
index 000000000000..93161c50851c
--- /dev/null
+++ b/dev-util/shader-slang/shader-slang-2026.14.1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Making it easier to work with shaders"
+HOMEPAGE="https://shader-slang.org/"
+# tarball is same as upstream except for including git submodules
+SRC_URI="https://distfiles.gentoo.org/pub/dev/[email protected]/${P}.tar.xz"
+
+LICENSE="
+	Apache-2.0-with-LLVM-exceptions
+	Apache-2.0 Boost-1.0 CC-BY-4.0 MIT Unlicense UoI-NCSA
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# needs an annoying submodule that fetches many things, the tests do
+# runtime compilation that fail due to missing headers, and they also
+# need special care and be fed a list of expected failures -- would
+# rather not bother when what the (current) maintainer want is just
+# a bin/slangc that works to build x11-terms/kitty as a test
+RESTRICT="test"
+
+RDEPEND="
+	app-arch/lz4:=
+	dev-libs/miniz:=
+	dev-util/glslang:=
+	dev-util/spirv-tools
+"
+DEPEND="
+	${RDEPEND}
+	>=dev-util/spirv-headers-1.4.350
+	dev-util/vulkan-headers
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2026.14.1-libdir.patch
+	"${FILESDIR}"/${PN}-2026.14.1-lz4.patch
+	"${FILESDIR}"/${PN}-2026.14.1-system-glslang.patch
+)
+
+# triggers on examples and other unused subdirs
+CMAKE_QA_COMPAT_SKIP=1
+
+# these are modules and do not need a soname
+QA_SONAME="
+	usr/lib.*/libslang-glsl-module-.*.so
+	usr/lib.*/libslang-glslang-.*.so
+"
+
+src_configure() {
+	# https://github.com/shader-slang/slang/issues/6330
+	use elibc_musl && append-lfs-flags
+
+	local mycmakeargs=(
+		-DSLANG_ENABLE_PCH=no
+		-DSLANG_ENABLE_SLANG_GLSLANG=yes
+		-DSLANG_ENABLE_SPLIT_DEBUG_INFO=no
+		-DSLANG_USE_SYSTEM_GLSLANG=yes
+		-DSLANG_USE_SYSTEM_LZ4=yes
+		-DSLANG_USE_SYSTEM_MINIZ=yes
+		-DSLANG_USE_SYSTEM_SPIRV_HEADERS=yes
+		-DSLANG_USE_SYSTEM_SPIRV_TOOLS=yes
+		-DSLANG_USE_SYSTEM_VULKAN_HEADERS=yes
+		-DSLANG_VERSION_{FULL,NUMERIC}=${PV}
+
+		# legacy option, disabling prevents collision with sys-libs/slang
+		-DSLANG_ENABLE_SLANG_PROXY=no
+
+		# options disabled for simplicity, will revisit only if needed
+		# (some have issues ranging from build failure to live fetching)
+		-DSLANG_ENABLE_AFTERMATH=no
+		-DSLANG_ENABLE_CUDA=no
+		-DSLANG_ENABLE_DXIL=no
+		-DSLANG_ENABLE_EXAMPLES=no
+		-DSLANG_ENABLE_GFX=no
+		-DSLANG_ENABLE_OPTIX=no
+		-DSLANG_ENABLE_SLANG_RHI=no
+		-DSLANG_ENABLE_TESTS=no
+		-DSLANG_SLANG_LLVM_FLAVOR=DISABLE
+	)
+
+	cmake_src_configure
+}
+
+src_install() {
+	local DOCS=()
+	cmake_src_install
+
+	mv -- "${ED}"/usr/share/doc/{slang,${PF}} || die
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.