summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-libs/libheif/Manifest1
-rw-r--r--media-libs/libheif/libheif-1.15.2.ebuild86
2 files changed, 87 insertions, 0 deletions
diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index 5338d85a7688..1a7311a6ba09 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -1 +1,2 @@
DIST libheif-1.13.0.tar.gz 1703950 BLAKE2B e79af787c514c02f49eb9deb42c9727a4719584d16ebb73b8ab276d9e5452c5463f359a1ace30819466f4dab30db69fec5afa2eefeaadc828e2272e91c7d4cf7 SHA512 44cb12ec7191bdf8ef2193c075d5d7a064a7a90c00625e5346624de1ebbedd064601998d042c8336d6c5b2aaef4cd3b439b850d0ab5882daa2e22dcc8722c779
+DIST libheif-1.15.2.tar.gz 1749773 BLAKE2B 788ecf59c936bfae9544bedd5fa50fd74f04adf29f804994bc208d2a5339b13984baf78a508babd80fa0d48381b2cc0bfb1e1140de97437b8c0336378a64fcb6 SHA512 79f22dad084bbe965dae7b8f92fc119dbdde7a04577ca9c7bc28b1a022a06f0ae64d3fbd11e82d6907f0fd678a31d98275e508a51a6bd0a9e8675c93790f1996
diff --git a/media-libs/libheif/libheif-1.15.2.ebuild b/media-libs/libheif/libheif-1.15.2.ebuild
new file mode 100644
index 000000000000..dc77e7276079
--- /dev/null
+++ b/media-libs/libheif/libheif-1.15.2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools 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/1.12"
+IUSE="+aom gdk-pixbuf go rav1e test +threads x265"
+REQUIRED_USE="test? ( go )"
+RESTRICT="!test? ( test )"
+
+# Bug 865351: tests requires <dev-cpp/catch-3
+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}]
+ 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:= )
+ x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ sed -i -e 's:-Werror::' configure.ac || die
+
+ if use test ; then
+ # bug 865351
+ rm tests/catch.hpp || die
+ ln -s "${ESYSROOT}"/usr/include/catch2/catch.hpp tests/catch.hpp || die
+ fi
+
+ eautoreconf
+
+ # prevent "stat heif-test.go: no such file or directory"
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ export GO111MODULE=auto
+ local econf_args=(
+ --enable-libde265
+ --disable-static
+ $(multilib_is_native_abi && use go || echo --disable-go)
+ $(use_enable aom)
+ $(use_enable gdk-pixbuf)
+ $(use_enable rav1e)
+ $(use_enable threads multithreading)
+ $(use_enable test tests)
+ $(use_enable x265)
+ )
+ ECONF_SOURCE="${S}" econf "${econf_args[@]}"
+}
+
+multilib_src_test() {
+ default
+ emake -C go test
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name '*.la' -delete || die
+}