commit:     a34ea67be66666a2cca94e28d8298e31180d37e6
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 20:43:06 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat May 16 15:48:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a34ea67b

dev-libs/glib: Exclude nonsensical and broken libelf dep on Windows

elfutils (via libelf) does not build on Windows. gresources are not
embedded within ELF binaries on that platform anyway and inspecting
ELF binaries from other platforms is not that useful so exclude the
dependency in this case.

For what it's worth, dev-libs/libelf was tried as an alternative but
while Meson did pick it up and link it, gresource.exe still reported
that ELF support was missing.

Closes: https://github.com/gentoo/gentoo/pull/15337
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 dev-libs/glib/glib-2.64.2.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dev-libs/glib/glib-2.64.2.ebuild b/dev-libs/glib/glib-2.64.2.ebuild
index a1034108695..8b05703c347 100644
--- a/dev-libs/glib/glib-2.64.2.ebuild
+++ b/dev-libs/glib/glib-2.64.2.ebuild
@@ -20,6 +20,9 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips 
~ppc ~ppc64 ~riscv ~
 # the check is automagic in gio/meson.build. gresource is not a multilib tool
 # right now, thus it doesn't matter if non-native ABI libelf exists or not
 # (non-native binary is overwritten, it doesn't matter if libelf was linked 
to).
+# * elfutils (via libelf) does not build on Windows. gresources are not 
embedded
+# within ELF binaries on that platform anyway and inspecting ELF binaries from
+# other platforms is not that useful so exclude the dependency in this case.
 # * Technically static-libs is needed on zlib, util-linux and perhaps more, but
 # these are used by GIO, which glib[static-libs] consumers don't really seem
 # to need at all, thus not imposing the deps for now and once some consumers
@@ -36,7 +39,7 @@ RDEPEND="
        kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
        selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
        xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] 
) )
-       virtual/libelf:0=
+       !kernel_Winnt? ( virtual/libelf:0= )
        fam? ( >=virtual/fam-0-r1[${MULTILIB_USEDEP}] )
 "
 DEPEND="${RDEPEND}"

Reply via email to