|
|
418dec |
#
|
|
|
418dec |
# spec file for package libheif
|
|
|
418dec |
#
|
|
|
82acd2 |
# Copyright (c) 2023 SUSE LLC
|
|
|
418dec |
#
|
|
|
418dec |
# All modifications and additions to the file contributed by third parties
|
|
|
418dec |
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
418dec |
# upon. The license for this file, and modifications and additions to the
|
|
|
418dec |
# file, is the same license as for the pristine package itself (unless the
|
|
|
418dec |
# license for the pristine package is not an Open Source License, in which
|
|
|
418dec |
# case the license is the MIT License). An "Open Source License" is a
|
|
|
418dec |
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
418dec |
# published by the Open Source Initiative.
|
|
|
418dec |
|
|
|
bcd51e |
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
418dec |
#
|
|
|
418dec |
|
|
|
bcd51e |
|
|
|
418dec |
%define gdk_pixbuf_binary_version 2.10.0
|
|
|
82acd2 |
%bcond_with x265
|
|
|
89be4a |
%bcond_with plugins
|
|
|
89be4a |
%bcond_with rav1e
|
|
|
89be4a |
%bcond_with svtenc
|
|
|
89be4a |
%if 0%{?suse_version} > 1500
|
|
|
89be4a |
%bcond_without rav1e
|
|
|
89be4a |
%ifarch x86_64
|
|
|
89be4a |
%bcond_without svtenc
|
|
|
89be4a |
%endif
|
|
|
89be4a |
%endif
|
|
|
89be4a |
|
|
|
418dec |
Name: libheif
|
|
|
68823d |
Version: 1.14.2
|
|
|
418dec |
Release: 0
|
|
|
418dec |
Summary: HEIF/AVIF file format decoder and encoder
|
|
|
418dec |
License: GPL-2.0-or-later
|
|
|
418dec |
Group: Productivity/Graphics/Other
|
|
|
418dec |
URL: https://github.com/strukturag/libheif
|
|
|
32702a |
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
|
|
06b56d |
Source99: baselibs.conf
|
|
Bernhard M. Wiedemann |
514c2a |
# from https://github.com/strukturag/libheif/commit/b6812284a2d70f29a5121ec3dbe652da07fdbbb7.patch
|
|
Bernhard M. Wiedemann |
514c2a |
Patch0: b6812284a2d70f29a5121ec3dbe652da07fdbbb7.patch
|
|
Bernhard M. Wiedemann |
514c2a |
# rebased from https://github.com/strukturag/libheif/commit/2ca02a128b2f76f7f293aa86a2ce1e04a8306c65.patch
|
|
Bernhard M. Wiedemann |
514c2a |
Patch1: 2ca02a128b2f76f7f293aa86a2ce1e04a8306c65.patch
|
|
|
418dec |
BuildRequires: cmake
|
|
|
418dec |
BuildRequires: fdupes
|
|
|
bcd51e |
BuildRequires: gcc-c++
|
|
|
82acd2 |
BuildRequires: pkgconfig
|
|
|
418dec |
BuildRequires: pkgconfig(aom)
|
|
|
32702a |
BuildRequires: pkgconfig(dav1d)
|
|
|
bcd51e |
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
|
|
|
418dec |
BuildRequires: pkgconfig(libjpeg)
|
|
|
bcd51e |
BuildRequires: pkgconfig(libpng)
|
|
|
89be4a |
%if %{with rav1e}
|
|
|
32702a |
BuildRequires: pkgconfig(rav1e)
|
|
|
32702a |
%endif
|
|
|
89be4a |
%if %{with svtenc}
|
|
|
89be4a |
BuildRequires: pkgconfig(SvtAv1Enc)
|
|
|
89be4a |
%endif
|
|
|
bcd51e |
%if %{with x265}
|
|
|
bcd51e |
BuildRequires: pkgconfig(libde265)
|
|
|
bcd51e |
BuildRequires: pkgconfig(x265)
|
|
|
bcd51e |
%endif
|
|
|
418dec |
|
|
|
418dec |
%description
|
|
|
418dec |
libheif is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File Format) file
|
|
|
418dec |
format decoder and encoder.
|
|
|
418dec |
|
|
|
418dec |
HEIF and AVIF are new image file formats employing HEVC (H.265) or AV1 image
|
|
|
418dec |
coding, respectively, for the best compression ratios currently possible.
|
|
|
418dec |
|
|
|
418dec |
%package -n libheif1
|
|
|
418dec |
Summary: HEIF/AVIF file format decoder and encoder
|
|
|
418dec |
Group: System/Libraries
|
|
|
418dec |
|
|
|
418dec |
%description -n libheif1
|
|
|
418dec |
libheif is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File Format) file
|
|
|
418dec |
format decoder and encoder.
|
|
|
418dec |
|
|
|
418dec |
HEIF and AVIF are new image file formats employing HEVC (H.265) or AV1 image
|
|
|
418dec |
coding, respectively, for the best compression ratios currently possible.
|
|
|
418dec |
|
|
|
418dec |
For AVIF libaom, dav1d, or rav1e are used as codecs. HEIF support is not
|
|
|
418dec |
provided.
|
|
|
418dec |
|
|
|
418dec |
%package devel
|
|
|
418dec |
Summary: Devel Package for %{name}
|
|
|
418dec |
Group: Development/Libraries/C and C++
|
|
|
418dec |
Requires: libheif1 = %{version}-%{release}
|
|
|
418dec |
|
|
|
418dec |
%description devel
|
|
|
1535dc |
libheif is a ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.
|
|
|
418dec |
This package contains the header files.
|
|
|
418dec |
|
|
|
418dec |
%package -n gdk-pixbuf-loader-libheif
|
|
|
418dec |
Summary: GDK PixBuf Loader for %{name}
|
|
|
418dec |
Group: System/Libraries
|
|
|
82acd2 |
Supplements: (libheif1 and libgdk_pixbuf-2_0-0)
|
|
|
418dec |
|
|
|
418dec |
%description -n gdk-pixbuf-loader-libheif
|
|
|
418dec |
A ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.
|
|
|
418dec |
|
|
|
418dec |
This package contains the GDK PixBuf Loader for %{name}.
|
|
|
418dec |
|
|
|
bcd51e |
%if %{with x265}
|
|
|
bcd51e |
%package -n heif-examples
|
|
|
bcd51e |
Summary: Example binary programs for %{name}
|
|
|
bcd51e |
Group: Productivity/Graphics/Other
|
|
|
bcd51e |
Requires: libheif1 = %{version}-%{release}
|
|
|
bcd51e |
|
|
|
bcd51e |
%description -n heif-examples
|
|
|
bcd51e |
A ISO/IEC 23008-12:2017 HEIF file format decoder and encoder.
|
|
|
bcd51e |
|
|
|
bcd51e |
This package contains example binary programs for %{name}.
|
|
|
82acd2 |
|
|
|
82acd2 |
%package -n heif-thumbnailer
|
|
|
82acd2 |
Summary: Thumbnailer for HEIF/AVIF image files
|
|
|
82acd2 |
Group: Productivity/Graphics/Other
|
|
|
82acd2 |
Requires: libheif1 = %{version}-%{release}
|
|
|
82acd2 |
Supplements: libheif1
|
|
|
82acd2 |
|
|
|
82acd2 |
%description -n heif-thumbnailer
|
|
|
82acd2 |
Allows to show thumbnail previews of HEIF and AVIF images using %{name}.
|
|
|
bcd51e |
%endif
|
|
|
418dec |
|
|
|
418dec |
%prep
|
|
|
418dec |
%autosetup -p1
|
|
|
418dec |
|
|
|
418dec |
%build
|
|
|
418dec |
%cmake \
|
|
|
89be4a |
%if %{without rav1e}
|
|
|
89be4a |
-DWITH_RAV1E=OFF \
|
|
|
89be4a |
%endif
|
|
|
89be4a |
%if %{without svtenc}
|
|
|
89be4a |
-DWITH_SvtEnc=OFF \
|
|
|
89be4a |
%endif
|
|
|
89be4a |
%if %{without x265}
|
|
|
418dec |
-DWITH_LIBDE265=OFF \
|
|
|
418dec |
-DWITH_X265=OFF \
|
|
|
82acd2 |
-DWITH_EXAMPLES=OFF \
|
|
|
89be4a |
%endif
|
|
|
89be4a |
%if 0%{?suse_version} <= 1500
|
|
|
89be4a |
-DCMAKE_CXX_FLAGS="-pthread" \
|
|
|
89be4a |
%endif
|
|
|
89be4a |
%if %{with plugins}
|
|
|
89be4a |
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
89be4a |
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF \
|
|
|
82acd2 |
-DPLUGIN_DIRECTORY=%{_libexecdir}/libheif
|
|
|
89be4a |
%else
|
|
|
89be4a |
-DENABLE_PLUGIN_LOADING=OFF
|
|
|
bcd51e |
%endif
|
|
|
418dec |
%cmake_build
|
|
|
418dec |
|
|
|
418dec |
%install
|
|
|
418dec |
%cmake_install
|
|
|
bcd51e |
%if %{with x265}
|
|
|
bcd51e |
#Install examples and man pages
|
|
|
bcd51e |
install -d -m 0755 %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1/
|
|
|
bcd51e |
for e in heif-convert \
|
|
|
bcd51e |
heif-enc \
|
|
|
bcd51e |
heif-info \
|
|
|
bcd51e |
heif-thumbnailer
|
|
|
bcd51e |
do
|
|
|
bcd51e |
install -m 0755 build/examples/$e %{buildroot}%{_bindir}/$e
|
|
|
bcd51e |
install -m 0644 examples/$e.1 %{buildroot}%{_mandir}/man1/$e.1
|
|
|
bcd51e |
done
|
|
|
82acd2 |
%else
|
|
|
82acd2 |
rm -f %{buildroot}%{_datadir}/mime/packages/avif.xml
|
|
|
82acd2 |
rm -f %{buildroot}%{_datadir}/mime/packages/heif.xml
|
|
|
82acd2 |
rm -f %{buildroot}%{_datadir}/thumbnailers/heif.thumbnailer
|
|
|
bcd51e |
%endif
|
|
|
418dec |
%fdupes -s %{buildroot}%{_includedir}
|
|
|
418dec |
|
|
|
418dec |
%post -n libheif1 -p /sbin/ldconfig
|
|
|
418dec |
%postun -n libheif1 -p /sbin/ldconfig
|
|
|
418dec |
|
|
|
876d94 |
%post -n gdk-pixbuf-loader-libheif
|
|
|
876d94 |
%{gdk_pixbuf_loader_post}
|
|
|
876d94 |
|
|
|
876d94 |
%postun -n gdk-pixbuf-loader-libheif
|
|
|
876d94 |
%{gdk_pixbuf_loader_postun}
|
|
|
876d94 |
|
|
|
418dec |
%files -n libheif1
|
|
|
418dec |
%license COPYING
|
|
|
418dec |
%{_libdir}/libheif.so.*
|
|
|
89be4a |
%if %{with plugins}
|
|
|
82acd2 |
%{_libexecdir}/libheif
|
|
|
89be4a |
%endif
|
|
|
418dec |
|
|
|
418dec |
%files devel
|
|
|
418dec |
%doc README.md
|
|
|
418dec |
%{_includedir}/libheif
|
|
|
418dec |
%{_libdir}/libheif.so
|
|
|
418dec |
%{_libdir}/cmake/libheif
|
|
|
418dec |
%{_libdir}/pkgconfig/libheif.pc
|
|
|
418dec |
|
|
|
418dec |
%files -n gdk-pixbuf-loader-libheif
|
|
|
418dec |
%{_libdir}/gdk-pixbuf-2.0/%{gdk_pixbuf_binary_version}/loaders/*.so
|
|
|
418dec |
|
|
|
bcd51e |
%if %{with x265}
|
|
|
bcd51e |
%files -n heif-examples
|
|
|
bcd51e |
%{_bindir}/heif-convert
|
|
|
bcd51e |
%{_bindir}/heif-enc
|
|
|
bcd51e |
%{_bindir}/heif-info
|
|
|
bcd51e |
%{_mandir}/man1/heif-convert.1%{?ext_man}
|
|
|
bcd51e |
%{_mandir}/man1/heif-enc.1%{?ext_man}
|
|
|
bcd51e |
%{_mandir}/man1/heif-info.1%{?ext_man}
|
|
|
82acd2 |
|
|
|
82acd2 |
%files -n heif-thumbnailer
|
|
|
82acd2 |
%{_bindir}/heif-thumbnailer
|
|
|
82acd2 |
%{_datadir}/mime/packages/avif.xml
|
|
|
82acd2 |
%{_datadir}/mime/packages/heif.xml
|
|
|
82acd2 |
%dir %{_datadir}/thumbnailers
|
|
|
82acd2 |
%{_datadir}/thumbnailers/heif.thumbnailer
|
|
|
bcd51e |
%{_mandir}/man1/heif-thumbnailer.1%{?ext_man}
|
|
|
bcd51e |
%endif
|
|
|
bcd51e |
|
|
|
418dec |
%changelog
|