summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-11-10 12:41:07 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-11-10 12:44:32 +0100
commit591c186a97f0f9153d5850fdc39eae6390755106 (patch)
tree0f658dd141bf69482439c776b532cd9d58eb900e /media-libs
parentdev-ruby/coffee-rails: update EAPI 7 -> 8 (diff)
downloadgentoo-591c186a97f0f9153d5850fdc39eae6390755106.tar.gz
gentoo-591c186a97f0f9153d5850fdc39eae6390755106.tar.bz2
gentoo-591c186a97f0f9153d5850fdc39eae6390755106.zip
media-libs/libheif: Add IUSE webp
Closes: https://bugs.gentoo.org/942766 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libheif/libheif-1.18.2-r1.ebuild102
-rw-r--r--media-libs/libheif/libheif-9999.ebuild8
-rw-r--r--media-libs/libheif/metadata.xml1
3 files changed, 108 insertions, 3 deletions
diff --git a/media-libs/libheif/libheif-1.18.2-r1.ebuild b/media-libs/libheif/libheif-1.18.2-r1.ebuild
new file mode 100644
index 000000000000..6acf66763534
--- /dev/null
+++ b/media-libs/libheif/libheif-1.18.2-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake xdg multilib-minimal
+
+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
+
+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 )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ <dev-cpp/catch-3
+ dev-lang/go
+ )
+"
+DEPEND="
+ media-libs/dav1d:=[${MULTILIB_USEDEP}]
+ media-libs/libde265[${MULTILIB_USEDEP}]
+ media-libs/libpng:0=[${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 )
+ 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
+)
+
+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
+
+ sed -e '/Werror/d' -i CMakeLists.txt || die # bug 936466
+
+ cmake_src_prepare
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ export GO111MODULE=auto
+ local mycmakeargs=(
+ -DENABLE_PLUGIN_LOADING=true
+ -DWITH_LIBDE265=true
+ -DWITH_AOM_DECODER=$(usex aom)
+ -DWITH_AOM_ENCODER=$(usex aom)
+ -DWITH_GDK_PIXBUF=$(usex gdk-pixbuf)
+ -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
+}
+
+multilib_src_compile() {
+ default
+ cmake_src_compile
+}
+
+multilib_src_test() {
+ default
+}
+
+multilib_src_install() {
+ cmake_src_install
+}
+
+multilib_src_install_all() {
+ einstalldocs
+}
diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-9999.ebuild
index b5c9b73f88d0..0ee4f90982c5 100644
--- a/media-libs/libheif/libheif-9999.ebuild
+++ b/media-libs/libheif/libheif-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
inherit cmake xdg multilib-minimal
-if [[ ${PV} == *9999 ]] ; then
+if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/strukturag/libheif.git"
inherit git-r3
else
@@ -18,7 +18,7 @@ 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 x265"
+IUSE="+aom gdk-pixbuf go rav1e svt-av1 test +threads +webp x265"
REQUIRED_USE="test? ( go )"
RESTRICT="!test? ( test )"
@@ -30,7 +30,7 @@ BDEPEND="
"
DEPEND="
media-libs/dav1d:=[${MULTILIB_USEDEP}]
- media-libs/libde265:=[${MULTILIB_USEDEP}]
+ media-libs/libde265[${MULTILIB_USEDEP}]
media-libs/libpng:0=[${MULTILIB_USEDEP}]
media-libs/tiff:=[${MULTILIB_USEDEP}]
sys-libs/zlib:=[${MULTILIB_USEDEP}]
@@ -40,6 +40,7 @@ DEPEND="
go? ( dev-lang/go )
rav1e? ( media-video/rav1e:= )
svt-av1? ( media-libs/svt-av1:=[${MULTILIB_USEDEP}] )
+ webp? ( media-libs/libwebp:= )
x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )
"
RDEPEND="${DEPEND}"
@@ -73,6 +74,7 @@ multilib_src_configure() {
-DWITH_GDK_PIXBUF=$(usex gdk-pixbuf)
-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
diff --git a/media-libs/libheif/metadata.xml b/media-libs/libheif/metadata.xml
index e1aa5ee8fec4..c7254be4a3ca 100644
--- a/media-libs/libheif/metadata.xml
+++ b/media-libs/libheif/metadata.xml
@@ -8,6 +8,7 @@
<flag name="go">Enable building <pkg>dev-lang/go</pkg> code/examples</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>
<flag name="x265">Use <pkg> media-libs/x265</pkg> for HEIF encoding</flag>
</use>
<upstream>