Skip to content

Instantly share code, notes, and snippets.

@quietvoid
Last active February 14, 2024 12:48
Show Gist options
  • Save quietvoid/fb6f4753912e4a131c452f3dd2c6400b to your computer and use it in GitHub Desktop.
Save quietvoid/fb6f4753912e4a131c452f3dd2c6400b to your computer and use it in GitHub Desktop.
vapoursynth-plugin-bm3dhip-git
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>
# Maintainer: quietvoid <tcChlisop0@gmail.com>
_plug=bm3dhip
pkgname="vapoursynth-plugin-${_plug}-git"
pkgver=2.13.15.g2c18cfa
pkgrel=1
pkgdesc="Plugin for Vapoursynth: ${_plug} (GIT version)"
arch=('x86_64')
url='https://github.com/WolframRhodium/VapourSynth-BM3DCUDA'
license=('GPL')
depends=('vapoursynth' 'rocm-hip-runtime' 'rocm-device-libs')
makedepends=('git' 'cmake')
provides=("vapoursynth-plugin-${_plug}")
conflicts=("vapoursynth-plugin-${_plug}")
source=("${_plug}::git+https://github.com/quietvoid/VapourSynth-BM3DCUDA.git#branch=hip_amd_linux")
sha256sums=('SKIP')
options=('debug')
pkgver() {
cd "${_plug}"
echo "$(git describe --long --tags | tr - . | tr -d R | sed 's|test.||g')"
}
build() {
cmake -S "${_plug}" -B build -G Ninja -LA \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib/vapoursynth \
-DCMAKE_SKIP_RPATH=ON \
-DVAPOURSYNTH_INCLUDE_DIRECTORY="$(pkg-config --cflags vapoursynth | sed 's|-I||g')" \
-DCMAKE_CXX_COMPILER="/opt/rocm/bin/hipcc" \
-DCMAKE_CXX_FLAGS="-Wall -ffast-math" \
-DENABLE_CPU=OFF \
-DENABLE_CUDA=OFF \
-DENABLE_HIP=ON \
-DGPU_TARGETS="gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103"
cmake --build build
}
package() {
DESTDIR="${pkgdir}" cmake --install build
install -Dm644 "${_plug}/README.md" "${pkgdir}/usr/share/doc/vapoursynth/plugins/${_plug}/README.md"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment