1 |
commit: 35e18c7bc896c0a0a8b2a6267874f3f65cab147b |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 29 06:50:33 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 07:10:39 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35e18c7b |
7 |
|
8 |
net-misc/pcapfix: fully respect CFLAGS |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../files/pcapfix-1.1.7-respect-CFLAGS.patch | 21 +++++++++++++++++++++ |
13 |
net-misc/pcapfix/pcapfix-1.1.7.ebuild | 7 +++++-- |
14 |
2 files changed, 26 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch b/net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..a80419b1a87b |
19 |
--- /dev/null |
20 |
+++ b/net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch |
21 |
@@ -0,0 +1,21 @@ |
22 |
+https://github.com/Rup0rt/pcapfix/pull/27 |
23 |
+ |
24 |
+From: Sam James <sam@g.o> |
25 |
+Date: Wed, 29 Dec 2021 06:48:09 +0000 |
26 |
+Subject: [PATCH] build: respect CFLAGS |
27 |
+ |
28 |
+Allow overriding in the environment by using our value |
29 |
+as just a default. |
30 |
+ |
31 |
+Signed-off-by: Sam James <sam@g.o> |
32 |
+--- a/Makefile |
33 |
++++ b/Makefile |
34 |
+@@ -6,7 +6,7 @@ MANDIR ?= $(PREFIX)/share/man |
35 |
+ OPTFLAGS = $(shell getconf LFS_CFLAGS) -D_FORTIFY_SOURCE=2 -O2 -fstack-protector --param=ssp-buffer-size=4 |
36 |
+ WARNFLAGS = -Wall -Wextra -std=gnu99 -pedantic -Wformat -Werror=format-security |
37 |
+ DEBUGFLAGS = -g |
38 |
+-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) |
39 |
++CFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) |
40 |
+ |
41 |
+ # Determine extra LDFLAGS |
42 |
+ OS := $(shell uname) |
43 |
|
44 |
diff --git a/net-misc/pcapfix/pcapfix-1.1.7.ebuild b/net-misc/pcapfix/pcapfix-1.1.7.ebuild |
45 |
index dd1060063ecc..71f00b4ceb75 100644 |
46 |
--- a/net-misc/pcapfix/pcapfix-1.1.7.ebuild |
47 |
+++ b/net-misc/pcapfix/pcapfix-1.1.7.ebuild |
48 |
@@ -3,7 +3,7 @@ |
49 |
|
50 |
EAPI=7 |
51 |
|
52 |
-inherit toolchain-funcs |
53 |
+inherit flag-o-matic toolchain-funcs |
54 |
|
55 |
DESCRIPTION="Repair and fix broken pcap files" |
56 |
HOMEPAGE="https://f00l.de/pcapfix/" |
57 |
@@ -18,17 +18,20 @@ IUSE="debug" |
58 |
DOCS=( Changelog README ) |
59 |
|
60 |
PATCHES=( |
61 |
+ "${FILESDIR}"/${PN}-1.1.7-respect-CFLAGS.patch |
62 |
"${WORKDIR}"/${PN}-1.1.7-musl-stdint.patch |
63 |
) |
64 |
|
65 |
src_prepare() { |
66 |
default |
67 |
- sed -e 's/gcc/$(CC) $(CFLAGS)/g' -i Makefile || die |
68 |
+ |
69 |
use debug || sed -e 's/DEBUGFLAGS = -g/DEBUGFLAGS =/g' -i Makefile || die |
70 |
} |
71 |
|
72 |
src_configure() { |
73 |
tc-export CC |
74 |
+ |
75 |
+ append-lfs-flags |
76 |
} |
77 |
|
78 |
src_install() { |