commit:     447c8c96f8d6c45ad85bbae3ad190c08602cff01
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 12:39:36 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 26 03:02:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=447c8c96

app-misc/hivex: fix building ruby extensions + enable ruby31, enable ruby32

This was totally broken before and only built one Ruby at best.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...{hivex-1.3.23.ebuild => hivex-1.3.23-r1.ebuild} | 35 ++++++++++++++++++++--
 1 file changed, 32 insertions(+), 3 deletions(-)

diff --git a/app-misc/hivex/hivex-1.3.23.ebuild 
b/app-misc/hivex/hivex-1.3.23-r1.ebuild
similarity index 80%
rename from app-misc/hivex/hivex-1.3.23.ebuild
rename to app-misc/hivex/hivex-1.3.23-r1.ebuild
index eb478bcce09c..de92e2a9cade 100644
--- a/app-misc/hivex/hivex-1.3.23.ebuild
+++ b/app-misc/hivex/hivex-1.3.23-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-USE_RUBY="ruby27 ruby30"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
 RUBY_OPTIONAL=yes
 PYTHON_COMPAT=( python3_{9..11} )
 inherit perl-module ruby-ng python-single-r1 strip-linguas
@@ -31,7 +31,7 @@ RDEPEND="
                dev-perl/IO-stringy
        )
        python? ( ${PYTHON_DEPS} )
-       readline? ( sys-libs/readline:0 )
+       readline? ( sys-libs/readline:= )
        ruby? ( $(ruby_implementations_depend) )
 "
 DEPEND="
@@ -100,21 +100,46 @@ src_configure() {
        econf "${myeconfargs[@]}"
 }
 
+each_ruby_configure() {
+       local myeconfargs=(
+               --without-readline
+               --disable-ocaml
+               --disable-perl
+               --enable-nls
+               --enable-ruby
+               --disable-python
+               --disable-rpath
+       )
+
+       export ac_cv_prog_RUBY="${RUBY}"
+
+       econf "${myeconfargs[@]}"
+}
+
 src_compile() {
        default
 
        use ruby && ruby-ng_src_compile
 }
 
+each_ruby_compile() {
+       # -C ruby deliberately omitted as we need the library itself built too
+       emake
+}
+
 src_test() {
        emake check
 
        local dir
-       for dir in ocaml perl python ruby ; do
+       for dir in ocaml perl python ; do
                use ${dir} && emake -C ${dir} check
        done
 }
 
+each_ruby_test() {
+       emake -C ruby check
+}
+
 src_install() {
        strip-linguas -i po
 
@@ -138,3 +163,7 @@ src_install() {
 
        find "${ED}" -name '*.la' -delete || die
 }
+
+each_ruby_install() {
+       emake -C ruby install DESTDIR="${ED}"
+}

Reply via email to