diff options
author | Josh Holmer | 2022-09-01 11:59:33 -0400 |
---|---|---|
committer | Josh Holmer | 2022-09-01 11:59:33 -0400 |
commit | ab4bcf4db68d3fa5a09059a5f1e26fb3962f1473 (patch) | |
tree | d7f5365c1832cb5c8af97c06da9fde55518bcc41 /PKGBUILD | |
download | aur-ab4bcf4db68d3fa5a09059a5f1e26fb3962f1473.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7dc570e6caca --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com> +# Contributor: Mikuro Kagamine <mikurok@forgecrushing.com> + +_plug=dfttest2 +pkgname=vapoursynth-plugin-${_plug}-git +pkgver=v4.0.gbb5bad6 +pkgrel=1 +pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT Version)" +arch=('x86_64') +url='https://github.com/AmusementClub/vs-dfttest2' +license=('GPL2') +depends=('vapoursynth' 'cuda') +makedepends=('git' 'cmake' 'ninja' 'gcc11') +provides=("vapoursynth-plugin-${_plug}") +conflicts=("vapoursynth-plugin-${_plug}") +source=("${_plug}::git+https://github.com/AmusementClub/vs-dfttest2") +sha256sums=('SKIP') +options=('debug') + +_site_packages="$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')" + +pkgver() { + cd "${_plug}" + echo "$(git describe --long --tags | tr - . | tr -d r)" +} + +prepare() { + # Download vector class library + rm -rf vectorclass version2* + wget -q -O vcl.zip https://github.com/vectorclass/version2/archive/refs/tags/v2.01.04.zip + unzip -q vcl.zip + mv version2*/ vectorclass +} + +build() { + # This is based on what the project's CI is doing + export CC=gcc-11 + export CXX=g++-11 + cmake \ + -B "build" \ + -S "${_plug}" \ + -G Ninja \ + -D CMAKE_BUILD_TYPE=Release \ + -D CMAKE_C_COMPILER="${CC}" \ + -D CMAKE_CXX_COMPILER="${CXX}" \ + -D CMAKE_CXX_FLAGS_RELEASE="-ffast-math -march=native" \ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D ENABLE_CUDA=1 \ + -D USE_NVRTC_STATIC=ON \ + -D ENABLE_CPU=1 \ + -D VCL_HOME="$(pwd)/vectorclass" \ + -W no-dev + cmake --build "build" --config Release +} + +package() { + DESTDIR="$pkgdir" cmake --install build + install -Dm644 "${_plug}/${_plug}.py" "${pkgdir}${_site_packages}/${_plug}.py" + python -m compileall -q -f -d "${_site_packages}" "${pkgdir}${_site_packages}/${_plug}.py" + python -OO -m compileall -q -f -d "${_site_packages}" "${pkgdir}${_site_packages}/${_plug}.py" +} |