diff options
Diffstat (limited to 'graphics/glslang/glslang.SlackBuild')
-rw-r--r-- | graphics/glslang/glslang.SlackBuild | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/graphics/glslang/glslang.SlackBuild b/graphics/glslang/glslang.SlackBuild index d51ff730b51ee..7aa99996983a5 100644 --- a/graphics/glslang/glslang.SlackBuild +++ b/graphics/glslang/glslang.SlackBuild @@ -22,12 +22,9 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# For best compatibility use git versions which vulkan-sdk upstream also uses. -# Vulkan-ValidationLayers/scripts/known_good.json -# https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/1082 - PRGNAM=glslang -VERSION=${VERSION:-bacaef3237c515e40d1a24722be48c0a0b30f75f} +VERSION=${VERSION:-11.0.0} +SRCVERS="10-$VERSION" BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -60,27 +57,12 @@ fi set -eu -# For best compatibility use git versions which glslang upstream also uses. -# glslang/known_good.json -SPIRV_HEADERS_VERSION=${SPIRV_HEADERS_VERSION:-060627f0b0d2fa8581b5acb939f46e3b9e500593} -SPIRV_TOOLS_VERSION=${SPIRV_TOOLS_VERSION:-0a1fb588cd365f7737cb121fdd64553923e0cef6} - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION - -( - cd External - tar xvf $CWD/SPIRV-Tools-$SPIRV_TOOLS_VERSION.tar.gz - mv SPIRV-Tools-$SPIRV_TOOLS_VERSION spirv-tools - cd spirv-tools/external - tar xvf $CWD/SPIRV-Headers-$SPIRV_HEADERS_VERSION.tar.gz - mv SPIRV-Headers-$SPIRV_HEADERS_VERSION spirv-headers -) - +rm -rf $PRGNAM-$SRCVERS +tar xvf $CWD/$PRGNAM-$SRCVERS.tar.gz +cd $PRGNAM-$SRCVERS chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -88,13 +70,18 @@ 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 {} \; +# CMake: Allow linking against system-installed SPIRV-Tools +# https://github.com/KhronosGroup/glslang/issues/1585 +# https://github.com/KhronosGroup/glslang/pull/1621 +patch -p1 < $CWD/SPIRV-Tools-shared.patch + 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 \ + -DBUILD_EXTERNAL=OFF \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_SKIP_RPATH=TRUE \ -DCMAKE_BUILD_TYPE=Release .. @@ -112,7 +99,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -#cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |