summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD61
3 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1197b2972ade
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = vapoursynth-plugin-dfttest2-git
+ pkgdesc = Plugin for Vapoursynth: dfttest2 (GIT Version)
+ pkgver = v4.0.gbb5bad6
+ pkgrel = 1
+ url = https://github.com/AmusementClub/vs-dfttest2
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ makedepends = cmake
+ makedepends = ninja
+ makedepends = gcc11
+ depends = vapoursynth
+ depends = cuda
+ provides = vapoursynth-plugin-dfttest2
+ conflicts = vapoursynth-plugin-dfttest2
+ options = debug
+ source = dfttest2::git+https://github.com/AmusementClub/vs-dfttest2
+ sha256sums = SKIP
+
+pkgname = vapoursynth-plugin-dfttest2-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..05c6d4d4c97b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!.SRCINFO
+!PKGBUILD
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"
+}