forked from ports/contrib
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# Description: Collection of tools, libraries and tests for shader compilation.
|
|
# URL: https://github.com/google/shaderc
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: glslang ninja
|
|
|
|
name=shaderc
|
|
version=2019.0
|
|
release=1
|
|
source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
|
|
fix-glslang-link-order.patch)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
patch -p1 -i $SRC/fix-glslang-link-order.patch
|
|
|
|
# de-vendor libs and disable git versioning
|
|
sed '/examples/d;/third_party/d' -i CMakeLists.txt
|
|
sed '/build-version/d' -i glslc/CMakeLists.txt
|
|
cat <<- EOF > glslc/src/build-version.inc
|
|
"${pkgver}\\n"
|
|
"$(prt-get info spirv-tools | awk '/^Version:/ {print $2}')\\n"
|
|
"$(prt-get info glslang | awk '/^Version:/ {print $2}')\\n"
|
|
EOF
|
|
|
|
mkdir build
|
|
cd build
|
|
|
|
cmake .. \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DSHADERC_SKIP_TESTS=ON \
|
|
-GNinja \
|
|
-DSHADERC_ENABLE_NV_EXTENSIONS=OFF # Currently requires glslang-git
|
|
|
|
ninja -j ${JOBS:-1}
|
|
|
|
DESTDIR=$PKG ninja install
|
|
|
|
#cd ../glslc
|
|
#asciidoctor -b manpage README.asciidoc -o glslc.1
|
|
#install -D -m 0644 -t $PKG/usr/share/man/man1 glslc/glslc.1
|
|
}
|