summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMladen Milinkovic2019-07-09 01:14:23 +0200
committerMladen Milinkovic2019-07-09 01:14:23 +0200
commit404eeb6b75c80535f3c3ec13c0da98ec730c6472 (patch)
tree5aba894697ac4eb2674420a07b660651f3db3561
downloadaur-mingw-w64-spirv-tools.tar.gz
Version 2018.5
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD53
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9b47df3de08
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = mingw-w64-spirv-tools
+ pkgdesc = API and commands for processing SPIR-V modules (mingw-w64)
+ pkgver = 2018.5
+ pkgrel = 1
+ url = https://www.khronos.org/vulkan/
+ arch = any
+ groups = vulkan-devel
+ license = custom
+ makedepends = mingw-w64-cmake
+ makedepends = python
+ makedepends = git
+ source = git+https://github.com/KhronosGroup/SPIRV-Tools.git#tag=v2018.5
+ source = git+https://github.com/KhronosGroup/SPIRV-Headers.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = mingw-w64-spirv-tools
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..c98cdbbd9a8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+pkg/
+src/
+*.log
+*.sig
+*.tar
+*.xz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bb4132d351b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+_pkgname=spirv-tools
+pkgname="mingw-w64-${_pkgname}"
+pkgver=2018.5
+pkgrel=1
+pkgdesc="API and commands for processing SPIR-V modules (mingw-w64)"
+arch=('any')
+url="https://www.khronos.org/vulkan/"
+license=('custom')
+groups=(vulkan-devel)
+depends=()
+makedepends=('mingw-w64-cmake' 'python' 'git')
+source=("git+https://github.com/KhronosGroup/SPIRV-Tools.git#tag=v${pkgver}"
+ git+https://github.com/KhronosGroup/SPIRV-Headers.git)
+sha256sums=('SKIP'
+ 'SKIP')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+build() {
+ cd SPIRV-Tools
+
+ for _arch in ${_architectures}; do
+ unset LDFLAGS
+ mkdir -p "build-${_arch}"-{shared,static}
+ (cd "build-${_arch}-shared"
+ ${_arch}-cmake .. \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DSPIRV_WERROR=Off \
+ -DSPIRV-Headers_SOURCE_DIR=${srcdir}/SPIRV-Headers \
+ -DBUILD_SHARED_LIBS=ON
+ make)
+ (cd "build-${_arch}-static"
+ ${_arch}-cmake .. \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DSPIRV_WERROR=Off \
+ -DSPIRV-Headers_SOURCE_DIR=${srcdir}/SPIRV-Headers \
+ -DBUILD_SHARED_LIBS=OFF
+ make)
+ done
+}
+
+package() {
+ cd SPIRV-Tools
+ for _arch in ${_architectures}; do
+ make -C build-${_arch}-shared DESTDIR="${pkgdir}" install
+ make -C build-${_arch}-static DESTDIR="${pkgdir}" install
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ done
+}