Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/e3/files/, app-editors/e3/
Date: Sun, 10 May 2020 10:24:32
Message-Id: 1589106240.986be7e739caf0134614da3d1d647ae92c473a3b.ulm@gentoo
1 commit: 986be7e739caf0134614da3d1d647ae92c473a3b
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 10 10:22:55 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 10 10:24:00 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=986be7e7
7
8 app-editors/e3: Call tc-getLD to determine the ld program.
9
10 Closes: https://bugs.gentoo.org/722050
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 app-editors/e3/e3-2.8.2.ebuild | 12 ++++------
15 app-editors/e3/files/e3-2.8.2-makefile.patch | 36 ++++++++++++++++++++++++++++
16 2 files changed, 41 insertions(+), 7 deletions(-)
17
18 diff --git a/app-editors/e3/e3-2.8.2.ebuild b/app-editors/e3/e3-2.8.2.ebuild
19 index 4d675fa1428..41f1d83154d 100644
20 --- a/app-editors/e3/e3-2.8.2.ebuild
21 +++ b/app-editors/e3/e3-2.8.2.ebuild
22 @@ -1,8 +1,10 @@
23 -# Copyright 1999-2019 Gentoo Authors
24 +# Copyright 1999-2020 Gentoo Authors
25 # Distributed under the terms of the GNU General Public License v2
26
27 EAPI=7
28
29 +inherit toolchain-funcs
30 +
31 MY_P="${PN}-$(ver_rs 2 '')"
32 DESCRIPTION="Very tiny editor in ASM with emacs, pico, wordstar, and vi keybindings"
33 HOMEPAGE="https://sites.google.com/site/e3editor/"
34 @@ -16,14 +18,10 @@ RESTRICT="strip"
35 BDEPEND=">=dev-lang/nasm-2.09.04"
36
37 S="${WORKDIR}/${MY_P}"
38 -
39 -src_prepare() {
40 - sed -i 's/-D$(EXMODE)//' Makefile || die
41 - eapply_user
42 -}
43 +PATCHES=("${FILESDIR}"/${P}-makefile.patch)
44
45 src_compile() {
46 - emake -- $(usex amd64 64 32)
47 + emake -- $(usex amd64 64 32) LD="$(tc-getLD)"
48 }
49
50 src_install() {
51
52 diff --git a/app-editors/e3/files/e3-2.8.2-makefile.patch b/app-editors/e3/files/e3-2.8.2-makefile.patch
53 new file mode 100644
54 index 00000000000..5a22ff67e09
55 --- /dev/null
56 +++ b/app-editors/e3/files/e3-2.8.2-makefile.patch
57 @@ -0,0 +1,36 @@
58 +--- e3-2.82-orig/Makefile
59 ++++ e3-2.82/Makefile
60 +@@ -17,6 +17,8 @@
61 + NASM_OR_YASM=nasm
62 + #NASM_OR_YASM=yasm
63 +
64 ++LD=ld
65 ++
66 + EXMODE=SED
67 +
68 + #----------------------do not edit below line-------------------------------
69 +@@ -41,12 +43,12 @@
70 +
71 + 32: $(ASOURCES) Makefile
72 + ifeq ($(OS),LINUX)
73 +- nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS) -D$(EXMODE)
74 ++ nasm -O2 -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS)
75 + chmod +x e3
76 + else
77 + echo $(ASVER)
78 +- nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
79 +- ld -s -o e3 e3.o
80 ++ nasm -O2 $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS)
81 ++ $(LD) -s -o e3 e3.o
82 + strip --remove-section .comment e3
83 + endif
84 + ln -sf e3 e3ws
85 +@@ -60,7 +62,7 @@
86 + 64: $(ASOURCES) Makefile
87 + cat e3.asm | sed -f e3_32to64.sed >e3.tmp
88 + $(ASSEMBLER64)
89 +- ld -b elf64-x86-64 --oformat elf64-x86-64 -o e3 e3.o
90 ++ $(LD) -b elf64-x86-64 --oformat elf64-x86-64 -o e3 e3.o
91 + ifneq ($(DEBUG),true)
92 + strip e3
93 + endif