On 20.05.22 09:17, Hans de Graaff wrote:
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
+
Not sure if we have a policy on this, but how about using bash's
extended test syntax, i.e., [[ … ]] (which the eclass already uses in a
few places).
- Flow