From 2b890f3a604f2391f4ebd936ce16ccc07459fa05 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Thu, 17 Jul 2014 19:46:58 +0000 Subject: Fix cross-compiling (bug #373865 by Bertrand Jacquin). (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A792A613) --- net-analyzer/tcptraceroute/ChangeLog | 7 ++- ...traceroute-1.5_beta7-cross-compile-checks.patch | 62 ++++++++++++++++++++++ .../tcptraceroute-1.5_beta7-r2.ebuild | 8 ++- 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch (limited to 'net-analyzer') diff --git a/net-analyzer/tcptraceroute/ChangeLog b/net-analyzer/tcptraceroute/ChangeLog index b49e68802a5a..94085e53f976 100644 --- a/net-analyzer/tcptraceroute/ChangeLog +++ b/net-analyzer/tcptraceroute/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-analyzer/tcptraceroute # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcptraceroute/ChangeLog,v 1.54 2014/03/08 17:34:50 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcptraceroute/ChangeLog,v 1.55 2014/07/17 19:46:58 jer Exp $ + + 17 Jul 2014; Jeroen Roovers + tcptraceroute-1.5_beta7-r2.ebuild, + +files/tcptraceroute-1.5_beta7-cross-compile-checks.patch: + Fix cross-compiling (bug #373865 by Bertrand Jacquin). *tcptraceroute-1.5_beta7-r2 (08 Mar 2014) diff --git a/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch new file mode 100644 index 000000000000..469f57d4add7 --- /dev/null +++ b/net-analyzer/tcptraceroute/files/tcptraceroute-1.5_beta7-cross-compile-checks.patch @@ -0,0 +1,62 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -148,11 +148,9 @@ + + # Is this Solaris? + AC_MSG_CHECKING(for Solaris) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__SVR4) && defined (__sun) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! ( defined (__SVR4) && defined (__sun) ) ++#error "Not Solaris" + #endif + ]) + ],[ +@@ -165,11 +163,9 @@ + + # Is this BSDI? + AC_MSG_CHECKING(for BSDI) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__bsdi__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! defined (__bsdi__) ++#error "Not BSDI" + #endif + ]) + ],[ +@@ -182,11 +178,9 @@ + + # Is this NetBSD? + AC_MSG_CHECKING(for NetBSD) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__NetBSD__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! defined (__NetBSD__) ++#error "Not NetBSD"; + #endif + ]) + ],[ +@@ -199,11 +193,9 @@ + + # Is this MacOS X? + AC_MSG_CHECKING(for MacOS X) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( [], [ +-#if defined (__APPLE__) && defined (__MACH__) +- exit(0); +-#else +- exit(-1); ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [], [ ++#if ! ( defined (__APPLE__) && defined (__MACH__) ) ++#error "Not Mac OS X" + #endif + ]) + ],[ diff --git a/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild index 07979f1b397e..0fd31f000438 100644 --- a/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild +++ b/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild @@ -1,8 +1,9 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild,v 1.1 2014/03/08 17:34:50 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcptraceroute/tcptraceroute-1.5_beta7-r2.ebuild,v 1.2 2014/07/17 19:46:58 jer Exp $ EAPI=5 +inherit autotools eutils MY_P=${P/_beta/beta} @@ -25,6 +26,11 @@ RESTRICT="test" S=${WORKDIR}/${PN}-${MY_P} +src_prepare() { + epatch "${FILESDIR}"/${P}-cross-compile-checks.patch + eautoreconf +} + src_install() { dosbin tcptraceroute fowners root:wheel /usr/sbin/tcptraceroute -- cgit v1.2.3-65-gdbad