media-libs/libheif: add 1.19.7

* Fix running tests (!) as previously we weren't running cmake_src_test
  at all. While at it, drop useless phase definitions and embrace
  cmake-multilib.eclass.

* Drop USE=go requirement for tests. Doesn't seem required at all now.

* Drops -Werror sed as it now uses the CMake property/setting for that,
  but we already set that in the eclass since 689be1a4af.

* Fix automagic Doxygen dependency.

* Move USE=go dep on dev-lang/go from RDEPEND->BDEPEND.

* Fix USE=gdk-pixbuf (bug #950491).

Bug: https://bugs.gentoo.org/790593
Bug: https://bugs.gentoo.org/953971
Closes: https://bugs.gentoo.org/943172
Closes: https://bugs.gentoo.org/950491
Closes: https://bugs.gentoo.org/951505
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-04-20 10:10:58 +01:00
parent d37c27baf7
commit 0e0ae4efeb
4 changed files with 113 additions and 41 deletions

View File

@@ -1 +1,2 @@
DIST libheif-1.18.2.tar.gz 1525096 BLAKE2B 667a68f324f89b2274ea837ec8d40ada5450dce79f2b8d9e8ba365fe5f02d4222195109519380a6d38c4ebca929575e58c3a8e517aed27a2696d67db3e287556 SHA512 8fd47dbc8e31fdb6a972c852bc4e78440492ee3dd769e139f28ad489ccc23e6cf42a90cd23b16405fa30df3c7c43c78b2b65d5ca3ffb449bf06789b457ed3072
DIST libheif-1.19.7.tar.gz 1717186 BLAKE2B 78c7db44b9131fbf46516fdb1ef149dd402e11512f600f6b0d5d73768d760cce023e4f2481accdbfb1826c9be9668f933b57a6c2a6da58b731c6aa409d94750b SHA512 b0c3226c528daf78d8e8f73b5a07b9104e3ff036c553a66fdd0ca494380d8fb03c799241f0ea66b5f7e42d4fec87d186571f2aae9ac4820ffd7ff76d704f487b

View File

@@ -0,0 +1,85 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake-multilib gnome2-utils xdg
DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
HOMEPAGE="https://github.com/strukturag/libheif"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/strukturag/libheif.git"
inherit git-r3
else
SRC_URI="https://github.com/strukturag/libheif/releases/download/v${PV}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
fi
LICENSE="GPL-3"
SLOT="0/$(ver_cut 1-2)"
IUSE="+aom doc examples gdk-pixbuf go openh264 rav1e svt-av1 test +threads +webp x265"
RESTRICT="!test? ( test )"
BDEPEND="
doc? ( app-text/doxygen )
go? ( dev-lang/go:= )
"
DEPEND="
media-libs/dav1d:=[${MULTILIB_USEDEP}]
media-libs/libde265[${MULTILIB_USEDEP}]
media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
media-libs/libpng:=[${MULTILIB_USEDEP}]
media-libs/tiff:=[${MULTILIB_USEDEP}]
sys-libs/zlib:=[${MULTILIB_USEDEP}]
aom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] )
gdk-pixbuf? ( x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}] )
openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] )
rav1e? ( media-video/rav1e:= )
svt-av1? ( media-libs/svt-av1:=[${MULTILIB_USEDEP}] )
webp? ( media-libs/libwebp:= )
x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )
"
RDEPEND="${DEPEND}"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libheif/heif_version.h
)
multilib_src_configure() {
export GO111MODULE=auto
local mycmakeargs=(
$(cmake_use_find_package doc Doxygen)
-DBUILD_TESTING=$(usex test)
-DENABLE_PLUGIN_LOADING=true
-DWITH_LIBDE265=true
-DWITH_AOM_DECODER=$(usex aom)
-DWITH_AOM_ENCODER=$(usex aom)
-DWITH_EXAMPLES=$(usex examples)
-DWITH_GDK_PIXBUF=$(usex gdk-pixbuf)
-DWITH_OpenH264_DECODER=$(usex openh264)
-DWITH_OpenH264_ENCODER=$(usex openh264)
-DWITH_RAV1E=$(multilib_native_usex rav1e)
-DWITH_SvtEnc=$(usex svt-av1)
-DWITH_LIBSHARPYUV=$(usex webp)
-DWITH_X265=$(usex x265)
-DWITH_KVAZAAR=true
-DWITH_JPEG_DECODER=true
-DWITH_JPEG_ENCODER=true
-DWITH_OpenJPEG_DECODER=true
-DWITH_OpenJPEG_ENCODER=true
)
cmake_src_configure
}
pkg_postinst() {
xdg_pkg_postinst
use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update
}
pkg_postrm() {
xdg_pkg_postrm
use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update
}

