public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/, media-libs/libheif/
@ 2018-10-06 16:05 Thomas Deutschmann
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Deutschmann @ 2018-10-06 16:05 UTC (permalink / raw
  To: gentoo-commits

commit:     b8a3b060c5a3feec00f662b14a825c939ce43c71
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  6 16:04:18 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct  6 16:05:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8a3b060

media-libs/libheif: add support for libjpeg-turbo-2.0

Package-Manager: Portage-2.3.50, Repoman-2.3.11
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../libheif/files/libheif-1.3.2-openjpeg-2.patch   | 93 ++++++++++++++++++++++
 ...ibheif-1.3.2.ebuild => libheif-1.3.2-r1.ebuild} |  6 +-
 2 files changed, 96 insertions(+), 3 deletions(-)

diff --git a/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch b/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch
new file mode 100644
index 00000000000..138295965b4
--- /dev/null
+++ b/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch
@@ -0,0 +1,93 @@
+Support building against libjpeg-turbo 2.0.
+
+Backport of https://github.com/strukturag/libheif/pull/85
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,6 +95,22 @@ AC_CHECK_LIB([jpeg], [jpeg_destroy_compress], [
+ ], [have_libjpeg="no"])
+ fi
+ AM_CONDITIONAL([HAVE_LIBJPEG], [test "x$have_libjpeg" = "xyes"])
++if eval "test x$have_libjpeg = xyes"; then
++AC_MSG_CHECKING([for jpeg_write_icc_profile])
++AC_LANG_PUSH(C++)
++AC_TRY_COMPILE([
++    #include <stddef.h>
++    #include <stdio.h>
++    #include <jpeglib.h>
++],[
++    jpeg_write_icc_profile(NULL, NULL, 0);
++],[has_jpeg_write_icc_profile=yes],[has_jpeg_write_icc_profile=no]);
++AC_LANG_POP(C++)
++AC_MSG_RESULT([$has_jpeg_write_icc_profile])
++if eval "test x$has_jpeg_write_icc_profile = xyes"; then
++    AC_DEFINE(HAVE_JPEG_WRITE_ICC_PROFILE, 1, [Define to 1 if jpeg_write_icc_profile is available in libjpeg.])
++fi
++fi
+ 
+ PKG_CHECK_MODULES([libpng], [libpng], [
+     AC_DEFINE([HAVE_LIBPNG], [1], [Whether libpng was found.])
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -8,6 +8,24 @@ include (${CMAKE_ROOT}/Modules/FindJPEG.cmake)
+ 
+ if(JPEG_FOUND)
+ add_definitions(-DHAVE_LIBJPEG=1)
++
++include (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
++
++set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
++check_cxx_source_compiles("
++#include <stddef.h>
++#include <stdio.h>
++#include <jpeglib.h>
++
++int main() {
++  jpeg_write_icc_profile(NULL, NULL, 0);
++  return 0;
++}
++" HAVE_JPEG_WRITE_ICC_PROFILE)
++if(HAVE_JPEG_WRITE_ICC_PROFILE)
++  add_definitions(-DHAVE_JPEG_WRITE_ICC_PROFILE=1)
++endif()
++
+ set (heif_convert_sources
+   ${heif_convert_sources}
+   encoder_jpeg.cc
+--- a/examples/encoder_jpeg.cc
++++ b/examples/encoder_jpeg.cc
+@@ -17,6 +17,10 @@
+  * You should have received a copy of the GNU General Public License
+  * along with convert.  If not, see <http://www.gnu.org/licenses/>.
+  */
++#if defined(HAVE_CONFIG_H)
++#include "config.h"
++#endif
++
+ #include <assert.h>
+ #include <errno.h>
+ #include <string.h>
+--- a/examples/encoder_jpeg.h
++++ b/examples/encoder_jpeg.h
+@@ -24,6 +24,9 @@
+ #include <stddef.h>
+ #include <stdio.h>
+ 
++// Prevent duplicate definition for newer versions of libjpeg-turbo.
++#undef HAVE_STDDEF_H
++#undef HAVE_STDLIB_H
+ #include <jpeglib.h>
+ 
+ #include <string>
+--- a/examples/heif_enc.cc
++++ b/examples/heif_enc.cc
+@@ -35,6 +35,9 @@
+ 
+ #if HAVE_LIBJPEG
+ extern "C" {
++// Prevent duplicate definition for newer versions of libjpeg-turbo.
++#undef HAVE_STDDEF_H
++#undef HAVE_STDLIB_H
+ #include <jpeglib.h>
+ }
+ #endif

diff --git a/media-libs/libheif/libheif-1.3.2.ebuild b/media-libs/libheif/libheif-1.3.2-r1.ebuild
similarity index 88%
rename from media-libs/libheif/libheif-1.3.2.ebuild
rename to media-libs/libheif/libheif-1.3.2-r1.ebuild
index 2bce8218a61..aedf7a7e259 100644
--- a/media-libs/libheif/libheif-1.3.2.ebuild
+++ b/media-libs/libheif/libheif-1.3.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -11,6 +11,8 @@ if [[ ${PV} == "9999" ]] ; then
 else
 	SRC_URI="https://github.com/strukturag/${PN}/releases/download/v${PV}/${P}.tar.gz"
 	KEYWORDS="~amd64 ~x86"
+
+	PATCHES=( "${FILESDIR}"/${P}-openjpeg-2.patch )
 fi
 
 DESCRIPTION="ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
@@ -20,14 +22,12 @@ LICENSE="GPL-3"
 SLOT="0/1.3"
 IUSE="static-libs +threads"
 
-# Doesn't yet support libjpeg-turbo-2, https://github.com/strukturag/libheif/issues/70
 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}]
-	!>=media-libs/libjpeg-turbo-2
 "
 RDEPEND="${DEPEND}"
 


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/, media-libs/libheif/
@ 2019-10-26 22:04 Thomas Deutschmann
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Deutschmann @ 2019-10-26 22:04 UTC (permalink / raw
  To: gentoo-commits

commit:     299c1ff0f29fab1d72daa3bf6a335a59f775fc02
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 26 22:03:49 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 26 22:04:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=299c1ff0

media-libs/libheif: security cleanup (#696302)

Bug: https://bugs.gentoo.org/696302
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 media-libs/libheif/Manifest                        |  3 -
 .../libheif/files/libheif-1.3.2-openjpeg-2.patch   | 93 ----------------------
 media-libs/libheif/libheif-1.3.2-r1.ebuild         | 56 -------------
 media-libs/libheif/libheif-1.4.0.ebuild            | 58 --------------
 media-libs/libheif/libheif-1.4.1.ebuild            | 66 ---------------
 5 files changed, 276 deletions(-)

diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index 0a30dd8db3c..3ce89884367 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -1,4 +1 @@
-DIST libheif-1.3.2.tar.gz 1328174 BLAKE2B 4c0f82bb90d48f89a4ce9aed525c5823bb5d008e54e580e761f6fa4f5493f265929a0607e7b81046ba7c249bd2ca21a0c5ab91da83b7e7f3a2a63e8f24df88ed SHA512 bcc8b4b2522ef6fe68f5a9ffd5312c2c8f6bc3718394eef1860e199c30fb735bb214f665ed6480b5f5fe5d578b3ed77a4301af93775ae2349ba5038b3f3ef63a
-DIST libheif-1.4.0.tar.gz 1366030 BLAKE2B a93b3b59a4f89e0aa5a5069fdebc54b9d09adeeff05ebf28b9535baa2fb26e4122b4c5d96b7015fdd181720f10e3dd0887038f0c5567c94509aa76d2ef119dd9 SHA512 fc48caaadb71ffa87227de75c9e13d5006c66f1c966ce454552defb8947999f5242a9bbd1413f58be1ccbf61df7f118defe96d67376e3b4e7b12fe5dfa0fe0c7
-DIST libheif-1.4.1.tar.gz 950721 BLAKE2B 39793dbf4334b7ca93993ba518f9c935eb6d29a2debea12a3f1727d245572945e456b7997d79403da53bb5701ee62af8235a9815221402e5b901d9c07aa015a0 SHA512 c6e7d00c040885c506dde40469ba51b0346126689ed238abce123b471f748431cb29914015b3ca97749855a0f1f7c8e9a58388d4468da3c2d17c7a3a15270af0
 DIST libheif-1.5.1.tar.gz 1510087 BLAKE2B 1dd5e913c8913c6b62b770653585f8ccf7cda14c4dd79ff2073bf085da4d730accaef8d0f8008ac941238a7e3e131add1a218e0c78a886847b3bcf253d66c9b6 SHA512 05e32ebff08d5f0e82e9b1107253c27882ae1694150033fe7b3ca07db8c64567f09002081276e92a3b490a63022a1522d577b094a7f489742139758d17f484b8

diff --git a/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch b/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch
deleted file mode 100644
index 138295965b4..00000000000
--- a/media-libs/libheif/files/libheif-1.3.2-openjpeg-2.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-Support building against libjpeg-turbo 2.0.
-
-Backport of https://github.com/strukturag/libheif/pull/85
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -95,6 +95,22 @@ AC_CHECK_LIB([jpeg], [jpeg_destroy_compress], [
- ], [have_libjpeg="no"])
- fi
- AM_CONDITIONAL([HAVE_LIBJPEG], [test "x$have_libjpeg" = "xyes"])
-+if eval "test x$have_libjpeg = xyes"; then
-+AC_MSG_CHECKING([for jpeg_write_icc_profile])
-+AC_LANG_PUSH(C++)
-+AC_TRY_COMPILE([
-+    #include <stddef.h>
-+    #include <stdio.h>
-+    #include <jpeglib.h>
-+],[
-+    jpeg_write_icc_profile(NULL, NULL, 0);
-+],[has_jpeg_write_icc_profile=yes],[has_jpeg_write_icc_profile=no]);
-+AC_LANG_POP(C++)
-+AC_MSG_RESULT([$has_jpeg_write_icc_profile])
-+if eval "test x$has_jpeg_write_icc_profile = xyes"; then
-+    AC_DEFINE(HAVE_JPEG_WRITE_ICC_PROFILE, 1, [Define to 1 if jpeg_write_icc_profile is available in libjpeg.])
-+fi
-+fi
- 
- PKG_CHECK_MODULES([libpng], [libpng], [
-     AC_DEFINE([HAVE_LIBPNG], [1], [Whether libpng was found.])
---- a/examples/CMakeLists.txt
-+++ b/examples/CMakeLists.txt
-@@ -8,6 +8,24 @@ include (${CMAKE_ROOT}/Modules/FindJPEG.cmake)
- 
- if(JPEG_FOUND)
- add_definitions(-DHAVE_LIBJPEG=1)
-+
-+include (${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
-+
-+set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
-+check_cxx_source_compiles("
-+#include <stddef.h>
-+#include <stdio.h>
-+#include <jpeglib.h>
-+
-+int main() {
-+  jpeg_write_icc_profile(NULL, NULL, 0);
-+  return 0;
-+}
-+" HAVE_JPEG_WRITE_ICC_PROFILE)
-+if(HAVE_JPEG_WRITE_ICC_PROFILE)
-+  add_definitions(-DHAVE_JPEG_WRITE_ICC_PROFILE=1)
-+endif()
-+
- set (heif_convert_sources
-   ${heif_convert_sources}
-   encoder_jpeg.cc
---- a/examples/encoder_jpeg.cc
-+++ b/examples/encoder_jpeg.cc
-@@ -17,6 +17,10 @@
-  * You should have received a copy of the GNU General Public License
-  * along with convert.  If not, see <http://www.gnu.org/licenses/>.
-  */
-+#if defined(HAVE_CONFIG_H)
-+#include "config.h"
-+#endif
-+
- #include <assert.h>
- #include <errno.h>
- #include <string.h>
---- a/examples/encoder_jpeg.h
-+++ b/examples/encoder_jpeg.h
-@@ -24,6 +24,9 @@
- #include <stddef.h>
- #include <stdio.h>
- 
-+// Prevent duplicate definition for newer versions of libjpeg-turbo.
-+#undef HAVE_STDDEF_H
-+#undef HAVE_STDLIB_H
- #include <jpeglib.h>
- 
- #include <string>
---- a/examples/heif_enc.cc
-+++ b/examples/heif_enc.cc
-@@ -35,6 +35,9 @@
- 
- #if HAVE_LIBJPEG
- extern "C" {
-+// Prevent duplicate definition for newer versions of libjpeg-turbo.
-+#undef HAVE_STDDEF_H
-+#undef HAVE_STDLIB_H
- #include <jpeglib.h>
- }
- #endif

diff --git a/media-libs/libheif/libheif-1.3.2-r1.ebuild b/media-libs/libheif/libheif-1.3.2-r1.ebuild
deleted file mode 100644
index f65ef1de3e8..00000000000
--- a/media-libs/libheif/libheif-1.3.2-r1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools 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 arm64 x86"
-
-	PATCHES=( "${FILESDIR}"/${P}-openjpeg-2.patch )
-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.3"
-IUSE="static-libs +threads"
-
-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}"
-
-src_prepare() {
-	default
-
-	sed -i -e 's:-Werror::' \
-		configure.ac || die
-
-	eautoreconf
-}
-
-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
-}

diff --git a/media-libs/libheif/libheif-1.4.0.ebuild b/media-libs/libheif/libheif-1.4.0.ebuild
deleted file mode 100644
index 4950607eb42..00000000000
--- a/media-libs/libheif/libheif-1.4.0.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools 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 ~arm64 ~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.4"
-IUSE="static-libs test +threads"
-
-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}"
-
-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
-}

diff --git a/media-libs/libheif/libheif-1.4.1.ebuild b/media-libs/libheif/libheif-1.4.1.ebuild
deleted file mode 100644
index cdb69afd093..00000000000
--- a/media-libs/libheif/libheif-1.4.1.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2019 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}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~amd64 ~arm64 ~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.4"
-IUSE="static-libs test +threads"
-
-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}"
-
-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] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/, media-libs/libheif/
@ 2020-08-15  0:58 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2020-08-15  0:58 UTC (permalink / raw
  To: gentoo-commits

commit:     037503cb9f6b23fcfef0f858ad1d80c8f0768504
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 00:57:50 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 00:58:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=037503cb

Revert "media-libs/libheif: bump to 1.7.0"

I thought I'd removed this from my queue.
This reverts commit 2342cb1351a329a8398db9a71cea7deddb8db61d.

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 deletions(-)

diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index befd4776bec..95bd4fae9f8 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -1,4 +1,3 @@
 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
deleted file mode 100644
index 9dce291f964..00000000000
--- a/media-libs/libheif/files/libheif-1.7.0-aom.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-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
deleted file mode 100644
index 8cb390a020e..00000000000
--- a/media-libs/libheif/libheif-1.7.0.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# 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] 6+ messages in thread

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

commit:     87a3129de24ace71bad061eab0830305db2b1f30
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: Sun Aug 16 06:18:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87a3129d

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>
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] 6+ messages in thread

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

commit:     d2cd6dbc4a29dbb6c239c47d38cf161b3a603f83
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Sat Aug 15 09:17:06 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 16 07:19:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2cd6dbc

media-libs/libheif: run tests on <1.7.0

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/commits/d17ef92b2d7cb5e5b36f64f3e383da6820a3d5c0
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/libheif/files/heif_test.go   | 155 ++++++++++++++++++++++++++++++++
 media-libs/libheif/libheif-1.5.1.ebuild |  13 ++-
 media-libs/libheif/libheif-1.6.1.ebuild |  12 ++-
 media-libs/libheif/libheif-1.6.2.ebuild |  12 ++-
 4 files changed, 188 insertions(+), 4 deletions(-)

diff --git a/media-libs/libheif/files/heif_test.go b/media-libs/libheif/files/heif_test.go
new file mode 100644
index 00000000000..187d773dea6
--- /dev/null
+++ b/media-libs/libheif/files/heif_test.go
@@ -0,0 +1,155 @@
+/*
+ * GO interface to libheif
+ * Copyright (c) 2018 struktur AG, Joachim Bauch <bauch@struktur.de>
+ *
+ * This file is part of heif, an example application using libheif.
+ *
+ * heif is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * heif is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with heif.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package heif
+
+import (
+	"fmt"
+	"image"
+	"io/ioutil"
+	"os"
+	"path"
+	"testing"
+)
+
+func TestGetVersion(t *testing.T) {
+	version := GetVersion()
+	if version == "" {
+		t.Fatal("Version is missing")
+	}
+}
+
+func CheckHeifImage(t *testing.T, handle *ImageHandle, thumbnail bool) {
+	handle.GetWidth()
+	handle.GetHeight()
+	handle.HasAlphaChannel()
+	handle.HasDepthImage()
+	count := handle.GetNumberOfDepthImages()
+	if ids := handle.GetListOfDepthImageIDs(); len(ids) != count {
+		t.Errorf("Expected %d depth image ids, got %d", count, len(ids))
+	}
+	if !thumbnail {
+		count = handle.GetNumberOfThumbnails()
+		ids := handle.GetListOfThumbnailIDs()
+		if len(ids) != count {
+			t.Errorf("Expected %d thumbnail image ids, got %d", count, len(ids))
+		}
+		for _, id := range ids {
+			if thumb, err := handle.GetThumbnail(id); err != nil {
+				t.Errorf("Could not get thumbnail %d: %s", id, err)
+			} else {
+				CheckHeifImage(t, thumb, true)
+			}
+		}
+	}
+
+	if img, err := handle.DecodeImage(ColorspaceUndefined, ChromaUndefined, nil); err != nil {
+		t.Errorf("Could not decode image: %s", err)
+	} else {
+		img.GetColorspace()
+		img.GetChromaFormat()
+	}
+}
+
+func CheckHeifFile(t *testing.T, ctx *Context) {
+	if count := ctx.GetNumberOfTopLevelImages(); count != 2 {
+		t.Errorf("Expected %d top level images, got %d", 2, count)
+	}
+	if ids := ctx.GetListOfTopLevelImageIDs(); len(ids) != 2 {
+		t.Errorf("Expected %d top level image ids, got %+v", 2, ids)
+	}
+	if _, err := ctx.GetPrimaryImageID(); err != nil {
+		t.Errorf("Expected a primary image, got %s", err)
+	}
+	if handle, err := ctx.GetPrimaryImageHandle(); err != nil {
+		t.Errorf("Could not get primary image handle: %s", err)
+	} else {
+		if !handle.IsPrimaryImage() {
+			t.Error("Expected primary image")
+		}
+		CheckHeifImage(t, handle, false)
+	}
+}
+
+func TestReadFromFile(t *testing.T) {
+	ctx, err := NewContext()
+	if err != nil {
+		t.Fatalf("Can't create context: %s", err)
+	}
+
+	filename := path.Join("..", "..", "examples", "example.heic")
+	if err := ctx.ReadFromFile(filename); err != nil {
+		t.Fatalf("Can't read from %s: %s", filename, err)
+	}
+
+	CheckHeifFile(t, ctx)
+}
+
+func TestReadFromMemory(t *testing.T) {
+	ctx, err := NewContext()
+	if err != nil {
+		t.Fatalf("Can't create context: %s", err)
+	}
+
+	filename := path.Join("..", "..", "examples", "example.heic")
+	data, err := ioutil.ReadFile(filename)
+	if err != nil {
+		t.Fatalf("Can't read file %s: %s", filename, err)
+	}
+	if err := ctx.ReadFromMemory(data); err != nil {
+		t.Fatalf("Can't read from memory: %s", err)
+	}
+	data = nil // Make sure future processing works if "data" is GC'd
+
+	CheckHeifFile(t, ctx)
+}
+
+func TestReadImage(t *testing.T) {
+	filename := path.Join("..", "..", "examples", "example.heic")
+	fp, err := os.Open(filename)
+	if err != nil {
+		t.Fatalf("Could not open %s: %s", filename, err)
+	}
+	defer fp.Close()
+
+	config, format1, err := image.DecodeConfig(fp)
+	if err != nil {
+		t.Fatalf("Could not load image config from %s: %s", filename, err)
+	}
+	if format1 != "heif" {
+		t.Errorf("Expected format heif, got %s", format1)
+	}
+	if _, err := fp.Seek(0, 0); err != nil {
+		t.Fatalf("Could not seek to start of %s: %s", filename, err)
+	}
+
+	img, format2, err := image.Decode(fp)
+	if err != nil {
+		t.Fatalf("Could not load image from %s: %s", filename, err)
+	}
+	if format2 != "heif" {
+		t.Errorf("Expected format heif, got %s", format2)
+	}
+
+	r := img.Bounds()
+	if config.Width != (r.Max.X-r.Min.X) || config.Height != (r.Max.Y-r.Min.Y) {
+		fmt.Printf("Image size %+v does not match config %+v\n", r, config)
+	}
+}

diff --git a/media-libs/libheif/libheif-1.5.1.ebuild b/media-libs/libheif/libheif-1.5.1.ebuild
index e737b4ce1e4..ea2fa1ddafb 100644
--- a/media-libs/libheif/libheif-1.5.1.ebuild
+++ b/media-libs/libheif/libheif-1.5.1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI=7
 
 inherit autotools xdg-utils multilib-minimal
 
@@ -34,6 +34,10 @@ RDEPEND="${DEPEND}"
 src_prepare() {
 	default
 
+	# heif_test.go is not included in the tarball
+	# https://github.com/strukturag/libheif/issues/289
+	cp "${FILESDIR}/heif_test.go" "${S}/go/heif" || die
+
 	sed -i -e 's:-Werror::' \
 		configure.ac || die
 
@@ -51,6 +55,11 @@ multilib_src_configure() {
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
+multilib_src_test() {
+	default
+	emake -C go test
+}
+
 multilib_src_install_all() {
 	find "${ED}" -name '*.la' -delete || die
 	if ! use static-libs ; then

diff --git a/media-libs/libheif/libheif-1.6.1.ebuild b/media-libs/libheif/libheif-1.6.1.ebuild
index 07885456ea4..68966c34be8 100644
--- a/media-libs/libheif/libheif-1.6.1.ebuild
+++ b/media-libs/libheif/libheif-1.6.1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI=7
 
 inherit autotools xdg-utils multilib-minimal
 
@@ -19,6 +19,7 @@ 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 )"
@@ -34,6 +35,10 @@ RDEPEND="${DEPEND}"
 src_prepare() {
 	default
 
+	# heif_test.go is not included in the tarball
+	# https://github.com/strukturag/libheif/issues/289
+	cp "${FILESDIR}/heif_test.go" "${S}/go/heif" || die
+
 	sed -i -e 's:-Werror::' configure.ac || die
 
 	eautoreconf
@@ -50,6 +55,11 @@ multilib_src_configure() {
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
+multilib_src_test() {
+	default
+	emake -C go test
+}
+
 multilib_src_install_all() {
 	find "${ED}" -name '*.la' -delete || die
 	if ! use static-libs ; then

diff --git a/media-libs/libheif/libheif-1.6.2.ebuild b/media-libs/libheif/libheif-1.6.2.ebuild
index f82ec6214c6..3644fcb74e4 100644
--- a/media-libs/libheif/libheif-1.6.2.ebuild
+++ b/media-libs/libheif/libheif-1.6.2.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI=7
 
 inherit autotools xdg-utils multilib-minimal
 
@@ -19,6 +19,7 @@ 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 )"
@@ -34,6 +35,10 @@ RDEPEND="${DEPEND}"
 src_prepare() {
 	default
 
+	# heif_test.go is not included in the tarball
+	# https://github.com/strukturag/libheif/issues/289
+	cp "${FILESDIR}/heif_test.go" "${S}/go/heif" || die
+
 	sed -i -e 's:-Werror::' configure.ac || die
 
 	eautoreconf
@@ -50,6 +55,11 @@ multilib_src_configure() {
 	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }
 
+multilib_src_test() {
+	default
+	emake -C go test
+}
+
 multilib_src_install_all() {
 	find "${ED}" -name '*.la' -delete || die
 	if ! use static-libs ; then


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/, media-libs/libheif/
@ 2024-07-29  9:35 Pacho Ramos
  0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2024-07-29  9:35 UTC (permalink / raw
  To: gentoo-commits

commit:     8d9c9b8d228091278121da82bec2a47d506ac2ba
Author:     Guillermo Joandet <gjoandet <AT> gmail <DOT> com>
AuthorDate: Wed Jul 24 16:12:31 2024 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 09:34:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d9c9b8d

media-libs/libheif: Bump to 1.18.1

Thanks-to: eli-schwartz
Signed-off-by: Guillermo Joandet <gjoandet <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36951
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 media-libs/libheif/Manifest                        |   1 +
 ...TDIR_when_generating_heif-convert_symlink.patch |  22 +++++
 media-libs/libheif/libheif-1.18.1.ebuild           | 101 +++++++++++++++++++++
 3 files changed, 124 insertions(+)

diff --git a/media-libs/libheif/Manifest b/media-libs/libheif/Manifest
index 909676530c35..c09dfaf8e1a2 100644
--- a/media-libs/libheif/Manifest
+++ b/media-libs/libheif/Manifest
@@ -1,2 +1,3 @@
 DIST libheif-1.15.2.tar.gz 1749773 BLAKE2B 788ecf59c936bfae9544bedd5fa50fd74f04adf29f804994bc208d2a5339b13984baf78a508babd80fa0d48381b2cc0bfb1e1140de97437b8c0336378a64fcb6 SHA512 79f22dad084bbe965dae7b8f92fc119dbdde7a04577ca9c7bc28b1a022a06f0ae64d3fbd11e82d6907f0fd678a31d98275e508a51a6bd0a9e8675c93790f1996
 DIST libheif-1.17.6.tar.gz 1433302 BLAKE2B 937a1ddfd86c4d50a609e24d00c07e0d1924a5532e36293f83fd67a38f4c13186cb5c4837598000d6d3516ec1965fdc6709ef825c327fd5ce3ea2194008b6efd SHA512 47d93df4f584979cea26af74cd8543b13398356b5fd46b1b378f7738cee471e80b7e117f6ce307674a549182f5ce22a577c6e79a6e72fe166421efc4be04687a
+DIST libheif-1.18.1.tar.gz 1524386 BLAKE2B 07c01c273460618d56b9259c2930da34632fffdcc2338480277e678ab173126bc9d6882a33dc459ed7cdacd7e636ff8d13c406c76c046afc47166609e9595942 SHA512 0b37b834882af8368fc550e75245f4cf487c71a041833ba5e7887155e289e9c2058b41724524091347f297cfdec45b537796a97f4c43531aecf9f0a099753f41

diff --git a/media-libs/libheif/files/libheif-1.18.1-prepend_DESTDIR_when_generating_heif-convert_symlink.patch b/media-libs/libheif/files/libheif-1.18.1-prepend_DESTDIR_when_generating_heif-convert_symlink.patch
new file mode 100644
index 000000000000..aee9049751aa
--- /dev/null
+++ b/media-libs/libheif/files/libheif-1.18.1-prepend_DESTDIR_when_generating_heif-convert_symlink.patch
@@ -0,0 +1,22 @@
+From 337aa421f68c0274eb0db047646160b05fdde4a0 Mon Sep 17 00:00:00 2001
+From: Dirk Farin <dirk.farin@gmail.com>
+Date: Wed, 24 Jul 2024 16:11:43 +0200
+Subject: [PATCH] fix installing heif-convert symlink in DESTDIR (#1249)
+
+---
+ examples/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 8ac3114370..fc9d2f2ca0 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -34,7 +34,7 @@ install(FILES heif-dec.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
+ 
+ # create symbolic link from the old name `heif-convert` to `heif-dec`
+ if(NOT WIN32)
+-  install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-dec${CMAKE_EXECUTABLE_SUFFIX} ${DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-convert${CMAKE_EXECUTABLE_SUFFIX})")
++  install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink heif-dec${CMAKE_EXECUTABLE_SUFFIX} \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-convert${CMAKE_EXECUTABLE_SUFFIX})")
+ else()
+   install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-dec${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/heif-convert${CMAKE_EXECUTABLE_SUFFIX})")
+ endif()

diff --git a/media-libs/libheif/libheif-1.18.1.ebuild b/media-libs/libheif/libheif-1.18.1.ebuild
new file mode 100644
index 000000000000..af5f70f0dcf7
--- /dev/null
+++ b/media-libs/libheif/libheif-1.18.1.ebuild
@@ -0,0 +1,101 @@
+# 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 x265"
+REQUIRED_USE="test? ( go )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+	test? (
+		dev-cpp/catch
+		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}] )
+	x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}"
+
+# https://github.com/strukturag/libheif/issues/1249
+PATCHES=( "${FILESDIR}"/${P}-prepend_DESTDIR_when_generating_heif-convert_symlink.patch )
+
+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
+
+	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_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
+}


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

end of thread, other threads:[~2024-07-29  9:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-06 16:05 [gentoo-commits] repo/gentoo:master commit in: media-libs/libheif/files/, media-libs/libheif/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2019-10-26 22:04 Thomas Deutschmann
2020-08-15  0:58 Sam James
2020-08-16  6:18 Sam James
2020-08-16  7:19 Sam James
2024-07-29  9:35 Pacho Ramos

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