summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorHurricanePootis2022-03-24 11:17:22 -0500
committerHurricanePootis2022-03-24 11:17:22 -0500
commitf7a8c5dcf1d322a372e9a8d0c7d76b94afaa7954 (patch)
tree39aa7a9a30ab77243fc892597285034211f5c3fa /PKGBUILD
parent460c04d9504fdba0151d2613864b36674a916bdb (diff)
downloadaur-f7a8c5dcf1d322a372e9a8d0c7d76b94afaa7954.tar.gz
Update to git submodule in source(), and use system glslang
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 17 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3ee722db13cd..f68141ee5ada 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,19 +4,20 @@
pkgname=ncnn-git
_pkgname=ncnn
-pkgver=20210322.r16.gcc8e7a13
-pkgrel=3
+pkgver=20220216.r35.gaab476f5b
+pkgrel=1
pkgdesc="High-performance neural network inference framework optimized for the mobile platform"
url="https://github.com/Tencent/ncnn"
license=('BSD')
-depends=()
-makedepends=('git' 'cmake' 'vulkan-icd-loader')
+depends=('glslang')
+makedepends=('git' 'cmake' 'vulkan-icd-loader' 'protobuf')
conflicts=('ncnn')
provides=('ncnn')
arch=('i686' 'x86_64')
-source=("git://github.com/Tencent/ncnn.git"
- "vulkansdk-linux-x86_64-latest.tar.gz::https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.exe")
-sha256sums=('SKIP' 'SKIP')
+source=("git+https://github.com/Tencent/ncnn.git"
+ "git+https://github.com/KhronosGroup/glslang"
+ "git+https://github.com/pybind/pybind11")
+sha256sums=('SKIP' 'SKIP' 'SKIP')
pkgver() {
cd "${srcdir}/ncnn"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
@@ -24,15 +25,16 @@ pkgver() {
prepare() {
- mv $srcdir/1.* $srcdir/latest
-export VULKAN_SDK=$srcdir/latest/x86_64
cd "${srcdir}/ncnn"
- # init glslang submodule
- git submodule update --init --recursive
+ # init submodules
+ git submodule init glslang
+ git config submodule.glslang.url "$srcdir/glslang"
+ git submodule update
- # fix for system glslang
- # sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp
+ git submodule init python/pybind11
+ git config submodule.python/pybind11.url "$srcdir/pybind11"
+ git submodule update
}
build() {
@@ -43,6 +45,8 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DNCNN_BUILD_EXAMPLES=OFF \
-DNCNN_VULKAN=ON \
+ -DNCNN_SYSTEM_GLSLANG=ON \
+ -DGLSLANG_TARGET_DIR=/usr/lib/cmake \
..
make
}
@@ -51,7 +55,4 @@ package() {
cd "${srcdir}/ncnn/build"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}/ncnn/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- rm -rf "$pkgdir/usr/include/glslang"
- rm -rf "$pkgdir/usr/lib/cmake/OGLCompilerTargets-release.cmake" "$pkgdir/usr/lib/cmake/OGLCompilerTargets.cmake" "$pkgdir/usr/lib/cmake/OSDependentTargets-release.cmake" "$pkgdir/usr/lib/cmake/OSDependentTargets.cmake" "$pkgdir/usr/lib/cmake/SPIRVTargets-release.cmake" "$pkgdir/usr/lib/cmake/SPIRVTargets.cmake" "$pkgdir/usr/lib/cmake/glslangTargets-release.cmake" "$pkgdir/usr/lib/cmake/glslangTargets.cmake"
- rm -rf "$pkgdir/usr/lib/libGenericCodeGen.a" "$pkgdir/usr/lib/libMachineIndependent.a" "$pkgdir/usr/lib/libOGLCompiler.a" "$pkgdir/usr/lib/libOSDependent.a" "$pkgdir/usr/lib/libSPIRV.a" "$pkgdir/usr/lib/libglslang.a"
}