blob: a809e174892119791860985b3edaf2347c20fa27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Maintainer: Lone_Wolf <Lone_Wolf@klaas-de-kat.nl>
# Contributor: Eric Engestrom <aur [at] engestrom [dot] ch>
pkgname=spirv-tools-git
epoch=3
pkgver="2024.1".3932.fe7bae090
pkgrel=1
pkgdesc='API and commands for processing SPIR-V modules'
url='https://github.com/KhronosGroup/SPIRV-Tools'
arch=('i686' 'x86_64')
license=('custom')
groups=('vulkan-devel')
source=('git+https://github.com/KhronosGroup/SPIRV-Tools'
'git+https://github.com/google/googletest.git'
'git+https://github.com/google/effcee.git'
'git+https://github.com/google/re2.git'
'git+https://github.com/abseil/abseil-cpp.git'
'https://github.com/KhronosGroup/SPIRV-Tools/commit/75ad1345d4af5268448a9b26797294b48795cd69.patch'
)
sha1sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'23be87aa32fb5189b61975033c6a69035f4cb0e8')
depends=(glibc gcc-libs sh)
makedepends=(cmake python git spirv-headers-git)
conflicts=(spirv-tools)
provides=(spirv-tools)
options=(!debug)
cmake_args=(
-G "Unix Makefiles"
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=/usr
-D CMAKE_INSTALL_LIBDIR=lib
-D SPIRV-Headers_SOURCE_DIR=/usr/
-D BUILD_SHARED_LIBS=ON
-D SPIRV_TOOLS_BUILD_STATIC=OFF
-D SPIRV_WERROR=OFF
)
prepare() {
# link external sources so cmake can find them
pushd SPIRV-Tools/external
ln -s "$srcdir"/googletest
ln -s $srcdir/abseil-cpp abseil_cpp
ln -s "$srcdir"/effcee
ln -s "$srcdir"/re2
popd
patch --directory="SPIRV-Tools" --reverse --strip=1 --input="$srcdir"/75ad1345d4af5268448a9b26797294b48795cd69.patch
cmake -S SPIRV-Tools -B _build "${cmake_args[@]}" -Wno-dev
make -C _build spirv-tools-build-version
}
pkgver() {
local _ver1 _ver2
# read fails if only 1 var is used
IFS="," read -r _ver1 _ver2 < _build/build-version.inc || [ -n "_ver1" ]
cd SPIRV-Tools
echo ${_ver1//v/}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
build() {
make -C _build
}
check() {
make -C _build test
}
package() {
make -C _build DESTDIR="$pkgdir" install
install -Dm644 "$srcdir"/SPIRV-Tools/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
|