diff options
Diffstat (limited to 'graphics/vulkan-sdk/vulkan-sdk.SlackBuild')
-rw-r--r-- | graphics/vulkan-sdk/vulkan-sdk.SlackBuild | 143 |
1 files changed, 61 insertions, 82 deletions
diff --git a/graphics/vulkan-sdk/vulkan-sdk.SlackBuild b/graphics/vulkan-sdk/vulkan-sdk.SlackBuild index 092bb5eb5e..c30f7d7bfc 100644 --- a/graphics/vulkan-sdk/vulkan-sdk.SlackBuild +++ b/graphics/vulkan-sdk/vulkan-sdk.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Slackware build script for vulkan-sdk @@ -25,7 +25,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=vulkan-sdk -VERSION=${VERSION:-1.1.106.0} +VERSION=${VERSION:-1.1.108.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -59,9 +59,23 @@ fi set -eu -GLSLANG_VERSION=${GLSLANG_VERSION:-7.11.3188} -SPIRV_HEADERS_VERSION=${SPIRV_HEADERS_VERSION:-1.3.7} -SPIRV_TOOLS_VERSION=${SPIRV_TOOLS_VERSION:-2019.2} +chdir () { cd -- "$SRC/$1"; printf %s\\n '' "Building $1" ''; } + +cmake_build () { + mkdir -p build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ + -DCMAKE_BUILD_TYPE=Release \ + "${@:-}" .. + make + make install DESTDIR=$PKG +} + +GLSLANG_VERSION=${GLSLANG_VERSION:-7.11.3214} +SPIRV_HEADERS_VERSION=${SPIRV_HEADERS_VERSION:-1.4.1} +SPIRV_TOOLS_VERSION=${SPIRV_TOOLS_VERSION:-2019.3} rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -92,49 +106,27 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -cd $SRC/glslang-$GLSLANG_VERSION -printf %s\\n '' "Building glslang-$GLSLANG_VERSION" '' +chdir glslang-$GLSLANG_VERSION -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ - -DCMAKE_SKIP_RPATH=TRUE \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd $SRC/Vulkan-Headers-sdk-$VERSION -printf %s\\n '' "Building Vulkan-Headers-sdk-$VERSION" '' +cmake_build \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_SKIP_RPATH=TRUE -mkdir -p build -cd build - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr\ - -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd $SRC/Vulkan-Loader-sdk-$VERSION -printf %s\\n '' "Building Vulkan-Loader-sdk-$VERSION" '' +chdir Vulkan-Headers-sdk-$VERSION -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ - -DCMAKE_SKIP_RPATH=TRUE \ - -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ - -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd $SRC/Vulkan-ValidationLayers-sdk-$VERSION -printf %s\\n '' "Building Vulkan-ValidationLayers-sdk-$VERSION" '' +cmake_build + +chdir Vulkan-Loader-sdk-$VERSION + +cmake_build \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_SKIP_RPATH=TRUE \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr + +chdir Vulkan-ValidationLayers-sdk-$VERSION # Disable hardcoded errors sed -i '/-Werror/d' CMakeLists.txt @@ -143,43 +135,30 @@ sed -i '/-Werror/d' CMakeLists.txt sed -i '/#include <math.h>/i#include <cmath>\n' \ layers/parameter_validation_utils.cpp -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ - -DCMAKE_INSTALL_DATADIR=share \ - -DCMAKE_SKIP_RPATH=TRUE \ - -DBUILD_TESTS=OFF \ - -DBUILD_WSI_XLIB_SUPPORT=ON \ - -DBUILD_WSI_XCB_SUPPORT=ON \ - -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ - -DGLSLANG_INSTALL_DIR=$PKG/usr \ - -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd $SRC/Vulkan-Tools-sdk-$VERSION -printf %s\\n '' "Building Vulkan-Tools-sdk-$VERSION" '' - -mkdir -p build -cd build - cmake \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \ - -DCMAKE_SKIP_RPATH=TRUE \ - -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ - -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \ - -DGLSLANG_INSTALL_DIR=$PKG/usr \ - -DVULKAN_LOADER_INSTALL_DIR=$PKG/usr \ - -DCMAKE_BUILD_TYPE=Release .. - make - make install DESTDIR=$PKG -cd $SRC +cmake_build \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_DATADIR=share \ + -DCMAKE_SKIP_RPATH=TRUE \ + -DBUILD_TESTS=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=ON \ + -DBUILD_WSI_XCB_SUPPORT=ON \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DGLSLANG_INSTALL_DIR=$PKG/usr \ + -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr + +chdir Vulkan-Tools-sdk-$VERSION + +cmake_build \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_SKIP_RPATH=TRUE \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DVULKAN_HEADERS_INSTALL_DIR=$PKG/usr \ + -DGLSLANG_INSTALL_DIR=$PKG/usr \ + -DVULKAN_LOADER_INSTALL_DIR=$PKG/usr + +cd -- "$SRC" find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |