Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libgav1 for openSUSE:Factory checked in at 2023-05-03 13:07:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgav1 (Old) and /work/SRC/openSUSE:Factory/.libgav1.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgav1" Wed May 3 13:07:04 2023 rev:2 rq:1084255 version:0.18.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libgav1/libgav1.changes 2023-03-31 21:15:33.218393108 +0200 +++ /work/SRC/openSUSE:Factory/.libgav1.new.1533/libgav1.changes 2023-05-03 13:07:06.063296078 +0200 @@ -1,0 +2,11 @@ +Sat Apr 29 19:30:55 UTC 2023 - Bruno Pitrus <brunopit...@hotmail.com> +- Run testsuite in %check + * 0001-Unbundle-abseil.patch + * Unbundle-gtest.patch + * cpu_test-disable-test.patch +- Add libgav1-tools package +- Compile as C++17 to fix build error in libgav1-tools + * modern-cxx-standard.patch +- Fix FTBFS on ARM + +------------------------------------------------------------------- New: ---- 0001-Unbundle-abseil.patch Unbundle-gtest.patch _constraints cpu_test-disable-test.patch modern-cxx-standard.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgav1.spec ++++++ --- /var/tmp/diff_new_pack.mQ8Vcc/_old 2023-05-03 13:07:06.731300010 +0200 +++ /var/tmp/diff_new_pack.mQ8Vcc/_new 2023-05-03 13:07:06.735300033 +0200 @@ -26,9 +26,17 @@ URL: https://chromium.googlesource.com/codecs/libgav1/ Source: %name-%version.tar.xz Patch1: gcc13.diff +Patch2: 0001-Unbundle-abseil.patch +Patch3: Unbundle-gtest.patch +Patch4: modern-cxx-standard.patch +Patch5: cpu_test-disable-test.patch BuildRequires: cmake >= 3.7.1 +BuildRequires: cmake(absl) BuildRequires: gcc-c++ BuildRequires: pkg-config +BuildRequires: pkgconfig(gmock) +BuildRequires: pkgconfig(gtest) +BuildRequires: pkgconfig(gtest_main) BuildRequires: xz %description @@ -46,7 +54,7 @@ %package devel Summary: Development for libgav1, an AV1 video decoder Group: Development/Libraries/C and C++ -Requires: %lname = %version +Requires: %lname%{_isa} = %version %description devel libgav1 is a Main profile (0) & High profile (1) compliant AV1 decoder written @@ -54,23 +62,40 @@ This subpackage contains the header files. +%package tools +Summary: AV1 video decoder â Command line utility +Group: Productivity/Multimedia/Other + +%description tools +libgav1 is a Main profile (0) & High profile (1) compliant AV1 decoder written +in C++ and also offering a C API. + +This package contains the gav1_decode commandline program. + %prep %autosetup -p1 -mkdir third_party -ln -s /usr/src/abseil-cpp third_party/abseil-cpp %build %cmake \ - -DLIBGAV1_ENABLE_EXAMPLES:BOOL=OFF \ - -DLIBGAV1_ENABLE_TESTS:BOOL=OFF \ + -DLIBGAV1_ENABLE_EXAMPLES:BOOL=ON \ + -DLIBGAV1_ENABLE_TESTS:BOOL=ON \ -DLIBGAV1_THREADPOOL_USE_STD_MUTEX=1 \ - -DBUILD_SHARED_LIBS:BOOL=ON + -DBUILD_SHARED_LIBS:BOOL=ON \ +%ifarch %arm +%ifnarch armv7hnl armv8hnl armv8hcnl #Unlike x86/64, the arm code does not do dynamic dispatch based on CPU capabilities and so fails to build if the CPU does not support this. + -DLIBGAV1_ENABLE_NEON=0 \ +%endif +%endif + %cmake_build %install %cmake_install rm -fv %buildroot/%_libdir/*.a +%check +%ctest + %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -84,4 +109,7 @@ %_libdir/*.so %_datadir/cmake/ +%files tools +%_bindir/gav1_decode + %changelog ++++++ 0001-Unbundle-abseil.patch ++++++ From: Boyuan Yang <by...@debian.org> Date: Sat, 16 Jul 2022 13:49:23 -0400 Subject: Unbundle abseil --- CMakeLists.txt | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52b1b32..d5e8f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,7 +116,6 @@ if(LIBGAV1_VERBOSE) libgav1_dump_options() endif() -set(libgav1_abseil_build "${libgav1_build}/abseil") set(libgav1_gtest_build "${libgav1_build}/gtest") # Compiler/linker flags must be lists, but come in from the environment as @@ -131,23 +130,8 @@ endif() # Set test-only flags based on LIBGAV1_CXX_FLAGS. libgav1_set_test_flags() -set(libgav1_abseil "${libgav1_root}/third_party/abseil-cpp") -if(EXISTS "${libgav1_abseil}") - set(ABSL_PROPAGATE_CXX_STD ON) - add_subdirectory("${libgav1_abseil}" "${libgav1_abseil_build}" - EXCLUDE_FROM_ALL) -else() - if(use_absl_threading OR LIBGAV1_ENABLE_EXAMPLES OR LIBGAV1_ENABLE_TESTS) - message( - FATAL_ERROR - "Abseil not found. This dependency is required by the" - " examples & tests and libgav1 when LIBGAV1_THREADPOOL_USE_STD_MUTEX is" - " not defined. To continue, download the Abseil repository to" - " third_party/abseil-cpp:\n git \\\n -C ${libgav1_root} \\\n" - " clone \\\n" - " https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp") - endif() -endif() +find_package(absl REQUIRED) +set(ABSL_PROPAGATE_CXX_STD ON) libgav1_reset_target_lists() libgav1_add_dsp_targets() ++++++ Unbundle-gtest.patch ++++++ --- a/tests/libgav1_tests.cmake 2022-06-30 20:41:58.000000000 +0000 +++ b/tests/libgav1_tests.cmake 2023-04-29 13:01:10.517636900 +0000 @@ -12,28 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -if(LIBGAV1_LIBGAV1_TESTS_CMAKE_) - return() -endif() # LIBGAV1_LIBGAV1_TESTS_CMAKE_ -set(LIBGAV1_LIBGAV1_TESTS_CMAKE_ 1) - -set(libgav1_googletest "${libgav1_root}/third_party/googletest") -if(NOT LIBGAV1_ENABLE_TESTS OR NOT EXISTS "${libgav1_googletest}") - macro(libgav1_add_tests_targets) - - endmacro() - - if(LIBGAV1_ENABLE_TESTS AND NOT EXISTS "${libgav1_googletest}") - message( - "GoogleTest not found, setting LIBGAV1_ENABLE_TESTS to false.\n" - "To enable tests download the GoogleTest repository to" - " third_party/googletest:\n\n git \\\n -C ${libgav1_root} \\\n" - " clone \\\n" - " https://github.com/google/googletest.git third_party/googletest\n") - set(LIBGAV1_ENABLE_TESTS FALSE CACHE BOOL "Enables tests." FORCE) - endif() - return() -endif() +find_package(PkgConfig REQUIRED) +pkg_check_modules(gtest REQUIRED gtest) +pkg_check_modules(gtest_main REQUIRED gtest_main) # Check GoogleTest compiler requirements. if((CMAKE_CXX_COMPILER_ID @@ -195,31 +176,20 @@ "This version of libgav1_add_tests_targets() should only be used with" " LIBGAV1_ENABLE_TESTS set to true.") endif() - libgav1_add_library(TEST - NAME - libgav1_gtest - TYPE - STATIC - SOURCES - "${libgav1_googletest}/googletest/src/gtest-all.cc" - DEFINES - ${libgav1_defines} - INCLUDES - ${libgav1_gtest_include_paths} - ${libgav1_include_paths}) - - libgav1_add_library(TEST - NAME - libgav1_gtest_main - TYPE - STATIC - SOURCES - "${libgav1_googletest}/googletest/src/gtest_main.cc" - DEFINES - ${libgav1_defines} - INCLUDES - ${libgav1_gtest_include_paths} - ${libgav1_include_paths}) + + add_library(libgav1_gtest INTERFACE) + target_link_libraries(libgav1_gtest INTERFACE ${gtest_LIBRARIES}) + target_link_directories(libgav1_gtest INTERFACE ${gtest_LIBRARY_DIRS}) + target_link_options(libgav1_gtest INTERFACE ${gtest_LDFLAGS_OTHER}) + target_include_directories(libgav1_gtest INTERFACE ${gtest_INCLUDE_DIRS}) + target_compile_options(libgav1_gtest INTERFACE ${gtest_CFLAGS_OTHER}) + + add_library(libgav1_gtest_main INTERFACE) + target_link_libraries(libgav1_gtest_main INTERFACE ${gtest_main_LIBRARIES}) + target_link_directories(libgav1_gtest_main INTERFACE ${gtest_main_LIBRARY_DIRS}) + target_link_options(libgav1_gtest_main INTERFACE ${gtest_main_LDFLAGS_OTHER}) + target_include_directories(libgav1_gtest_main INTERFACE ${gtest_main_INCLUDE_DIRS}) + target_compile_options(libgav1_gtest_main INTERFACE ${gtest_main_CFLAGS_OTHER}) if(use_absl_threading) list(APPEND libgav1_common_test_absl_deps absl::synchronization) ++++++ _constraints ++++++ <?xml version="1.0"?> <constraints> <overwrite> <conditions> <arch>x86_64</arch> <arch>i586</arch> </conditions> <hardware> <cpu> <flag>avx2</flag> <!-- Some tests statically link the assembler subroutines without the dynamic dispatch that the actual library does, which means they do not run on old CPUs. --> </cpu> </hardware> </overwrite> </constraints> (No newline at EOF) ++++++ cpu_test-disable-test.patch ++++++ This test runs some dubious processor-counting code which tries to read some things from /sys which fails on arm (likely due to the builders running on an aarch64 kernel) --- a/src/utils/cpu_test.cc +++ b/src/utils/cpu_test.cc @@ -238,7 +238,6 @@ ASSERT_NE(num_cpus, 0); LIBGAV1_DLOG(INFO, "There are %d cores online.", num_cpus); const int num_performance_cpus = GetNumberOfPerformanceCoresOnline(); - ASSERT_NE(num_performance_cpus, 0); LIBGAV1_DLOG(INFO, "There are %d performance cores online.", num_performance_cpus); #endif // defined(__linux__) ++++++ modern-cxx-standard.patch ++++++ The example applications fail to build with such ancient C++ setting. Set the C++ standard instead to GCC's current version (17 as of GCC13) --- a/CMakeLists.txt +++ a/CMakeLists.txt @@ -15,9 +15,6 @@ # libgav1 requires modern CMake. cmake_minimum_required(VERSION 3.7.1 FATAL_ERROR) -# libgav1 requires C++11. -set(CMAKE_CXX_STANDARD 11) -set(ABSL_CXX_STANDARD 11) # libgav1 requires C99. set(CMAKE_C_STANDARD 99)