commit:     88a2f23c6c3b2bce6f45bbbc899380cfb456394d
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue May  6 08:14:59 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Fri May  9 07:09:50 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88a2f23c

dev-libs/newt: vastly simplify configure/build without copying sources

configuring building and installing multiple times is very complicated
and also tends to slow down due to repeated configures. Upstream since
2002 (!!!) has supported configuring and building for multiple python
versions in a single `./configure && make`

It is unclear why the copy+configure route was ever taken.

Acked-by: Ben Kohler <bkohler <AT> gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 dev-libs/newt/newt-0.52.25.ebuild | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/dev-libs/newt/newt-0.52.25.ebuild 
b/dev-libs/newt/newt-0.52.25.ebuild
index a6855be8aa13..74ea42133082 100644
--- a/dev-libs/newt/newt-0.52.25.ebuild
+++ b/dev-libs/newt/newt-0.52.25.ebuild
@@ -59,34 +59,28 @@ src_prepare() {
 
        default
        eautoreconf
-
-       # can't build out-of-source
-       python_copy_sources
 }
 
 src_configure() {
-       configuring() {
-               econf \
-                       --with-python="${EPYTHON}" \
-                       $(use_with gpm gpm-support) \
-                       $(use_with tcl) \
-                       $(use_enable nls)
+       local versions=
+       getversions() {
+               versions+="${EPYTHON} "
        }
-       python_foreach_impl run_in_build_dir configuring
-}
+       python_foreach_impl getversions
 
-src_compile() {
-       python_foreach_impl run_in_build_dir emake
+       econf \
+               --with-python="${versions}" \
+               $(use_with gpm gpm-support) \
+               $(use_with tcl) \
+               $(use_enable nls)
 }
 
 src_install() {
-       installit() {
-               emake \
-                       DESTDIR="${D}" \
-                       install
-               python_optimize
-       }
-       python_foreach_impl run_in_build_dir installit
+       emake \
+               DESTDIR="${D}" \
+               install
+       python_foreach_impl python_optimize
+
        dodoc peanuts.py popcorn.py tutorial.sgml
        doman whiptail.1
        einstalldocs

Reply via email to