commit:     986be7e739caf0134614da3d1d647ae92c473a3b
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 10:22:55 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun May 10 10:24:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=986be7e7

app-editors/e3: Call tc-getLD to determine the ld program.

Closes: https://bugs.gentoo.org/722050
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/e3/e3-2.8.2.ebuild               | 12 ++++------
 app-editors/e3/files/e3-2.8.2-makefile.patch | 36 ++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/app-editors/e3/e3-2.8.2.ebuild b/app-editors/e3/e3-2.8.2.ebuild
index 4d675fa1428..41f1d83154d 100644
--- a/app-editors/e3/e3-2.8.2.ebuild
+++ b/app-editors/e3/e3-2.8.2.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+inherit toolchain-funcs
+
 MY_P="${PN}-$(ver_rs 2 '')"
 DESCRIPTION="Very tiny editor in ASM with emacs, pico, wordstar, and vi 
keybindings"
 HOMEPAGE="https://sites.google.com/site/e3editor/";
@@ -16,14 +18,10 @@ RESTRICT="strip"
 BDEPEND=">=dev-lang/nasm-2.09.04"
 
 S="${WORKDIR}/${MY_P}"
-
-src_prepare() {
-       sed -i 's/-D$(EXMODE)//' Makefile || die
-       eapply_user
-}
+PATCHES=("${FILESDIR}"/${P}-makefile.patch)
 
 src_compile() {
-       emake -- $(usex amd64 64 32)
+       emake -- $(usex amd64 64 32) LD="$(tc-getLD)"
 }
 
 src_install() {

diff --git a/app-editors/e3/files/e3-2.8.2-makefile.patch 
b/app-editors/e3/files/e3-2.8.2-makefile.patch
new file mode 100644
index 00000000000..5a22ff67e09
--- /dev/null
+++ b/app-editors/e3/files/e3-2.8.2-makefile.patch
@@ -0,0 +1,36 @@
+--- e3-2.82-orig/Makefile
++++ e3-2.82/Makefile
+@@ -17,6 +17,8 @@
+ NASM_OR_YASM=nasm
+ #NASM_OR_YASM=yasm
+ 
++LD=ld
++
+ EXMODE=SED
+ 
+ #----------------------do not edit below line-------------------------------
+@@ -41,12 +43,12 @@
+ 
+ 32:   $(ASOURCES) Makefile
+ ifeq  ($(OS),LINUX)
+-      nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS) 
-D$(EXMODE) 
++      nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS)
+       chmod +x e3
+ else
+       echo $(ASVER)
+-      nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
+-      ld -s -o e3 e3.o
++      nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS)
++      $(LD) -s -o e3 e3.o
+       strip --remove-section .comment e3
+ endif
+       ln -sf e3 e3ws
+@@ -60,7 +62,7 @@
+ 64:   $(ASOURCES) Makefile
+       cat e3.asm | sed -f e3_32to64.sed  >e3.tmp
+       $(ASSEMBLER64)
+-      ld -b elf64-x86-64 --oformat elf64-x86-64 -o e3 e3.o
++      $(LD) -b elf64-x86-64 --oformat elf64-x86-64 -o e3 e3.o
+ ifneq ($(DEBUG),true)
+       strip e3
+ endif

Reply via email to