summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-11 00:17:41 +0000
committerSam James <sam@gentoo.org>2021-06-11 00:29:09 +0000
commit1241beb6e5725096b6a27987b23bc1a4fc45cb40 (patch)
treeeb078d0db9d1ff665e2e8be21d0ebeb7bc64391c
parentsys-apps/heirloom-tools: fix VariableScope (ED) in src_compile (diff)
downloadgentoo-1241beb6e5725096b6a27987b23bc1a4fc45cb40.tar.gz
gentoo-1241beb6e5725096b6a27987b23bc1a4fc45cb40.tar.bz2
gentoo-1241beb6e5725096b6a27987b23bc1a4fc45cb40.zip
sys-apps/grepcidr: port to EAPI 7
* Fix VariableScope (EROOT) * Respect CPPFLAGS, LDFLAGS Closes: https://bugs.gentoo.org/725602 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-apps/grepcidr/files/grepcidr-2.0-Makefile.patch12
-rw-r--r--sys-apps/grepcidr/grepcidr-2.0.ebuild18
2 files changed, 23 insertions, 7 deletions
diff --git a/sys-apps/grepcidr/files/grepcidr-2.0-Makefile.patch b/sys-apps/grepcidr/files/grepcidr-2.0-Makefile.patch
new file mode 100644
index 000000000000..e9eb0a39113a
--- /dev/null
+++ b/sys-apps/grepcidr/files/grepcidr-2.0-Makefile.patch
@@ -0,0 +1,12 @@
+Respect CPPFLAGS, LDFLAGS>
+--- a/Makefile
++++ b/Makefile
+@@ -15,7 +15,7 @@ LDFLAGS=
+ all: grepcidr
+
+ grepcidr: grepcidr.o
+- $(CC) $(CFLAGS) grepcidr.o -o grepcidr
++ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) grepcidr.o -o grepcidr
+
+ doc: grepcidr.1
+
diff --git a/sys-apps/grepcidr/grepcidr-2.0.ebuild b/sys-apps/grepcidr/grepcidr-2.0.ebuild
index 77b3863961fd..4b99fd34edbb 100644
--- a/sys-apps/grepcidr/grepcidr-2.0.ebuild
+++ b/sys-apps/grepcidr/grepcidr-2.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
inherit toolchain-funcs
@@ -12,17 +12,21 @@ SRC_URI="http://www.pc-tools.net/files/unix/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
-DEPEND=""
-RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0-Makefile.patch
+)
src_compile() {
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ CPPFLAGS="${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
}
src_install() {
- emake DESTDIR="${D}" PREFIX="${EROOT}/usr" install
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
dodoc README ChangeLog
}