View File

@@ -1,9 +1,12 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg multilib-minimal
inherit cmake-multilib gnome2-utils xdg
DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
HOMEPAGE="https://github.com/strukturag/libheif"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/strukturag/libheif.git"
@@ -13,31 +16,25 @@ else
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
fi
DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
HOMEPAGE="https://github.com/strukturag/libheif"
LICENSE="GPL-3"
SLOT="0/$(ver_cut 1-2)"
IUSE="+aom gdk-pixbuf go rav1e svt-av1 test +threads +webp x265"
REQUIRED_USE="test? ( go )"
IUSE="+aom doc examples gdk-pixbuf go openh264 rav1e svt-av1 test +threads +webp x265"
RESTRICT="!test? ( test )"
BDEPEND="
test? (
dev-cpp/catch
dev-lang/go
)
doc? ( app-text/doxygen )
go? ( dev-lang/go:= )
"
DEPEND="
media-libs/dav1d:=[${MULTILIB_USEDEP}]
media-libs/libde265[${MULTILIB_USEDEP}]
media-libs/libpng:0=[${MULTILIB_USEDEP}]
media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
media-libs/libpng:=[${MULTILIB_USEDEP}]
media-libs/tiff:=[${MULTILIB_USEDEP}]
sys-libs/zlib:=[${MULTILIB_USEDEP}]
media-libs/libjpeg-turbo:0=[${MULTILIB_USEDEP}]
aom? ( >=media-libs/libaom-2.0.0:=[${MULTILIB_USEDEP}] )
gdk-pixbuf? ( x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}] )
go? ( dev-lang/go )
openh264? ( media-libs/openh264:=[${MULTILIB_USEDEP}] )
rav1e? ( media-video/rav1e:= )
svt-av1? ( media-libs/svt-av1:=[${MULTILIB_USEDEP}] )
webp? ( media-libs/libwebp:= )
@@ -49,28 +46,22 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libheif/heif_version.h
)
src_prepare() {
if use test ; then
# bug 865351
rm tests/catch.hpp || die
ln -s "${ESYSROOT}"/usr/include/catch2/catch.hpp tests/catch.hpp || die
fi
cmake_src_prepare
multilib_copy_sources
}
multilib_src_configure() {
export GO111MODULE=auto
local mycmakeargs=(
$(cmake_use_find_package doc Doxygen)
-DBUILD_TESTING=$(usex test)
-DENABLE_PLUGIN_LOADING=true
-DWITH_LIBDE265=true
-DWITH_AOM_DECODER=$(usex aom)
-DWITH_AOM_ENCODER=$(usex aom)
-DWITH_EXAMPLES=$(usex examples)
-DWITH_GDK_PIXBUF=$(usex gdk-pixbuf)
-DWITH_RAV1E="$(multilib_native_usex rav1e)"
-DWITH_SvtEnc="$(usex svt-av1)"
-DWITH_OpenH264_DECODER=$(usex openh264)
-DWITH_OpenH264_ENCODER=$(usex openh264)
-DWITH_RAV1E=$(multilib_native_usex rav1e)
-DWITH_SvtEnc=$(usex svt-av1)
-DWITH_LIBSHARPYUV=$(usex webp)
-DWITH_X265=$(usex x265)
-DWITH_KVAZAAR=true
@@ -79,22 +70,16 @@ multilib_src_configure() {
-DWITH_OpenJPEG_DECODER=true
-DWITH_OpenJPEG_ENCODER=true
)
cmake_src_configure
}
multilib_src_compile() {
default
cmake_src_compile
pkg_postinst() {
xdg_pkg_postinst
use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update
}
multilib_src_test() {
default
}
multilib_src_install() {
cmake_src_install
}
multilib_src_install_all() {
einstalldocs
pkg_postrm() {
xdg_pkg_postrm
use gdk-pixbuf && multilib_foreach_abi gnome2_gdk_pixbuf_update
}

View File

@@ -6,6 +6,7 @@
<flag name="aom">Use <pkg>media-libs/libaom</pkg> for AVIF encoding/decoding</flag>
<flag name="gdk-pixbuf">Enable <pkg>x11-libs/gdk-pixbuf</pkg> plugin</flag>
<flag name="go">Enable building <pkg>dev-lang/go</pkg> code/examples</flag>
<flag name="openh264">Enable H.264 support using <pkg>media-libs/openh264</pkg></flag>
<flag name="rav1e">Use <pkg>media-video/rav1e</pkg> for AVIF encoding</flag>
<flag name="svt-av1">Use <pkg>media-libs/svt-av1</pkg> for SVT-AV1 encoding</flag>
<flag name="webp">Enable high-quality YCbCr/RGB color space conversion algorithms</flag>