Updated the PKGBUILD to use downloaded Vulkan SDK and GLSLANG to actually get this PKGBUILD working.
This commit is contained in:
parent
dd990074a8
commit
9788efbeff
8
.SRCINFO
8
.SRCINFO
@ -1,20 +1,20 @@
|
||||
pkgbase = ncnn-git
|
||||
pkgdesc = High-performance neural network inference framework optimized for the mobile platform
|
||||
pkgver = 20200916.r37.g09011f36
|
||||
pkgrel = 1
|
||||
pkgver = 20210322.r16.gcc8e7a13
|
||||
pkgrel = 2
|
||||
url = https://github.com/Tencent/ncnn
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
license = BSD
|
||||
makedepends = git
|
||||
makedepends = cmake
|
||||
makedepends = glslang
|
||||
makedepends = vulkan-headers
|
||||
makedepends = vulkan-icd-loader
|
||||
provides = ncnn
|
||||
conflicts = ncnn
|
||||
source = git://github.com/Tencent/ncnn.git
|
||||
source = https://sdk.lunarg.com/sdk/download/1.2.154.0/linux/vulkansdk-linux-x86_64-1.2.154.0.tar.gz?Human=true
|
||||
sha256sums = SKIP
|
||||
sha256sums = 6d8828fa9c9113ef4083a07994cf0eb13b8d239a5263bd95aa408d2f57585268
|
||||
|
||||
pkgname = ncnn-git
|
||||
|
||||
|
28
PKGBUILD
28
PKGBUILD
@ -1,34 +1,39 @@
|
||||
# Maintainer: Mitch Bigelow <ipha00@gmail.com>
|
||||
# Contributor: Utkan Güngördü <utkan@freeconsole.org>
|
||||
# Maintainer: Hurricane Pootis <hurricanepootis@protonmail.com>
|
||||
|
||||
pkgname=ncnn-git
|
||||
_pkgname=ncnn
|
||||
pkgver=20200916.r37.g09011f36
|
||||
pkgrel=1
|
||||
pkgver=20210322.r16.gcc8e7a13
|
||||
pkgrel=2
|
||||
pkgdesc="High-performance neural network inference framework optimized for the mobile platform"
|
||||
url="https://github.com/Tencent/ncnn"
|
||||
license=('BSD')
|
||||
depends=()
|
||||
makedepends=('git' 'cmake' 'glslang' 'vulkan-headers' 'vulkan-icd-loader')
|
||||
makedepends=('git' 'cmake' 'vulkan-icd-loader')
|
||||
conflicts=('ncnn')
|
||||
provides=('ncnn')
|
||||
arch=('i686' 'x86_64')
|
||||
source=("git://github.com/Tencent/ncnn.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
source=("git://github.com/Tencent/ncnn.git"
|
||||
"https://sdk.lunarg.com/sdk/download/1.2.154.0/linux/vulkansdk-linux-x86_64-1.2.154.0.tar.gz?Human=true")
|
||||
sha256sums=('SKIP'
|
||||
'6d8828fa9c9113ef4083a07994cf0eb13b8d239a5263bd95aa408d2f57585268')
|
||||
pkgver() {
|
||||
cd "${srcdir}/ncnn"
|
||||
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
|
||||
|
||||
export VULKAN_SDK=$srcdir/1.2.154.0/x86_64
|
||||
cd "${srcdir}/ncnn"
|
||||
|
||||
# init glslang submodule
|
||||
# git submodule update --init --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
# fix for system glslang
|
||||
sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp
|
||||
# sed -i'' 's|#include "glslang/glslang|#include "glslang|' ./src/gpu.cpp
|
||||
}
|
||||
|
||||
build() {
|
||||
@ -36,13 +41,9 @@ build() {
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc.toolchain.cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DNCNN_BUILD_EXAMPLES=OFF \
|
||||
-DNCNN_BUILD_TOOLS=OFF \
|
||||
-DNCNN_VULKAN=ON \
|
||||
-DNCNN_SYSTEM_GLSLANG=ON \
|
||||
-DGLSLANG_TARGET_DIR=/usr/lib/cmake/ \
|
||||
..
|
||||
make
|
||||
}
|
||||
@ -51,4 +52,7 @@ 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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user