summaryrefslogtreecommitdiff
path: root/glslang/PKGBUILD
blob: 54b3e4814038f630269e9f7877b74b5761905587 (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
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>

# Careful when upgrading this package! It usually breaks ABI without bumping soname.
pkgname=glslang
pkgver=11.4.0
pkgrel=101
pkgdesc='OpenGL and OpenGL ES shader front end and validator'
arch=('x86_64')
url='https://github.com/KhronosGroup/glslang'
license=('BSD')
depends=('gcc-libs')
makedepends=('cmake' 'ninja' 'git')
options=('staticlibs')
# Get the commits from known_good.json for every release
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz)
        #git+https://github.com/KhronosGroup/SPIRV-Tools#commit=dc72924cb31cd9f3dbc3eb47e9d926cf641e3a07
        #git+https://github.com/KhronosGroup/SPIRV-Headers#commit=dafead1765f6c1a5f9f8a76387dcb2abe4e54acd)
sha256sums=('9bae79c2b640b60474f8944a5ab4aff3af990074636ea2a0a3c97cb86be61dfa')
            #'SKIP'
            #'SKIP')
#source=(${pkgname}-${pkgver}.tar.gz::https://github.com/KhronosGroup/glslang/archive/${pkgver}.tar.gz)
#sha256sums=('8ff2fcf9b054e4a4ef56fcd8a637322f827b2b176a592a618d63672ddb896e06')

prepare() {
  cd ${pkgname}-${pkgver}
	rm -rfv External
}
build() {
  cd ${pkgname}-${pkgver}
  mkdir -p build-shared
  cd build-shared
	cmake .. \
		-GNinja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_EXTERNAL=OFF \
		-DENABLE_OPT=OFF \
		-DENABLE_CTEST=OFF \
		-DENABLE_GLSLANG_JS=OFF \
		-DENABLE_SPVREMAPPER=OFF \
		-DBUILD_SHARED_LIBS=ON
  ninja -Cbuild-shared
}

package() {
  cd ${pkgname}-${pkgver}
  DESTDIR="${pkgdir}" ninja -C build-shared install

  install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE

  cd "${pkgdir}"/usr/lib
  for lib in *.so; do
    ln -sf "${lib}" "${lib}.0"
  done
}

# vim: ts=2 sw=2 et: