Many C extensions depend on pkgconfig during their configure phase and
this is easy to mis in the ebuild. Handle this in the eclass instead
even though the dependency will not be needed for all extensions.

Closes: https://bugs.gentoo.org/845393
Signed-off-by: Hans de Graaff <gra...@gentoo.org>
---
 eclass/ruby-fakegem.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass
index 358fff1be753..754b48f82fa9 100644
--- a/eclass/ruby-fakegem.eclass
+++ b/eclass/ruby-fakegem.eclass
@@ -210,6 +210,11 @@ case ${EAPI} in
                ;;
 esac
 
+# Many (but not all) extensions use pkgconfig in src_configure.
+if [ ${#RUBY_FAKEGEM_EXTENSIONS[@]} -ge 1 ]; then
+       BDEPEND+=" virtual/pkgconfig "
+fi
+
 # @FUNCTION: ruby_fakegem_gemsdir
 # @RETURN: Returns the gem data directory
 # @DESCRIPTION:
-- 
2.35.1


Reply via email to