Compare commits

...

4 Commits

Author SHA1 Message Date
Fedora Release Engineering d2a36694ac Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 10:21:48 +00:00
Jiri Kucera deb6ac34d7 Drop gtest on RHEL 2023-06-21 23:07:52 +02:00
Dominik 'Rathann' Mierzejewski 74fe8c1c53 ensure gdk-pixbuf2 dependency matches avif-pixbuf-loader arch
This matters only on x86_64 due to multilib.
2023-03-18 00:07:27 +01:00
Dominik 'Rathann' Mierzejewski 0a18fc4c00 enable tests 2023-03-18 00:06:34 +01:00
2 changed files with 54 additions and 3 deletions

View File

@ -0,0 +1,37 @@
From e279707a001c8f95f8a2bc51c0d19bf35bfc79ab Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <wtc@google.com>
Date: Fri, 11 Nov 2022 14:08:33 -0800
Subject: [PATCH] Build aviftest_helpers for are_images_equal.cc
If are_images_equal.cc is built, enable CXX and build the
aviftest_helpers library.
Fix the build failure when -DAVIF_BUILD_APPS=ON -DAVIF_BUILD_TESTS=ON
-DAVIF_ENABLE_GTEST=OFF is passed to the cmake command.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5af7ea560..632ba7a71 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -39,15 +39,17 @@ foreach(AVIFYUV_MODE limited rgb) # Modes drift and premultiply take more than 2
add_test(NAME avifyuv_${AVIFYUV_MODE} COMMAND avifyuv -m ${AVIFYUV_MODE})
endforeach()
-################################################################################
-# GoogleTest
-
-if(AVIF_ENABLE_GTEST)
+if(AVIF_ENABLE_GTEST OR AVIF_BUILD_APPS)
enable_language(CXX)
set(CMAKE_CXX_STANDARD 11)
add_library(aviftest_helpers OBJECT gtest/aviftest_helpers.cc)
target_link_libraries(aviftest_helpers avif_apps)
+endif()
+################################################################################
+# GoogleTest
+
+if(AVIF_ENABLE_GTEST)
if(AVIF_LOCAL_GTEST)
set(GTEST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/ext/googletest/googletest/include)
set(GTEST_LIBRARIES

View File

@ -2,11 +2,17 @@
%bcond_without aom
# Build SVT-AV1
%bcond_without svt
%if 0%{?rhel} && 0%{?rhel} < 9
%if (0%{?rhel} && 0%{?rhel} < 9) || 0%{?rhel} >= 10
%bcond_with rav1e
%else
%bcond_without rav1e
%endif
%if 0%{?rhel} >= 10
%bcond_with gtest
%else
%bcond_without gtest
%endif
%bcond_without check
Name: libavif
Version: 0.11.1
@ -16,9 +22,11 @@ Summary: Library for encoding and decoding .avif files
License: BSD-2-Clause
URL: https://github.com/AOMediaCodec/libavif
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0: libavif-0.11.1-build_tests_fix.patch
BuildRequires: cmake
BuildRequires: gcc-c++
%{?with_check:%{?with_gtest:BuildRequires: gtest-devel}}
BuildRequires: nasm
%if %{with aom}
BuildRequires: pkgconfig(aom)
@ -57,7 +65,7 @@ This package holds the commandline tools to encode and decode AVIF files.
%package -n avif-pixbuf-loader
Summary: AVIF image loader for GTK+ applications
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
Requires: gdk-pixbuf2
Requires: gdk-pixbuf2%{?_isa}
%description -n avif-pixbuf-loader
Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
@ -73,12 +81,18 @@ Avif-pixbuf-loader contains a plugin to load AVIF images in GTK+ applications.
%{?with_rav1e:-DAVIF_CODEC_RAV1E=1} \
%{?with_svt:-DAVIF_CODEC_SVT=1} \
-DAVIF_BUILD_APPS=1 \
-DAVIF_BUILD_GDK_PIXBUF=1
-DAVIF_BUILD_GDK_PIXBUF=1 \
%{?with_check:-DAVIF_BUILD_TESTS=1 -DAVIF_ENABLE_GTEST=%{with gtest}}
%cmake_build
%install
%cmake_install
%if %{with check}
%check
%ctest
%endif
%files
%license LICENSE
# Do not glob the soname