summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-08-22 04:03:33 +0000
committerMike Frysinger <vapier@gentoo.org>2012-08-22 04:03:33 +0000
commit354f67701078b5d9e72f49e3853da1e202a0655b (patch)
treeeb8a62491684488ff04d8a790a1bb62438b200cd /sys-process/lsof
parentAdd live ebuild (diff)
downloadgentoo-2-354f67701078b5d9e72f49e3853da1e202a0655b.tar.gz
gentoo-2-354f67701078b5d9e72f49e3853da1e202a0655b.tar.bz2
gentoo-2-354f67701078b5d9e72f49e3853da1e202a0655b.zip
Fix cross-compiling by avoiding executing compiled configure tests #432120 by Dennis Schridde.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'sys-process/lsof')
-rw-r--r--sys-process/lsof/ChangeLog7
-rw-r--r--sys-process/lsof/files/lsof-4.85-cross.patch33
-rw-r--r--sys-process/lsof/lsof-4.85-r2.ebuild3
3 files changed, 41 insertions, 2 deletions
diff --git a/sys-process/lsof/ChangeLog b/sys-process/lsof/ChangeLog
index 3ae5f93d3183..8eb9484bd098 100644
--- a/sys-process/lsof/ChangeLog
+++ b/sys-process/lsof/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-process/lsof
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/ChangeLog,v 1.91 2012/05/28 16:22:19 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/ChangeLog,v 1.92 2012/08/22 04:03:33 vapier Exp $
+
+ 22 Aug 2012; Mike Frysinger <vapier@gentoo.org> +files/lsof-4.85-cross.patch,
+ lsof-4.85-r2.ebuild:
+ Fix cross-compiling by avoiding executing compiled configure tests #432120 by
+ Dennis Schridde.
28 May 2012; Raúl Porcel <armin76@gentoo.org> lsof-4.85-r2.ebuild:
alpha/ia64/m68k/s390/sh/sparc stable wrt #413273
diff --git a/sys-process/lsof/files/lsof-4.85-cross.patch b/sys-process/lsof/files/lsof-4.85-cross.patch
new file mode 100644
index 000000000000..186c6d8d6229
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.85-cross.patch
@@ -0,0 +1,33 @@
+let the preprocessor work its magic rather than executing the code
+
+https://bugs.gentoo.org/432120
+
+--- a/Configure
++++ b/Configure
+@@ -2730,20 +2730,17 @@ LOCKF_OWNER4
+ rm -f ${LSOF_TMPC}.*
+ cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1
+ #include <features.h>
+-main() {
++#undef XXX
+ #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+-printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__);
++XXX: __GLIBC__ * 100 + __GLIBC_MINOR__
+ #elif defined(__GLIBC__)
+-printf("-DGLIBCV=%d00\n",__GLIBC__);
+-#else
+-printf("\n");
++XXX: __GLIBC__ * 100
+ #endif
+-return(0); }
+ .LSOF_END_HERE_DOC1
+- $LINUX_CONF_CC ${LSOF_TMPC}.c -I$LSOF_INCLUDE -o ${LSOF_TMPC}.x > /dev/null 2>&1
++ $LINUX_CONF_CC ${LSOF_TMPC}.c -E -I$LSOF_INCLUDE 2>/dev/null | sed -n '/^XXX:/s|.*:||p' > ${LSOF_TMPC}.x
+- if test -x ${LSOF_TMPC}.x # {
++ if test -s ${LSOF_TMPC}.x # {
+ then
+- LINUX_CLIB=`${LSOF_TMPC}.x`
++ LINUX_CLIB="-DGLIBCV=$(( `cat ${LSOF_TMPC}.x` ))"
+ LSOF_TMP=$?
+ else
+ LINUX_CLIB=""
diff --git a/sys-process/lsof/lsof-4.85-r2.ebuild b/sys-process/lsof/lsof-4.85-r2.ebuild
index 2b65dd055093..8315e4e30ce9 100644
--- a/sys-process/lsof/lsof-4.85-r2.ebuild
+++ b/sys-process/lsof/lsof-4.85-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.9 2012/05/28 16:22:19 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.10 2012/08/22 04:03:33 vapier Exp $
EAPI="2"
@@ -32,6 +32,7 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/${P}-arg.c.patch #388555
+ epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120
# convert `test -r header.h` into a compile test
sed -i -r \
-e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \