Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/statifier/files/, dev-util/statifier/
Date: Thu, 29 Nov 2018 21:36:24
Message-Id: 1543527364.461a0284d5e3d05988b20e43411c93330d41ee67.soap@gentoo
1 commit: 461a0284d5e3d05988b20e43411c93330d41ee67
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 29 21:35:12 2018 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 29 21:36:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=461a0284
7
8 dev-util/statifier: [QA] Honour CC flags
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: David Seifert <soap <AT> gentoo.org>
12
13 .../files/statifier-1.7.4-fix-build-system.patch | 48 ++++++++++++++++++++++
14 dev-util/statifier/statifier-1.7.4.ebuild | 17 ++++----
15 2 files changed, 58 insertions(+), 7 deletions(-)
16
17 diff --git a/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch b/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch
18 new file mode 100644
19 index 00000000000..ef8c6a516bd
20 --- /dev/null
21 +++ b/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch
22 @@ -0,0 +1,48 @@
23 +Honour user flags and CC
24 +
25 +--- a/src/Makefile
26 ++++ b/src/Makefile
27 +@@ -170,7 +170,7 @@
28 + echo "VERSION='$(VERSION)'" > $@ || { $(RM) $@; exit 1; }
29 +
30 + $(UTILS_WITH_ELF_CLASS): $(ELF_CLASS)/%: %.c
31 +- gcc $(FLAGS_ELF) -I$(CPU_DIR) -Wall -O2 -g $< -o $@
32 ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) -I$(CPU_DIR) -g $< -o $@
33 +
34 + MY_GDB_CFILES := \
35 + breakpoints.c \
36 +@@ -187,13 +187,13 @@
37 +
38 + MY_GDB_CPPFLAGS := -I. -I$(CPU_DIR) -I$(ELF_CLASS)
39 + $(MY_GDB_OBJ_FILES): $(ELF_CLASS)/%.o: my_gdb/%.c
40 +- gcc -c $(FLAGS_ELF) $(MY_GDB_CPPFLAGS) -Wall -O2 -g $< -o $@
41 ++ $(CC) $(CPPFLAGS) $(CFLAGS) -c $(FLAGS_ELF) $(MY_GDB_CPPFLAGS) -g $< -o $@
42 +
43 + $(ELF_CLASS)/my_gdb: $(MY_GDB_OBJ_FILES)
44 +- gcc $(FLAGS_ELF) $^ -o $@
45 ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) $^ -o $@
46 +
47 + $(ELF_CLASS)/dl-var.s: dl-var.c dl-var.inc
48 +- gcc $(FLAGS_ELF) $(FLAGS_C_TO_ASM_ELF) -Wall -O2 -S $< -o $@.s
49 ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) $(FLAGS_C_TO_ASM_ELF) -S $< -o $@.s
50 + /bin/sh asm.make.sh < $@.s > $@ || { $(RM) $@; exit 1; }
51 +
52 + # Dependencies should be in correct order
53 +@@ -210,7 +210,7 @@
54 + # Because linker give warning about _start function I specify
55 + # pretty dummy '--entry=0x0'
56 + $(FILES_TO_BE_EMBEDDED_WITH_ELF_CLASS): $(ELF_CLASS)/%: $(ELF_CLASS)/%.o
57 +- gcc $(FLAGS_ELF) -o $@ $< -Wl,--oformat,binary,--entry=0x0 -nostdlib
58 ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(FLAGS_ELF) -o $@ $< -Wl,--oformat,binary,--entry=0x0 -nostdlib
59 +
60 + OBJECTS_TO_BE_EMBEDDED_WITH_ELF_CLASS = $(addsuffix .o,$(FILES_TO_BE_EMBEDDED_WITH_ELF_CLASS))
61 +
62 +@@ -221,7 +221,7 @@
63 + # with -include processor.h, start.S and $<
64 + #
65 + $(OBJECTS_TO_BE_EMBEDDED_WITH_ELF_CLASS): $(ELF_CLASS)/%.o: $(CPU_DIR)/%.S $(CPU_DIR)/processor.h ./start.S ./end.S
66 +- gcc $(FLAGS_ELF) -c -o $@ -nostdinc -I$(CURDIR) -I$(CURDIR)/$(ELF_CLASS) -include $(CPU_DIR)/processor.h -include ./start.S -include $< ./end.S
67 ++ $(CC) $(CPPFLAGS) $(CFLAGS) $(FLAGS_ELF) -c -o $@ -nostdinc -I$(CURDIR) -I$(CURDIR)/$(ELF_CLASS) -include $(CPU_DIR)/processor.h -include ./start.S -include $< ./end.S
68 +
69 + # Additional dependencies:
70 + $(ELF_CLASS)/regs.o: $(ELF_CLASS)/regs.inc
71
72 diff --git a/dev-util/statifier/statifier-1.7.4.ebuild b/dev-util/statifier/statifier-1.7.4.ebuild
73 index 08b4f7afec9..b4021f0a1cf 100644
74 --- a/dev-util/statifier/statifier-1.7.4.ebuild
75 +++ b/dev-util/statifier/statifier-1.7.4.ebuild
76 @@ -1,11 +1,11 @@
77 -# Copyright 1999-2018 Gentoo Foundation
78 +# Copyright 1999-2018 Gentoo Authors
79 # Distributed under the terms of the GNU General Public License v2
80
81 EAPI="6"
82
83 MULTILIB_COMPAT=( abi_x86_{32,64} )
84
85 -inherit multilib-build
86 +inherit multilib-build toolchain-funcs
87
88 DESCRIPTION="Statifier is a tool for creating portable, self-containing Linux executables"
89 HOMEPAGE="http://statifier.sourceforge.net"
90 @@ -20,20 +20,23 @@ RDEPEND="app-shells/bash
91 sys-apps/coreutils
92 virtual/awk"
93
94 -src_prepare() {
95 +PATCHES=(
96 # Respect users CFLAGS and LDFLAGS
97 - sed -i -e 's/-Wall -O2/$(CFLAGS) $(LDFLAGS)/g' src/Makefile || die
98 + "${FILESDIR}"/${PN}-1.7.4-fix-build-system.patch
99 +)
100 +
101 +src_prepare() {
102 + default
103
104 # Don't compile 32-bit on amd64 no-multilib profile
105 if ! use abi_x86_32; then
106 sed -i -e 's/ELF32 .*/ELF32 := no/g' configs/config.x86_64 || die
107 fi
108 -
109 - # Apply user patches
110 - eapply_user
111 }
112
113 src_configure() {
114 + tc-export CC
115 +
116 # Fix permissions, as configure is not marked executable
117 chmod +x configure || die
118 econf