From fab4ac4b55d602e05b0bcdb61f0c768670cb23ba Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Wed, 10 Mar 2021 20:38:57 +0000 Subject: [PATCH] Update to 2.1.1 --- 0001-Use-better-FLAGS-for-ptools.patch | 35 ----------------------- 0002-Unbundle-pugixml.patch | 39 -------------------------- 0005-Use-shared-for-vmafossexec.patch | 25 ----------------- sources | 2 +- vmaf.spec | 38 ++++++++++++------------- 5 files changed, 19 insertions(+), 120 deletions(-) delete mode 100644 0001-Use-better-FLAGS-for-ptools.patch delete mode 100644 0002-Unbundle-pugixml.patch delete mode 100644 0005-Use-shared-for-vmafossexec.patch diff --git a/0001-Use-better-FLAGS-for-ptools.patch b/0001-Use-better-FLAGS-for-ptools.patch deleted file mode 100644 index cd6bd9b..0000000 --- a/0001-Use-better-FLAGS-for-ptools.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 4adfd8064dbaad0e7d48e6668de322213ed621c8 Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 21:43:41 +0000 -Subject: [PATCH 1/4] Use better FLAGS for ptools - ---- - libvmaf/src/third_party/ptools/Makefile.Linux | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/libvmaf/src/third_party/ptools/Makefile.Linux b/libvmaf/src/third_party/ptools/Makefile.Linux -index 73d8241..99d4e83 100644 ---- a/libvmaf/src/third_party/ptools/Makefile.Linux -+++ b/libvmaf/src/third_party/ptools/Makefile.Linux -@@ -10,7 +10,8 @@ CC = g++ - OC = ./opencontainers_1_8_4 - OCINC = $(OC)/include - --CFLAGS = -Wall -Wextra -fpic -O -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT -+CFLAGS_COMMON = -Wall -Wextra -fpic -O -+CFLAGS = $(CFLAGS) -fno-strict-aliasing -DLINUX_ -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -pthread -D_REENTRANT - - ## How to build with OCString - ##CFLAGS = -Wall -O4 -DLINUX_ -DOC_USE_OC_STRING -DOC_USE_OC_EXCEPTIONS -DOC_ONLY_NEEDED_STL -DOC_NEW_STYLE_INCLUDES -Wno-deprecated -I$(OCINC) -@@ -30,7 +31,7 @@ all: midasyeller_ex midastalker_ex midastalker_ex2 httpclient_ex midasserver_ex - $(CC) $(CFLAGS) -c $< - - libptools.so : $(COM_OBJS) -- $(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so -+ $(CC) $(CCFLAGS) $(COM_OBJS) $(LDFLAGS) -shared -Wl,-soname,libptools.so.0 -o libptools.so - - midasserver_ex : $(COM_OBJS) midasserver_ex.o - $(CC) $(CCFLAGS) $(COM_OBJS) midasserver_ex.o -pthread -o midasserver_ex --- -2.24.1 - diff --git a/0002-Unbundle-pugixml.patch b/0002-Unbundle-pugixml.patch deleted file mode 100644 index 2a49bc9..0000000 --- a/0002-Unbundle-pugixml.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/libvmaf/src/meson.build -+++ b/libvmaf/src/meson.build -@@ -187,6 +187,7 @@ ptools_sources = [ - ] - - thread_lib = dependency('threads') -+pugixml_lib = dependency('pugixml') - math_lib = cc.find_library('m', required : false) - - libptools = shared_library( -@@ -241,7 +242,6 @@ libvmaf_feature_static_lib = static_libr - ) - - vmaf_sources = [ -- third_party_dir + 'pugixml/pugixml.cpp', - src_dir + 'mem.c', - src_dir + 'combo.c', - src_dir + 'cpu_info.c', -@@ -257,7 +257,7 @@ libvmaf = both_libraries( - include_directories : vmaf_include, - c_args : vmaf_cflags_common, - cpp_args : vmaf_cflags_common, -- dependencies : [thread_lib, stdatomic_dependency], -+ dependencies : [thread_lib, pugixml_lib, stdatomic_dependency], - objects : [ - platform_specific_cpu_objects, - libptools.extract_all_objects(), ---- a/libvmaf/src/vmaf.cpp -+++ b/libvmaf/src/vmaf.cpp -@@ -28,7 +28,7 @@ - - #include "vmaf.h" - #include "combo.h" --#include "third_party/pugixml/pugixml.hpp" -+#include - #include "timer.h" - #include "jsonprint.h" - #include "debug.h" - diff --git a/0005-Use-shared-for-vmafossexec.patch b/0005-Use-shared-for-vmafossexec.patch deleted file mode 100644 index 2e5d51d..0000000 --- a/0005-Use-shared-for-vmafossexec.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0e9e6df1542583a74a0d30b81b0872d95b11a6fc Mon Sep 17 00:00:00 2001 -From: Leigh Scott -Date: Wed, 4 Mar 2020 23:18:20 +0000 -Subject: [PATCH 5/5] Use shared for vmafossexec - ---- - libvmaf/tools/meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libvmaf/tools/meson.build b/libvmaf/tools/meson.build -index 2550f29..117bad0 100644 ---- a/libvmaf/tools/meson.build -+++ b/libvmaf/tools/meson.build -@@ -8,7 +8,7 @@ vmafossexec = executable( - dependencies: [stdatomic_dependency], - c_args : vmaf_cflags_common, - cpp_args : vmaf_cflags_common, -- link_with : libvmaf.get_static_lib(), -+ link_with : libvmaf, - install : true, - ) - --- -2.24.1 - diff --git a/sources b/sources index 22d226d..d4bdcbd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vmaf-1.5.3.tar.gz) = 8d8420c72a6575669e88506e47a381c39b66b087b60aef359fb073cd2a54a8fdf48d2664e03e60612afc437b404bfab9d92b9f2441304a612e8d07a2d6947ba5 +SHA512 (vmaf-2.1.1.tar.gz) = 82582b695ad5f0813a4e9080ac2195fcc6f4f8b29d68e5749b5a0585d5c02eaebcff7d7de47d4caf12bf658b236c13890aaca1e508383d96c6a2418909d91529 diff --git a/vmaf.spec b/vmaf.spec index 74e86be..e1548ae 100644 --- a/vmaf.spec +++ b/vmaf.spec @@ -1,14 +1,11 @@ Name: vmaf -Version: 1.5.3 -Release: 2%{?dist} +Version: 2.1.1 +Release: 1%{?dist} Summary: Video Multi-Method Assessment Fusion License: BSD-2-Clause-Patent URL: https://github.com/netflix/vmaf Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-Use-better-FLAGS-for-ptools.patch -Patch1: 0002-Unbundle-pugixml.patch -Patch2: 0005-Use-shared-for-vmafossexec.patch # This project relies on AVX ExclusiveArch: x86_64 @@ -16,8 +13,8 @@ ExclusiveArch: x86_64 BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: nasm -BuildRequires: libsvm-devel -BuildRequires: pugixml-devel +BuildRequires: vim-common + # Enforce our own build version for library Requires: libvmaf%{?_isa} = %{version}-%{release} @@ -38,6 +35,7 @@ https://github.com/Netflix/vmaf/blob/master/resource/doc/VMAF_ICIP17.pdf %package -n libvmaf Summary: Library for %{name} +Provides: bundled(libsvm) = 3.24 #Some repo provides it Provides: %{name}-static = %{version}-%{release} Obsoletes: %{name}-static < %{version}-%{release} @@ -60,12 +58,12 @@ developing applications that use %{name}. %prep %autosetup -p1 # Unbundle -rm -rf libvmaf/src/third_party/pugixml -rm -rf third_party/libsvm +rm -rf third_party/ %build pushd libvmaf -%meson +%meson \ + -Ddefault_library=shared %meson_build popd @@ -74,12 +72,6 @@ pushd libvmaf %meson_install popd -#mv %{buildroot}%{_libdir}/libvmaf.so.0 \ -# %{buildroot}%{_libdir}/libvmaf.so.0.0.0 -#ln -s libvmaf.so.0.0.0 \ -# %{buildroot}%{_libdir}/libvmaf.so.0 -rm -f %{buildroot}%{_libdir}/libvmaf.a - #RPM Macros support mkdir -p %{buildroot}%{rpmmacrodir} cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF @@ -88,19 +80,22 @@ cat > %{buildroot}%{rpmmacrodir}/macros.%{name} << EOF EOF touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} +%check +pushd libvmaf +ninja -vC %{_vpath_builddir} test +popd %ldconfig_scriptlets -n libvmaf %files -%doc FAQ.md NOTICE.md README.md -%{_bindir}/vmafossexec -%{_datadir}/model/ +%doc FAQ.md README.md +%{_bindir}/vmaf %files -n libvmaf %doc CHANGELOG.md %license LICENSE -%{_libdir}/*.so.* +%{_libdir}/*.so.1* %files -n libvmaf-devel %doc CONTRIBUTING.md @@ -111,6 +106,9 @@ touch -r LICENSE %{buildroot}%{rpmmacrodir}/macros.%{name} %changelog +* Wed Mar 10 2021 Leigh Scott - 2.1.1-1 +- Update to 2.1.1 + * Wed Jan 27 2021 Fedora Release Engineering - 1.5.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild