From 4351384262ed4ed1b6a5897a31e4efae8b93f7f3 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 11 Dec 2021 05:01:13 +0000 Subject: net-analyzer/dhcp_probe: respect AR Closes: https://bugs.gentoo.org/724858 Signed-off-by: Sam James --- net-analyzer/dhcp_probe/dhcp_probe-1.3.1.ebuild | 33 +++++++++++++--------- .../files/dhcp_probe-1.3.1-fix-configure-CPP.patch | 26 +++++++++++++++++ .../files/dhcp_probe-1.3.1-respect-AR.patch | 10 +++++++ 3 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-fix-configure-CPP.patch create mode 100644 net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-respect-AR.patch (limited to 'net-analyzer/dhcp_probe') diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.1.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.1.ebuild index 33f54daa1e57..7ee68b0c9623 100644 --- a/net-analyzer/dhcp_probe/dhcp_probe-1.3.1.ebuild +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit flag-o-matic +inherit autotools flag-o-matic DESCRIPTION="Discover DHCP and BootP servers on a directly-attached Ethernet network" HOMEPAGE="https://www.net.princeton.edu/software/dhcp_probe/" @@ -26,19 +26,24 @@ DOCS=( extras/dhcp_probe.cf.sample ) -#PATCHES=( -# "${FILESDIR}"/${PV}/01_dhcp_probe.5.patch -# "${FILESDIR}"/${PV}/02_dhcp_probe.8.patch -# "${FILESDIR}"/${PV}/03_implicit_point_conv_bootp.c.patch -# "${FILESDIR}"/${PV}/04_linux_32_or_64bits.patch -# "${FILESDIR}"/${PV}/05-cleanup.patch -# "${FILESDIR}"/${PV}/06-return.patch -# "${FILESDIR}"/${PV}/07-comment.patch -# "${FILESDIR}"/${PV}/08-man8.patch -#) +PATCHES=( + "${FILESDIR}"/${PN}-1.3.1-respect-AR.patch + "${FILESDIR}"/${PN}-1.3.1-fix-configure-CPP.patch +) + +src_prepare() { + default + + # for AR patch + eautoreconf +} src_configure() { - use amd64 && append-flags -D__ARCH__=64 + # configure uses CPP + tc-export CPP + + use amd64 && append-cppflags -D__ARCH__=64 + STRIP=true econf } @@ -47,6 +52,6 @@ src_install() { dodoc "${FILESDIR}"/${PN}_mail - newinitd "${FILESDIR}/${PN}.initd" ${PN} - newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} } diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-fix-configure-CPP.patch b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-fix-configure-CPP.patch new file mode 100644 index 000000000000..fa32f0f73164 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-fix-configure-CPP.patch @@ -0,0 +1,26 @@ +Before this patch, with CPP exported: +``` +checking for inet_aton function prototype in arpa/inet.h... ./configure: 6386: CPP: not found +checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E +./configure: 6512: ac_fn_c_try_cpp: not found +./configure: 6512: ac_fn_c_try_cpp: not found +configure: error: in `/var/tmp/portage/net-analyzer/dhcp_probe-1.3.1/work/dhcp_probe-1.3.1': +configure: error: C preprocessor "x86_64-pc-linux-gnu-gcc -E" fails sanity check +See `config.log' for more details +``` + +... and unexported: +``` +checking for inet_aton function prototype in arpa/inet.h... ./configure: 6386: CPP: not found +[... continues without dying ...] +``` +--- a/configure.ac ++++ b/configure.ac +@@ -16,6 +16,7 @@ dnl Checks for programs. + AC_PROG_CC + AC_PROG_RANLIB + AM_PROG_AR ++AC_PROG_CPP + + dnl ########################################################################## + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-respect-AR.patch b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-respect-AR.patch new file mode 100644 index 000000000000..da32b63718ac --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe-1.3.1-respect-AR.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,7 @@ dnl ########################################################################## + dnl Checks for programs. + AC_PROG_CC + AC_PROG_RANLIB ++AM_PROG_AR + + dnl ########################################################################## + -- cgit v1.2.3-65-gdbad