# Maintainer: Sven-Hendrik Haase # Careful when upgrading this package! It usually breaks ABI without bumping soname. # Included in Slint by Didier Spaier didieratslintdotfr pkgname=glslang pkgver=11.12.0 pkgrel=1slint slackdesc="$pkgname (OpenGL and OpenGL ES shader front end and validator)" arch=('x86_64') url='https://github.com/KhronosGroup/glslang' license=('BSD') depends=('gcc-libs' 'python') makedepends=('cmake' 'ninja' 'git') options=('nosrcpack') # Get the commits from known_good.json for every release source=(https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz glslang-fix-cmake-locations.patch) sha256sums=('7795a97450fecd9779f3d821858fbc2d1a3bf1dd602617d95b685ccbcabc302f' 'd5888f1750af014eccd6184d58e9ced2e8e203b6674d5ccd2a5cc9d2aab2e2a0' 'SKIP' 'SKIP') docs=(LICENSE.txt) build() { # Sadly, glslang requires super specific versions of SPIRV headers and # spirv-tools and so I'm afraid that for the time being we'll have to use # their vendored version until we figure out a good way to use system # libraries. git clone https://github.com/KhronosGroup/SPIRV-Tools.git cd SPIRV-Tools git checkout eb0a36633d2acf4de82588504f951ad0f2cecacb cd .. git clone https://github.com/KhronosGroup/SPIRV-Headers.git cd SPIRV-Headers git checkout 85a1ed200d50660786c1a88d9166e871123cce39 cd .. cp -r SPIRV-Tools ${pkgname}-${pkgver}/External/spirv-tools || exit 1 cp -r SPIRV-Headers ${pkgname}-${pkgver}/External/spirv-tools/external/spirv-headers || exit 1 cd ${pkgname}-${pkgver} patch -Np1 --verbose -i "$SRC"/$pkgname-fix-cmake-locations.patch || exit 1 cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -Bbuild-shared \ -GNinja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DMAN_INSTALL_DIR=/usr/man \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_SHARED_LIBS=ON ninja -Cbuild-shared # ninja -Cbuild-shared test DESTDIR="$PKG" ninja -C build-shared install mkdir -p "$PKG"/usr/doc/${pkgname}-${pkgver} pandoc -f gfm -t html5 -o "$PKG"/usr/doc/${pkgname}-${pkgver}/README.html README.md for lib in *.so; do ln -sf "${lib}" "${lib}.0" done # Delete the stuff that's been vendored in. It's not ideal but that's we'll deal with for now. mv "$PKG"/usr/bin/spirv-remap . rm -r "$PKG"/usr/{bin/spirv*,include/spirv-tools,lib${LIBDIRSUFFIX}/cmake/SPIRV-Tools*,lib${LIBDIRSUFFIX}/libSPIRV-*,lib${LIBDIRSUFFIX}/pkgconfig} mv spirv-remap "$PKG"/usr/bin/spirv-remap } # vim: ts=2 sw=2 et: