public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/
Date: Sat, 15 Aug 2020 00:57:39 +0000 (UTC)	[thread overview]
Message-ID: <1597452648.2342cb1351a329a8398db9a71cea7deddb8db61d.sam@gentoo> (raw)

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
+}


             reply	other threads:[~2020-08-15  0:57 UTC|newest]

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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1597452648.2342cb1351a329a8398db9a71cea7deddb8db61d.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox