summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfg2022-04-29 19:20:56 +0200
committerkfg2022-04-29 19:20:56 +0200
commite852d4ada222004a07196c8521380282496aac4b (patch)
treeaf20115e1bcfbba9039a66dd4442955efb193c4c
downloadaur-e852d4ada222004a07196c8521380282496aac4b.tar.gz
Initial import
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD51
-rw-r--r--staticlib.patch29
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c17f54ce2d93
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = mingw-w64-vmaf
+ pkgdesc = Perceptual video quality assessment algorithm based on multi-method fusion (mingw-w64)
+ pkgver = 2.3.1
+ pkgrel = 1
+ url = https://github.com/Netflix/vmaf/
+ arch = x86_64
+ license = BSD
+ makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-meson
+ makedepends = nasm
+ depends = mingw-w64-crt
+ depends = vmaf
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = https://github.com/Netflix/vmaf/archive/v2.3.1/vmaf-2.3.1.tar.gz
+ source = staticlib.patch
+ sha256sums = 8d60b1ddab043ada25ff11ced821da6e0c37fd7730dd81c24f1fc12be7293ef2
+ sha256sums = 9d7e03ac0f890e201cf27f1c0adea1e78407ac60b09073c2e3865c7945939bec
+
+pkgname = mingw-w64-vmaf
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..47c24a6f7e1d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Karl-Felix Glatzer <karl[dot]glatzer[at]gmx[dot]de>
+# Contributor: Daniel Bermond <dbermond@archlinux.org>
+
+pkgname=mingw-w64-vmaf
+pkgver=2.3.1
+pkgrel=1
+pkgdesc='Perceptual video quality assessment algorithm based on multi-method fusion (mingw-w64)'
+arch=('x86_64')
+url='https://github.com/Netflix/vmaf/'
+license=('BSD')
+depends=('mingw-w64-crt' 'vmaf')
+options=(!strip !buildflags staticlibs)
+makedepends=('mingw-w64-gcc' 'mingw-w64-meson' 'nasm')
+source=("https://github.com/Netflix/vmaf/archive/v${pkgver}/vmaf-${pkgver}.tar.gz"
+ "staticlib.patch")
+sha256sums=('8d60b1ddab043ada25ff11ced821da6e0c37fd7730dd81c24f1fc12be7293ef2'
+ '9d7e03ac0f890e201cf27f1c0adea1e78407ac60b09073c2e3865c7945939bec')
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "${srcdir}"/vmaf-${pkgver}
+
+ patch -Np1 -i "${srcdir}/staticlib.patch"
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch}
+ ${_arch}-meson . "${srcdir}/vmaf-${pkgver}/libvmaf"
+ ninja -v -C .
+ done
+}
+
+check() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}"/build-${_arch}
+ ninja -v -C . test
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}"/build-${_arch}
+ DESTDIR="$pkgdir" ninja -v -C . install
+
+ install -D -m755 "./tools/vmafossexec.exe" -t "${pkgdir}/usr/${_arch}/bin"
+ done
+
+ #install -D -m644 "vmaf-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/vmaf"
+ #cp -dr --no-preserve='ownership' "vmaf-${pkgver}/model" "${pkgdir}/usr/share"
+}
diff --git a/staticlib.patch b/staticlib.patch
new file mode 100644
index 000000000000..81d4bd83c5e2
--- /dev/null
+++ b/staticlib.patch
@@ -0,0 +1,29 @@
+diff -ruN vmaf-2.3.1/libvmaf/src/meson.build patched/libvmaf/src/meson.build
+--- vmaf-2.3.1/libvmaf/src/meson.build 2022-04-13 22:28:53.566666643 +0200
++++ patched/libvmaf/src/meson.build 2022-04-13 22:28:38.143333303 +0200
+@@ -331,6 +331,25 @@
+ install: true,
+ )
+
++libvmaf_static = static_library(
++ 'vmaf',
++ [libvmaf_sources, rev_target, json_model_c_sources],
++ include_directories : [libvmaf_inc, vmaf_include],
++ c_args : vmaf_cflags_common,
++ cpp_args : vmaf_cflags_common,
++ dependencies : [
++ thread_lib,
++ math_lib,
++ stdatomic_dependency,
++ ],
++ objects : [
++ platform_specific_cpu_objects,
++ libvmaf_feature_static_lib.extract_all_objects(recursive: true),
++ libvmaf_cpu_static_lib.extract_all_objects(recursive: true),
++ ],
++ install: true,
++)
++
+ pkg_mod = import('pkgconfig')
+ pkg_mod.generate(libraries: libvmaf,
+ version: meson.project_version(),