Date: Thursday, July 21, 2022 @ 11:35:02 Author: felixonmars Revision: 1255017
archrelease: copy trunk to community-x86_64 Added: ncnn/repos/community-x86_64/ ncnn/repos/community-x86_64/PKGBUILD (from rev 1255016, ncnn/trunk/PKGBUILD) ----------+ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Copied: ncnn/repos/community-x86_64/PKGBUILD (from rev 1255016, ncnn/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2022-07-21 11:35:02 UTC (rev 1255017) @@ -0,0 +1,38 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: PumpkinCheshire <me at pumpkincheshire dot com> +# Contributor: Cobalt Space <cobaltspace at protonmail dot com> +# Contributor: Mitch Bigelow <ipha00 at gmail dot com> + +pkgname=ncnn +pkgver=20220721 +pkgrel=1 +pkgdesc='High-performance neural network inference framework optimized for the mobile platform' +url='https://github.com/Tencent/ncnn' +arch=('x86_64') +license=('BSD') +depends=('vulkan-icd-loader') +makedepends=('cmake' 'glslang' 'ninja' 'protobuf' 'vulkan-headers') +optdepends=('protobuf: for onnx2ncnn') +conflicts=('ncnn-git') +source=("$pkgname-$pkgver.tar.gz::https://github.com/Tencent/ncnn/archive/$pkgver.tar.gz") +b2sums=('5d164a1f8531395e6bdbbb1ace07d5c7ef08db9afe62155126297b4911621aad4c5f71ccb3343207450dc4ea055f6da07aeb93f230098ab407eaa05ee31db8b9') + +build() { + cmake -B build -S "$pkgname-$pkgver" \ + -GNinja \ + -DCMAKE_BUILD_TYPE='None' \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DNCNN_SHARED_LIB=ON \ + -DNCNN_ENABLE_LTO=ON \ + -DNCNN_VULKAN=ON \ + -DNCNN_SYSTEM_GLSLANG=ON \ + -DNCNN_BUILD_EXAMPLES=OFF \ + -DGLSLANG_TARGET_DIR=/usr/lib/cmake/ \ + -Wno-dev + ninja -C build +} + +package() { + DESTDIR="$pkgdir" ninja -C build install + install -Dm644 "$srcdir"/ncnn-$pkgver/LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ +}