forked from ports/contrib
shaderc: updated cmake syntax
This commit is contained in:
parent
f76f21a4a5
commit
aef12e73f6
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3xVATi6Xm3gifhMplCNR6M9pck1CXiWZY7IdH01Ep4YbnXKedLR1dM/olClHLJnOcwb2TG7K4kZXlrfkC/NU+AA=
|
||||
SHA256 (Pkgfile) = ab7df716fe2c843377b8965b709cfc483ba1a986c03c3822732ea07414bf12f7
|
||||
RWSagIOpLGJF321OfTZ65bfAIV0z85qB4J/nb+TWyFSGrBo3HRzHVzzG8LoOAQhvuI1FHO2juW6vmGVPcBVvLk2O8eXW9jnW4AU=
|
||||
SHA256 (Pkgfile) = ccf57bdc4cbadffbe148483c95c009a3b7e6113c59bc83decb8ae92da478cbf5
|
||||
SHA256 (.footprint) = a55f4db9a8f36310df010a88256abef6d13753f525ff212c4e7dcb390e6c1e66
|
||||
SHA256 (shaderc-v2020.3.tar.gz) = e595f71d0db0c37ee959b538cfda16e39e3f0dce8893a0bc0ac0080c342c0275
|
||||
SHA256 (glslc.1) = 468467ab0ec0eac2b221563ef370826443c22cee55f11f6dc8be81b168e3e492
|
||||
|
@ -14,37 +14,34 @@ source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
|
||||
0001-Fix-SPIRV-includes-location.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -d $name-$version/glslc -p0 -i $SRC/glslc-asciidoc.patch
|
||||
patch -d $name-$version/spvc -p0 -i $SRC/spvc-asciidoc.patch
|
||||
|
||||
patch -d glslc -p0 -i $SRC/glslc-asciidoc.patch
|
||||
patch -d spvc -p0 -i $SRC/spvc-asciidoc.patch
|
||||
|
||||
patch -p1 -i $SRC/0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
||||
patch -p1 -i $SRC/0001-Fix-SPIRV-includes-location.patch
|
||||
patch -p1 -i $SRC/shaderc-2020.3-system-glslang.patch
|
||||
patch -p1 -d $name-$version -i $SRC/0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
||||
patch -p1 -d $name-$version -i $SRC/0001-Fix-SPIRV-includes-location.patch
|
||||
patch -p1 -d $name-$version -i $SRC/shaderc-2020.3-system-glslang.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
|
||||
sed '/examples/d;/third_party/d' -i $name-$version/CMakeLists.txt
|
||||
sed '/build-version/d' -i $name-$version/glslc/CMakeLists.txt
|
||||
cat <<- EOF > $name-$version/glslc/src/build-version.inc
|
||||
"${version}\\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 \
|
||||
cmake -S$name-$version -Bbuild -GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DSHADERC_SKIP_TESTS=ON \
|
||||
-GNinja
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS -DNDEBUG" \
|
||||
-DCMAKE_C_FLAGS_RELEASE="$CFLAGS -DNDEBUG" \
|
||||
-Wno-dev \
|
||||
-DSHADERC_SKIP_TESTS=ON
|
||||
|
||||
ninja -j ${JOBS:-1}
|
||||
cmake --build build -j ${JOBS:-1}
|
||||
|
||||
DESTDIR=$PKG ninja install
|
||||
DESTDIR=$PKG cmake --install build
|
||||
|
||||
if [ -e '/usr/bin/asciidoctor' ]; then
|
||||
cd ../glslc
|
||||
|
Loading…
x
Reference in New Issue
Block a user