summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Zou2021-05-08 11:25:52 +0200
committerMichel Zou2021-05-08 11:25:52 +0200
commitf70f3a3823937fafe8f8ce0864b9683c6730a7cf (patch)
tree6d8cc3214738aa2b9c0c00769a98deff9c1986f4
parenta7b1287fbdffe674a5ef1c72e096cc4d8ef41697 (diff)
downloadaur-f70f3a3823937fafe8f8ce0864b9683c6730a7cf.tar.gz
spirv headers + dll
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
2 files changed, 16 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7a59215fdd08..39b93281ade4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mingw-w64-glslang
pkgdesc = OpenGL and OpenGL ES shader front end and validator (mingw-w64)
pkgver = 11.4.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/KhronosGroup/glslang
arch = any
license = BSD
diff --git a/PKGBUILD b/PKGBUILD
index b4f8f6c882c7..2caf74bee846 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mingw-w64-glslang
pkgver=11.4.0
-pkgrel=1
+pkgrel=2
pkgdesc='OpenGL and OpenGL ES shader front end and validator (mingw-w64)'
arch=('any')
url='https://github.com/KhronosGroup/glslang'
@@ -19,6 +19,9 @@ _architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
cp -r SPIRV-Tools glslang-${pkgver}/External/spirv-tools
cp -r SPIRV-Headers glslang-${pkgver}/External/spirv-tools/external/spirv-headers
+
+ cd glslang-$pkgver
+ curl -L https://github.com/KhronosGroup/glslang/pull/2634.patch | patch -p1
}
build() {
@@ -27,24 +30,32 @@ build() {
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-cmake \
-DCMAKE_BUILD_TYPE=Release \
- -DBUILD_SHARED_LIBS=OFF \
..
make
sed "s|@TRIPLE@|${_arch}|g" "${srcdir}"/wine-glslangValidator.sh > ${_arch}-glslangValidator
popd
+ mkdir -p build-${_arch}-static && pushd build-${_arch}-static
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_SHARED_LIBS=OFF \
+ ..
+ make
+ popd
done
}
package() {
for _arch in ${_architectures}; do
+ cd "${srcdir}/glslang-${pkgver}/build-${_arch}-static"
+ make DESTDIR="${pkgdir}" install
cd "${srcdir}/glslang-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
# Delete the stuff that's been vendored in. It's not ideal but that's we'll deal with for now.
mv "${pkgdir}"/usr/${_arch}/bin/spirv-remap.exe .
- rm -r "${pkgdir}"/usr/${_arch}/{bin/spirv*,bin/libSPIRV-*,include/glslang/SPIRV,include/spirv-tools,SPIRV-Tools*,lib/libSPIRV-*,lib/pkgconfig}
+ rm -r "${pkgdir}"/usr/${_arch}/{bin/spirv*,bin/libSPIRV-Tools*,include/spirv-tools,SPIRV-Tools*,lib/libSPIRV-Tools*,lib/pkgconfig}
mv spirv-remap.exe "${pkgdir}"/usr/${_arch}/bin/spirv-remap.exe
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
-# ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
install -d "$pkgdir"/usr/bin
install -m755 ${_arch}-glslangValidator "$pkgdir"/usr/bin
done