From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C4CEE138359 for ; Sat, 15 Aug 2020 00:57:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA7C5E08D3; Sat, 15 Aug 2020 00:57:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BDFA0E08D3 for ; Sat, 15 Aug 2020 00:57:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 180B934F3C4 for ; Sat, 15 Aug 2020 00:57:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F89122B for ; Sat, 15 Aug 2020 00:57:39 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1597452648.2342cb1351a329a8398db9a71cea7deddb8db61d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/, media-libs/libheif/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libheif/Manifest media-libs/libheif/files/libheif-1.7.0-aom.patch media-libs/libheif/libheif-1.7.0.ebuild X-VCS-Directories: media-libs/libheif/ media-libs/libheif/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 2342cb1351a329a8398db9a71cea7deddb8db61d X-VCS-Branch: master Date: Sat, 15 Aug 2020 00:57:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: bb3cf1a6-63e8-4735-9340-94650a7f7ccd X-Archives-Hash: c1590b9e4a40387fcc7817ea5cd58449 commit: 2342cb1351a329a8398db9a71cea7deddb8db61d Author: Jakov Smolic sartura hr> AuthorDate: Fri Aug 14 20:06:50 2020 +0000 Commit: Sam James gentoo 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 sartura.hr> Closes: https://github.com/gentoo/gentoo/pull/17122 Signed-off-by: Sam James 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 +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 +--- + 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 +}