From 35e18c7bc896c0a0a8b2a6267874f3f65cab147b Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 29 Dec 2021 06:50:33 +0000 Subject: net-misc/pcapfix: fully respect CFLAGS Signed-off-by: Sam James --- .../files/pcapfix-1.1.7-respect-CFLAGS.patch | 21 +++++++++++++++++++++ net-misc/pcapfix/pcapfix-1.1.7.ebuild | 7 +++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch (limited to 'net-misc/pcapfix') 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 new file mode 100644 index 000000000000..a80419b1a87b --- /dev/null +++ b/net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch @@ -0,0 +1,21 @@ +https://github.com/Rup0rt/pcapfix/pull/27 + +From: Sam James +Date: Wed, 29 Dec 2021 06:48:09 +0000 +Subject: [PATCH] build: respect CFLAGS + +Allow overriding in the environment by using our value +as just a default. + +Signed-off-by: Sam James +--- a/Makefile ++++ b/Makefile +@@ -6,7 +6,7 @@ MANDIR ?= $(PREFIX)/share/man + OPTFLAGS = $(shell getconf LFS_CFLAGS) -D_FORTIFY_SOURCE=2 -O2 -fstack-protector --param=ssp-buffer-size=4 + WARNFLAGS = -Wall -Wextra -std=gnu99 -pedantic -Wformat -Werror=format-security + DEBUGFLAGS = -g +-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) ++CFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) + + # Determine extra LDFLAGS + OS := $(shell uname) diff --git a/net-misc/pcapfix/pcapfix-1.1.7.ebuild b/net-misc/pcapfix/pcapfix-1.1.7.ebuild index dd1060063ecc..71f00b4ceb75 100644 --- a/net-misc/pcapfix/pcapfix-1.1.7.ebuild +++ b/net-misc/pcapfix/pcapfix-1.1.7.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit toolchain-funcs +inherit flag-o-matic toolchain-funcs DESCRIPTION="Repair and fix broken pcap files" HOMEPAGE="https://f00l.de/pcapfix/" @@ -18,17 +18,20 @@ IUSE="debug" DOCS=( Changelog README ) PATCHES=( + "${FILESDIR}"/${PN}-1.1.7-respect-CFLAGS.patch "${WORKDIR}"/${PN}-1.1.7-musl-stdint.patch ) src_prepare() { default - sed -e 's/gcc/$(CC) $(CFLAGS)/g' -i Makefile || die + use debug || sed -e 's/DEBUGFLAGS = -g/DEBUGFLAGS =/g' -i Makefile || die } src_configure() { tc-export CC + + append-lfs-flags } src_install() { -- cgit v1.2.3-65-gdbad