commit:     c85a2108c082e6122fec344ed997fdbdfd9a2740
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Dec 24 18:12:43 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 26 06:34:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c85a2108

dev-util/bpftool: fix sed's

Upstream commit: 4c56992b53cc125f6939a971f01d4705996f5e0f

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45151
Closes: https://github.com/gentoo/gentoo/pull/45151
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/bpftool/bpftool-7.6.0.ebuild | 5 ++++-
 dev-util/bpftool/bpftool-9999.ebuild  | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dev-util/bpftool/bpftool-7.6.0.ebuild 
b/dev-util/bpftool/bpftool-7.6.0.ebuild
index 1cbe43aa18aa..8a8995dca624 100644
--- a/dev-util/bpftool/bpftool-7.6.0.ebuild
+++ b/dev-util/bpftool/bpftool-7.6.0.ebuild
@@ -86,7 +86,10 @@ src_prepare() {
        sed -i -e 's/-Werror//g' src/Makefile.feature || die
 
        # remove hardcoded/unhelpful flags from bpftool
-       sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' 
src/Makefile || die
+       sed -e '/CFLAGS += -O2$/d' \
+               -e '/CFLAGS += -W$/d' \
+               -e '/CFLAGS += -Wextra$/d' \
+               -i src/Makefile || die
 
        # always build bpf bits with std=gnu11 for kernel compatibility (bug 
955156)
        sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die

diff --git a/dev-util/bpftool/bpftool-9999.ebuild 
b/dev-util/bpftool/bpftool-9999.ebuild
index 80e83e41a719..3f8d05a60534 100644
--- a/dev-util/bpftool/bpftool-9999.ebuild
+++ b/dev-util/bpftool/bpftool-9999.ebuild
@@ -86,7 +86,10 @@ src_prepare() {
        sed -i -e 's/-Werror//g' src/Makefile.feature || die
 
        # remove hardcoded/unhelpful flags from bpftool
-       sed -i -e '/CFLAGS += -O2/d' -e 's/-W //g' -e 's/-Wextra //g' 
src/Makefile || die
+       sed -e '/CFLAGS += -O2$/d' \
+               -e '/CFLAGS += -W$/d' \
+               -e '/CFLAGS += -Wextra$/d' \
+               -i src/Makefile || die
 
        # always build bpf bits with std=gnu11 for kernel compatibility (bug 
955156)
        sed -i 's/-fno-stack-protector/& -std=gnu11/g' src/Makefile || die

Reply via email to