commit:     7e5ad988066758717d00cbb360d708a6e71ab6e2
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 16 17:58:01 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Aug 16 18:01:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e5ad988

media-libs/libheif: Add USE=go, disable for non-native ABIs

Package-Manager: Portage-3.0.2, Repoman-2.3.23
Closes: https://bugs.gentoo.org/696850
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 media-libs/libheif/libheif-1.7.0.ebuild | 16 +++++++---------
 media-libs/libheif/libheif-9999.ebuild  | 13 ++++++-------
 media-libs/libheif/metadata.xml         |  3 +++
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/media-libs/libheif/libheif-1.7.0.ebuild 
b/media-libs/libheif/libheif-1.7.0.ebuild
index e62a26c8f09..c7406ee8a8e 100644
--- a/media-libs/libheif/libheif-1.7.0.ebuild
+++ b/media-libs/libheif/libheif-1.7.0.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://github.com/strukturag/libheif";
 
 LICENSE="GPL-3"
 SLOT="0/1.6"
-IUSE="static-libs test +threads"
+IUSE="go static-libs test +threads"
 RESTRICT="!test? ( test )"
 
 BDEPEND="test? ( dev-lang/go )"
@@ -28,11 +28,11 @@ DEPEND="
        media-libs/x265:=[${MULTILIB_USEDEP}]
        sys-libs/zlib:=[${MULTILIB_USEDEP}]
        virtual/jpeg:0=[${MULTILIB_USEDEP}]
+       go? ( dev-lang/go )
 "
 RDEPEND="${DEPEND}"
-
 PATCHES=(
-       "${FILESDIR}/${P}-aom.patch"
+       "${FILESDIR}"/${P}-aom.patch
 )
 
 src_prepare() {
@@ -47,18 +47,16 @@ src_prepare() {
 }
 
 multilib_src_configure() {
-       local myeconfargs=(
-               $(use_enable threads multithreading)
+       local econf_args=(
+               $(multilib_is_native_abi && use_enable go || echo --disable-go)
                $(use_enable static-libs static)
+               $(use_enable threads multithreading)
        )
-       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+       ECONF_SOURCE="${S}" econf "${econf_args[@]}"
 }
 
 multilib_src_install_all() {
        find "${ED}" -name '*.la' -delete || die
-       if ! use static-libs ; then
-               find "${ED}" -name "*.a" -delete || die
-       fi
 }
 
 pkg_postinst() {

diff --git a/media-libs/libheif/libheif-9999.ebuild 
b/media-libs/libheif/libheif-9999.ebuild
index 088340073a1..85e13a9e4cf 100644
--- a/media-libs/libheif/libheif-9999.ebuild
+++ b/media-libs/libheif/libheif-9999.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://github.com/strukturag/libheif";
 
 LICENSE="GPL-3"
 SLOT="0/1.6"
-IUSE="static-libs test +threads"
+IUSE="go static-libs test +threads"
 RESTRICT="!test? ( test )"
 
 BDEPEND="test? ( dev-lang/go )"
@@ -28,6 +28,7 @@ DEPEND="
        media-libs/x265:=[${MULTILIB_USEDEP}]
        sys-libs/zlib:=[${MULTILIB_USEDEP}]
        virtual/jpeg:0=[${MULTILIB_USEDEP}]
+       go? ( dev-lang/go )
 "
 RDEPEND="${DEPEND}"
 
@@ -43,18 +44,16 @@ src_prepare() {
 }
 
 multilib_src_configure() {
-       local myeconfargs=(
-               $(use_enable threads multithreading)
+       local econf_args=(
+               $(multilib_is_native_abi && use_enable go || echo --disable-go)
                $(use_enable static-libs static)
+               $(use_enable threads multithreading)
        )
-       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+       ECONF_SOURCE="${S}" econf "${econf_args[@]}"
 }
 
 multilib_src_install_all() {
        find "${ED}" -name '*.la' -delete || die
-       if ! use static-libs ; then
-               find "${ED}" -name "*.a" -delete || die
-       fi
 }
 
 pkg_postinst() {

diff --git a/media-libs/libheif/metadata.xml b/media-libs/libheif/metadata.xml
index ee4cf414e0d..481879a1442 100644
--- a/media-libs/libheif/metadata.xml
+++ b/media-libs/libheif/metadata.xml
@@ -2,6 +2,9 @@
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
        <!-- maintainer-needed -->
+       <use>
+       <flag name='go'>Add support for <pkg>dev-lang/go</pkg></flag>
+       </use>
        <upstream>
                <bugs-to>https://github.com/strukturag/libheif/issues</bugs-to>
                <remote-id type="github">strukturag/libheif</remote-id>

Reply via email to