commit:     bc42a3e1c3bd8b861936c63593fbbd525856a877
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  8 07:51:50 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  8 07:51:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc42a3e1

sci-libs/scotch: fix toolchain sed for e.g. arm

Closes: https://bugs.gentoo.org/577272
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/scotch/scotch-6.0.4-r2.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sci-libs/scotch/scotch-6.0.4-r2.ebuild 
b/sci-libs/scotch/scotch-6.0.4-r2.ebuild
index 8af0ccfe611..4a01b91e5ca 100644
--- a/sci-libs/scotch/scotch-6.0.4-r2.ebuild
+++ b/sci-libs/scotch/scotch-6.0.4-r2.ebuild
@@ -64,10 +64,12 @@ src_prepare() {
                        -e 's/ -DSCOTCH_PTHREAD//' \
                        src/Make.inc/Makefile.inc.i686_pc_linux3 || die
        fi
-       sed -e "s/gcc/$(tc-getCC)/" \
+
+       # Be careful with replacing here, bug #577272
+       sed -e "s/= gcc$/= $(tc-getCC)/" \
                -e "s/-O3/${CFLAGS} -pthread/" \
-               -e "s/ ar/ $(tc-getAR)/" \
-               -e "s/ranlib/$(tc-getRANLIB)/" \
+               -e "s/= ar$/= $(tc-getAR)/" \
+               -e "s/= ranlib$/= $(tc-getRANLIB)/" \
                -e "s/LDFLAGS/LIBS/" \
                src/Make.inc/Makefile.inc.i686_pc_linux3 > src/Makefile.inc || 
die
 }

Reply via email to