aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-22 10:46:32 +0200
committerDanilo M. <danix@danix.xyz>2026-09-22 10:46:32 +0200
commit91840b29d0394bd212c826136788061e053d2ea1 (patch)
tree197e0725d3aed7d628c7cb5b511d5a6779e69d73
parentcf371be6c7b6d112c8f89d286ddb4b4688a91136 (diff)
downloadmy-slackbuilds-91840b29d0394bd212c826136788061e053d2ea1.tar.gz
my-slackbuilds-91840b29d0394bd212c826136788061e053d2ea1.zip
slang-bin: add version 2026.18
Binary repack of upstream's official Linux x86_64 release tarball. Building slang from source pulls in LLVM plus several bundled dependencies, so the prebuilt tarball is packaged instead. The tree is installed under /opt/slang-bin-$VERSION with the command line tools symlinked into /usr/bin. The binaries resolve their libraries through a RUNPATH of $ORIGIN/../lib, which follows through the symlink, so no wrapper is needed. kitty 0.49.0 and later require slangc at build time to compile their shaders, which is the reason this package exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
-rw-r--r--.extras/nvchecker.toml6
-rw-r--r--slang-bin/README21
-rw-r--r--slang-bin/slack-desc19
-rw-r--r--slang-bin/slang-bin.SlackBuild121
-rw-r--r--slang-bin/slang-bin.info10
5 files changed, 177 insertions, 0 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml
index 710ae74..a66c070 100644
--- a/.extras/nvchecker.toml
+++ b/.extras/nvchecker.toml
@@ -185,3 +185,9 @@ prefix = "v"
source = "github"
github = "PCSX2/pcsx2"
use_latest_release = true
+
+[slang-bin]
+source = "github"
+github = "shader-slang/slang"
+use_latest_release = true
+prefix = "v"
diff --git a/slang-bin/README b/slang-bin/README
new file mode 100644
index 0000000..8642e68
--- /dev/null
+++ b/slang-bin/README
@@ -0,0 +1,21 @@
+Slang is a shading language and compiler maintained by the Khronos
+Group. It extends HLSL with modules, generics, interfaces and automatic
+differentiation, and targets SPIR-V, GLSL, HLSL, Metal, WGSL, CUDA and
+C++.
+
+This is a binary repack of upstream's official Linux x86_64 release
+tarball, not a source build. Building slang from source pulls in LLVM
+along with several bundled dependencies, so the prebuilt tarball is
+packaged instead.
+
+The tree is installed under /opt/slang-bin-$VERSION and the command line
+tools (slangc, slangd, slangi, slang) are symlinked into /usr/bin. The
+binaries locate their libraries through a RUNPATH of $ORIGIN/../lib, so
+the bin/ and lib/ directories must stay siblings; do not move them
+apart.
+
+This package is x86_64 only. Upstream also ships an aarch64 tarball,
+which this script does not handle.
+
+kitty 0.49.0 and later require slangc at build time to compile their
+shaders, which is the main reason this package exists.
diff --git a/slang-bin/slack-desc b/slang-bin/slack-desc
new file mode 100644
index 0000000..49ae802
--- /dev/null
+++ b/slang-bin/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+slang-bin: slang-bin (shading language compiler)
+slang-bin:
+slang-bin: Slang is a shading language and compiler from the Khronos Group.
+slang-bin: It extends HLSL with modules, generics and interfaces, and compiles
+slang-bin: to SPIR-V, GLSL, HLSL, Metal, CUDA and C++.
+slang-bin:
+slang-bin: This package provides the slangc command line compiler, the slangd
+slang-bin: language server, and the slang runtime libraries. It is a binary
+slang-bin: repack of upstream's official Linux tarball and is x86_64 only.
+slang-bin:
+slang-bin: Homepage: https://shader-slang.org
diff --git a/slang-bin/slang-bin.SlackBuild b/slang-bin/slang-bin.SlackBuild
new file mode 100644
index 0000000..f330981
--- /dev/null
+++ b/slang-bin/slang-bin.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/bash
+
+# Slackware build script for slang (binary repack)
+
+# Copyright 2026 danix <danix@danix.xyz>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=slang-bin
+SRCNAM=slang
+VERSION=${VERSION:-2026.18}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+# Upstream ships x86_64 and aarch64 tarballs; only x86_64 is packaged here.
+if [ "$ARCH" != "x86_64" ]; then
+ echo "$ARCH is not supported: this script packages the x86_64 tarball only."
+ exit 1
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# Where the slang tree lands. The binaries resolve their libs through a
+# RUNPATH of $ORIGIN/../lib, so bin/ and lib/ must stay siblings; keeping the
+# whole tree under one prefix preserves that without patching any ELF.
+# Versioned so an upgrade cannot leave a previous release's libs behind.
+APPDIR=/opt/$PRGNAM-$VERSION
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+# The tarball has no top-level directory: it unpacks bin/, lib/, include/ and
+# friends straight into the CWD, so make one to unpack into.
+mkdir $SRCNAM-$VERSION
+cd $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION-linux-x86_64.tar.gz
+
+mkdir -p $PKG$APPDIR
+cp -a . $PKG$APPDIR
+
+# Make every bundled ELF executable. Upstream ships the shared libraries
+# 0644, which trips sbopkglint's 20-arch test. Match by content, not name.
+# Do NOT strip: these are prebuilt binaries shipped by upstream, and
+# libslang-llvm.so in particular is large and best left as built.
+find $PKG -type f -print0 | xargs -0 file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | while read elf; do
+ chmod 755 "$elf"
+done
+
+# Expose the command line tools on PATH. kitty finds the shader compiler by
+# looking up a bare "slangc", so this symlink is what makes it build. APPDIR
+# is versioned, so the links are generated here rather than hardcoded.
+mkdir -p $PKG/usr/bin
+for tool in slangc slangd slangi slang ; do
+ ln -s $APPDIR/bin/$tool $PKG/usr/bin/$tool
+done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE LICENSES README.md third-party-notices \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+chown -R root:root $PKG
+# -type l is excluded before the perm tests: the /usr/bin entries point into
+# APPDIR, which only exists once the package is installed, so inside $PKG they
+# are dangling. find -L follows symlinks, and chmod on a dangling one errors
+# out under set -e. Their target gets the right mode from the pass anyway.
+find -L $PKG ! -type l \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# Every directory must be world-traversable. The block above only remaps the
+# modes it lists, so a directory shipped 0700 would pass through untouched and
+# leave the tree readable only by root. Root-run lint and root-run builds
+# cannot see that, so normalize unconditionally.
+find $PKG -type d -exec chmod 755 {} \+
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/slang-bin/slang-bin.info b/slang-bin/slang-bin.info
new file mode 100644
index 0000000..48892d6
--- /dev/null
+++ b/slang-bin/slang-bin.info
@@ -0,0 +1,10 @@
+PRGNAM="slang-bin"
+VERSION="2026.18"
+HOMEPAGE="https://shader-slang.org"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/shader-slang/slang/releases/download/v2026.18/slang-2026.18-linux-x86_64.tar.gz"
+MD5SUM_x86_64="9ce2591c6f79ce1d8d276d189db4a8b5"
+REQUIRES=""
+MAINTAINER="danix"
+EMAIL="danix@danix.xyz"