public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/
@ 2020-08-15  0:57 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2020-08-15  0:57 UTC (permalink / raw
  To: gentoo-commits

commit:     2342cb1351a329a8398db9a71cea7deddb8db61d
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Fri Aug 14 20:06:50 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 00:50:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2342cb13

media-libs/libheif: bump to 1.7.0

Closes: https://bugs.gentoo.org/720166
Package-Manager: Portage-2.3.99, Repoman-2.3.23
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Closes: https://github.com/gentoo/gentoo/pull/17122
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libheif/Manifest                      |  1 +
 media-libs/libheif/files/libheif-1.7.0-aom.patch | 46 +++++++++++++++
 media-libs/libheif/libheif-1.7.0.ebuild          | 71 ++++++++++++++++++++++++
 3 files changed, 118 insertions(+)

diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index 95bd4fae9f8..befd4776bec 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -1,3 +1,4 @@
 DIST libheif-1.5.1.tar.gz 1510087 BLAKE2B 1dd5e913c8913c6b62b770653585f8ccf7cda14c4dd79ff2073bf085da4d730accaef8d0f8008ac941238a7e3e131add1a218e0c78a886847b3bcf253d66c9b6 SHA512 05e32ebff08d5f0e82e9b1107253c27882ae1694150033fe7b3ca07db8c64567f09002081276e92a3b490a63022a1522d577b094a7f489742139758d17f484b8
 DIST libheif-1.6.1.tar.gz 1514950 BLAKE2B d658f0c408f9a09eaac890119119327bd3e9c84db785d001b2c7a979b9574a6723403fe063ed6ce77812bface04be124e808fc90c1325c13e3d87f8b46ac0b65 SHA512 5a2104e529d59c23c988b6c0c167f9e7017ff77763eb71fee1c26f97624e9d7e2d0f863123d1886536d37f96ea6b93969a1c53e747672c54a2220aa6f47be1bf
 DIST libheif-1.6.2.tar.gz 1515763 BLAKE2B e7a901394349bc8bbf633a0193d7a08a1cecf7e97a8ac709efb9c2e5e6da387c7fa5e8b551cecf1f67b4e7a7d06f034e64c20d7c55f9a7898c0badb79ed485f7 SHA512 41848c05d88f82827ebdd0662a1870ce8b7899f6a86ef5aa483b301176602da8e69d2c5a49b4d911bc0cac51bdab81a06fd43efae2722092cc09c02119c95f07
+DIST libheif-1.7.0.tar.gz 1526096 BLAKE2B 74b8284875321781d13d17b877eb8291ecdd0fe1700f73a433d3b125a8ee6b33a326310d729e62bac9d9fecfea095f21ef590e711d550dcaac79570b3f917885 SHA512 13c95540fee13f3fba8d8a4f69886bf5563e9fa22c5cd113dbe16d20670b077b5961171e5f9fb0f256cc42c4650e13465c93d3fbb03013997a7fc163463e8b3a

diff --git a/media-libs/libheif/files/libheif-1.7.0-aom.patch b/media-libs/libheif/files/libheif-1.7.0-aom.patch
new file mode 100644
index 00000000000..9dce291f964
--- /dev/null
+++ b/media-libs/libheif/files/libheif-1.7.0-aom.patch
@@ -0,0 +1,46 @@
+From 331dff0ba58d5265ddcdadeaf5a45c1f0698a388 Mon Sep 17 00:00:00 2001
+From: Jakov Smolic <jakov.smolic@sartura.hr>
+Date: Fri, 14 Aug 2020 22:03:25 +0200
+Subject: [PATCH] Fix building against aom 1.0
+
+Taken from upstream commit:
+https://github.com/strukturag/libheif/commit/6768552c0a99bb2957906be0f369850326486a58
+
+Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
+---
+ libheif/heif_encoder_aom.cc | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/libheif/heif_encoder_aom.cc b/libheif/heif_encoder_aom.cc
+index 9953e34..669a51a 100644
+--- a/libheif/heif_encoder_aom.cc
++++ b/libheif/heif_encoder_aom.cc
+@@ -502,9 +502,11 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
+ 
+ 
+   // --- configure codec
+-
+-  unsigned int aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_GOOD_QUALITY);
+-
++  unsigned int aomUsage = 0;
++#if defined(AOM_USAGE_REALTIME)
++  // aom 2.0
++  aomUsage = (encoder->realtime_mode ? AOM_USAGE_REALTIME : AOM_USAGE_GOOD_QUALITY);
++#endif
+ 
+   aom_codec_enc_cfg_t cfg;
+   aom_codec_err_t res = aom_codec_enc_config_default(encoder->iface, &cfg, aomUsage);
+@@ -540,7 +542,10 @@ struct heif_error aom_encode_image(void* encoder_raw, const struct heif_image* i
+   aom_codec_control(&encoder->codec, AOME_SET_CPUUSED, encoder->cpu_used);
+ 
+   if (encoder->threads > 1) {
++#if defined(AV1E_SET_ROW_MT)
++    // aom 2.0
+     aom_codec_control(&encoder->codec, AV1E_SET_ROW_MT, 1);
++#endif
+   }
+ 
+   // --- encode frame
+-- 
+2.26.2
+

diff --git a/media-libs/libheif/libheif-1.7.0.ebuild b/media-libs/libheif/libheif-1.7.0.ebuild
new file mode 100644
index 00000000000..8cb390a020e
--- /dev/null
+++ b/media-libs/libheif/libheif-1.7.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools xdg-utils multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/strukturag/${PN}.git"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/strukturag/${PN}/releases/download/v${PV}/${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~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.6"
+IUSE="static-libs test +threads"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( dev-lang/go )"
+DEPEND="
+	media-libs/libde265:=[${MULTILIB_USEDEP}]
+	media-libs/libpng:0=[${MULTILIB_USEDEP}]
+	media-libs/x265:=[${MULTILIB_USEDEP}]
+	sys-libs/zlib:=[${MULTILIB_USEDEP}]
+	virtual/jpeg:0=[${MULTILIB_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${P}-aom.patch"
+)
+
+src_prepare() {
+	default
+
+	sed -i -e 's:-Werror::' configure.ac || die
+
+	eautoreconf
+
+	# prevent "stat heif-test.go: no such file or directory"
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		$(use_enable threads multithreading)
+		$(use_enable static-libs static)
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+	find "${ED}" -name '*.la' -delete || die
+	if ! use static-libs ; then
+		find "${ED}" -name "*.a" -delete || die
+	fi
+}
+
+pkg_postinst() {
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	xdg_mimeinfo_database_update
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/
@ 2022-07-28  9:15 Jakov Smolić
  0 siblings, 0 replies; 3+ messages in thread
From: Jakov Smolić @ 2022-07-28  9:15 UTC (permalink / raw
  To: gentoo-commits

commit:     289889477eb75bb7432c9ef0f414edc6fdbfc625
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 09:09:46 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 09:15:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28988947

media-libs/libheif: Fix breakage with dav1d-1.0.0

Closes: https://bugs.gentoo.org/836205
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 .../libheif/files/libheif-1.12.0-dav1d-1.0.0.patch | 45 +++++++++++++
 media-libs/libheif/libheif-1.12.0-r2.ebuild        | 77 ++++++++++++++++++++++
 2 files changed, 122 insertions(+)

diff --git a/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch b/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch
new file mode 100644
index 000000000000..d8eb0a54016b
--- /dev/null
+++ b/media-libs/libheif/files/libheif-1.12.0-dav1d-1.0.0.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/836205
+https://github.com/strukturag/libheif/commit/0f8496f22d284e1a69df12fe0b72f375aed31315
+
+From 0f8496f22d284e1a69df12fe0b72f375aed31315 Mon Sep 17 00:00:00 2001
+From: Dirk Farin <dirk.farin@gmail.com>
+Date: Tue, 5 Apr 2022 12:17:59 +0200
+Subject: [PATCH] fix dav1d decoding: input stream must be flushed with dav1d
+ 1.0.0
+
+---
+ libheif/heif_decoder_dav1d.cc | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/libheif/heif_decoder_dav1d.cc b/libheif/heif_decoder_dav1d.cc
+index a6c42e4f..ecf7382e 100644
+--- a/libheif/heif_decoder_dav1d.cc
++++ b/libheif/heif_decoder_dav1d.cc
+@@ -163,7 +163,10 @@ struct heif_error dav1d_decode_image(void* decoder_raw, struct heif_image** out_
+   Dav1dPicture frame;
+   memset(&frame, 0, sizeof(Dav1dPicture));
+ 
++  bool flushed = false;
++
+   for (;;) {
++
+     int res = dav1d_send_data(decoder->context, &decoder->data);
+     if ((res < 0) && (res != DAV1D_ERR(EAGAIN))) {
+       err = {heif_error_Decoder_plugin_error,
+@@ -173,11 +176,11 @@ struct heif_error dav1d_decode_image(void* decoder_raw, struct heif_image** out_
+     }
+ 
+     res = dav1d_get_picture(decoder->context, &frame);
+-    if (res == DAV1D_ERR(EAGAIN)) {
+-      err = {heif_error_Decoder_plugin_error,
+-             heif_suberror_Unspecified,
+-             kEmptyString};
+-      return err;
++    if (!flushed && res == DAV1D_ERR(EAGAIN)) {
++      if (decoder->data.sz == 0) {
++        flushed = true;
++      }
++      continue;
+     }
+     else if (res < 0) {
+       err = {heif_error_Decoder_plugin_error,

diff --git a/media-libs/libheif/libheif-1.12.0-r2.ebuild b/media-libs/libheif/libheif-1.12.0-r2.ebuild
new file mode 100644
index 000000000000..b2c32a86b402
--- /dev/null
+++ b/media-libs/libheif/libheif-1.12.0-r2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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 ~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 )"
+
+BDEPEND="test? ( 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}]
+	virtual/jpeg: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}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-dav1d-1.0.0.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i -e 's:-Werror::' configure.ac || die
+
+	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 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
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/
@ 2022-08-16  1:26 Sam James
  0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2022-08-16  1:26 UTC (permalink / raw
  To: gentoo-commits

commit:     ff3eca2e2ab83585c60588c2a6270eab833b8a4f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 16 01:25:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 01:26:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff3eca2e

media-libs/libheif: fix bashism in configure

Revbump for the fix given it affects some odd visibility logic, so
we'll be careful.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libheif/files/libheif-1.12.0-fix-bashism.patch | 37 ++++++++++++++++++++++
 ...ibheif-9999.ebuild => libheif-1.12.0-r3.ebuild} |  5 +++
 media-libs/libheif/libheif-9999.ebuild             |  4 +++
 3 files changed, 46 insertions(+)

diff --git a/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch
new file mode 100644
index 000000000000..3d4d12495051
--- /dev/null
+++ b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch
@@ -0,0 +1,37 @@
+https://github.com/strukturag/libheif/pull/660
+
+From a50ef159794ff66fc0a03d5269b1c36a000673ea Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 16 Aug 2022 02:23:13 +0100
+Subject: [PATCH] configure.ac: fix bashism
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+
+Fixes errors/warnings like:
+```
+checking for pthread_create in -lpthread... yes
+checking for simple visibility declarations... yes
+/var/tmp/portage/media-libs/libheif-1.12.0-r2/work/libheif-1.12.0/configure: 18821: test: x: unexpected operator
+checking pkg-config is at least version 0.9.0... yes
+checking for aom... yes
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -85,7 +85,7 @@ AS_IF([test "x$enable_tests" = "xyes"], [
+     HAVE_VISIBILITY=0
+     CFLAG_VISIBILITY=
+ ])
+-AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" == "x1"])
++AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" = "x1"])
+ 
+ AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$HAVE_VISIBILITY" != "x0"])
+ if eval "test x$enable_visibility = x" ; then enable_visibility=yes ; fi
+

diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-1.12.0-r3.ebuild
similarity index 95%
copy from media-libs/libheif/libheif-9999.ebuild
copy to media-libs/libheif/libheif-1.12.0-r3.ebuild
index a193a851d4da..08b2005689dd 100644
--- a/media-libs/libheif/libheif-9999.ebuild
+++ b/media-libs/libheif/libheif-1.12.0-r3.ebuild
@@ -36,6 +36,11 @@ DEPEND="
 	x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-dav1d-1.0.0.patch
+	"${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch
+)
+
 src_prepare() {
 	default
 

diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-9999.ebuild
index a193a851d4da..e7ee0500a762 100644
--- a/media-libs/libheif/libheif-9999.ebuild
+++ b/media-libs/libheif/libheif-9999.ebuild
@@ -36,6 +36,10 @@ DEPEND="
 	x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch
+)
+
 src_prepare() {
 	default
 


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-16  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-15  0:57 [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-07-28  9:15 Jakov Smolić
2022-08-16  1:26 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox