diff --git a/kf6-kimageformats/kf6-kimageformats.spec b/kf6-kimageformats/kf6-kimageformats.spec index 88f9ebc..ec275c2 100644 --- a/kf6-kimageformats/kf6-kimageformats.spec +++ b/kf6-kimageformats/kf6-kimageformats.spec @@ -3,6 +3,10 @@ %define rname kimageformats +# Temporarily disable AVIF/HEIF support until dependencies are available +%bcond_with avif +%bcond_with heif + %if 0%{?suse_version} > 1500 # Fails on Leap 15 with '/usr/include/OpenEXR/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specification' %define with_exr 1 @@ -31,8 +35,12 @@ BuildRequires: cmake(KF6Archive) >= %{_kf6_version} BuildRequires: cmake(Qt6Gui) >= %{qt6_version} BuildRequires: cmake(Qt6PrintSupport) >= %{qt6_version} BuildRequires: cmake(Qt6Test) >= %{qt6_version} +%if %{with avif} BuildRequires: cmake(libavif) >= 0.8.2 +%endif +%if %{with heif} BuildRequires: cmake(libheif) >= 1.10.0 +%endif %if 0%{?with_jp2} BuildRequires: cmake(OpenJPEG) %endif @@ -73,7 +81,17 @@ to provide additional image format plugins for QtGui. %autosetup -p1 -n %{rname}-%{version} %build -%cmake_kf6 -DKIMAGEFORMATS_HEIF:BOOL=TRUE +%cmake_kf6 \ +%if %{with avif} + -DKIMAGEFORMATS_AVIF:BOOL=TRUE \ +%else + -DKIMAGEFORMATS_AVIF:BOOL=FALSE \ +%endif +%if %{with heif} + -DKIMAGEFORMATS_HEIF:BOOL=TRUE +%else + -DKIMAGEFORMATS_HEIF:BOOL=FALSE +%endif %kf6_build @@ -86,13 +104,17 @@ to provide additional image format plugins for QtGui. %license LICENSES/* %dir %{_kf6_plugindir}/imageformats %{_kf6_plugindir}/imageformats/kimg_ani.so +%if %{with avif} %{_kf6_plugindir}/imageformats/kimg_avif.so +%endif %{_kf6_plugindir}/imageformats/kimg_dds.so %if 0%{?with_exr} %{_kf6_plugindir}/imageformats/kimg_exr.so %endif %{_kf6_plugindir}/imageformats/kimg_hdr.so +%if %{with heif} %{_kf6_plugindir}/imageformats/kimg_heif.so +%endif %if 0%{?with_jxl} %{_kf6_plugindir}/imageformats/kimg_jxl.so %endif