commit:     a4ac94e6a29b969e5fe1681cf38e88084650621a
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  7 08:56:02 2021 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Thu Oct  7 08:56:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4ac94e6

sci-libs/djbfft: Fix tc-directly

Closes: https://bugs.gentoo.org/731874
Closes: https://bugs.gentoo.org/725432
Closes: https://bugs.gentoo.org/721352
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 sci-libs/djbfft/djbfft-0.76-r3.ebuild              |  2 ++
 .../djbfft/files/djbfft-0.76-tc-directly.patch     | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/sci-libs/djbfft/djbfft-0.76-r3.ebuild 
b/sci-libs/djbfft/djbfft-0.76-r3.ebuild
index a0dcc7e2d8f..eee460123e6 100644
--- a/sci-libs/djbfft/djbfft-0.76-r3.ebuild
+++ b/sci-libs/djbfft/djbfft-0.76-r3.ebuild
@@ -17,6 +17,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-gcc3.patch
        "${FILESDIR}"/${P}-shared.patch
        "${FILESDIR}"/${P}-headers.patch
+       "${FILESDIR}"/${P}-tc-directly.patch
 )
 
 DOCS=( CHANGES README TODO VERSION )
@@ -35,6 +36,7 @@ src_prepare() {
 }
 
 multilib_src_configure() {
+       tc-export AR RANLIB
        [[ ${ABI} == x86* ]] && append-cflags -malign-double
 
        sed -i -e "s:\"lib\":\"$(get_libdir)\":" hier.c || die

diff --git a/sci-libs/djbfft/files/djbfft-0.76-tc-directly.patch 
b/sci-libs/djbfft/files/djbfft-0.76-tc-directly.patch
new file mode 100644
index 00000000000..340d3b7be6a
--- /dev/null
+++ b/sci-libs/djbfft/files/djbfft-0.76-tc-directly.patch
@@ -0,0 +1,22 @@
+# https://bugs.gentoo.org/731874
+# https://bugs.gentoo.org/725432
+--- a/Makefile
++++ b/Makefile
+@@ -736,7 +736,7 @@ warn-auto.sh systype
+       echo 'rm -f "$$main"'; \
+       echo 'if [ "$${main##*.}" = "a" ]'; \
+       echo 'then'; \
+-      echo '  ar cr "$$main" $${1+"$$@"}'; \
++      echo '  $(AR) cr "$$main" $${1+"$$@"}'; \
+       case "`cat systype`" in \
+       sunos-5.*) ;; \
+       unix_sv*) ;; \
+@@ -745,7 +745,7 @@ warn-auto.sh systype
+       dgux-*) ;; \
+       hp-ux-*) ;; \
+       sco*) ;; \
+-      *) echo '  ranlib "$$main"' ;; \
++      *) echo '  $(RANLIB) "$$main"' ;; \
+       esac; \
+       echo 'else'; \
+       echo '  exec `head -1 conf-ld` -shared -Wl,-soname,libdjbfft.so.0.7.6 
-o "$$main" $${1+"$$@"}'; \

Reply via email to