summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-29 06:50:33 +0000
committerSam James <sam@gentoo.org>2021-12-29 07:10:39 +0000
commit35e18c7bc896c0a0a8b2a6267874f3f65cab147b (patch)
treed47e8f83ef24ff3e1825a613904bab9a8635a7d0 /net-misc/pcapfix
parentdev-ruby/spring: add 3.1.1 (diff)
downloadgentoo-35e18c7bc896c0a0a8b2a6267874f3f65cab147b.tar.gz
gentoo-35e18c7bc896c0a0a8b2a6267874f3f65cab147b.tar.bz2
gentoo-35e18c7bc896c0a0a8b2a6267874f3f65cab147b.zip
net-misc/pcapfix: fully respect CFLAGS
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/pcapfix')
-rw-r--r--net-misc/pcapfix/files/pcapfix-1.1.7-respect-CFLAGS.patch21
-rw-r--r--net-misc/pcapfix/pcapfix-1.1.7.ebuild7
2 files changed, 26 insertions, 2 deletions
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 <sam@gentoo.org>
+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 <sam@gentoo.org>
+--- 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() {