patches/ltrace/0.5.3/100-allow-cross-compile.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:28:10 2011 +0200 (2011-08-02)
changeset 2590 b64cfb67944e
permissions -rw-r--r--
scripts/functions: svn retrieval first tries the mirror for tarballs

The svn download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via svn.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard svn retrieval will kick in.

Reported-by: ANDY KENNEDY <ANDY.KENNEDY@adtran.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
jocke@1685
     1
This patch is courtesy of OpenEmbedded, by Khem Raj <raj.khem@gmail.com>
jocke@1685
     2
jocke@1685
     3
http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b85b779688f0abc389e3c25d06b54de8b86385c1
jocke@1685
     4
jocke@1685
     5
Index: ltrace-0.5.3/common.h
jocke@1685
     6
===================================================================
jocke@1685
     7
--- ltrace-0.5.3.orig/common.h	2009-10-23 23:13:45.700282578 -0700
jocke@1685
     8
+++ ltrace-0.5.3/common.h	2009-10-23 23:14:13.550371553 -0700
jocke@1685
     9
@@ -1,3 +1,5 @@
jocke@1685
    10
+#ifndef COMMON_H
jocke@1685
    11
+#define COMMON_H
jocke@1685
    12
 #include <sys/types.h>
jocke@1685
    13
 #include <sys/time.h>
jocke@1685
    14
 #include <stdio.h>
jocke@1685
    15
@@ -251,3 +253,5 @@ extern void * sym2addr(Process *, struct
jocke@1685
    16
 #if 0				/* not yet */
jocke@1685
    17
 extern int umoven(Process * proc, void * addr, int len, void * laddr);
jocke@1685
    18
 #endif
jocke@1685
    19
+#endif
jocke@1685
    20
+
jocke@1685
    21
Index: ltrace-0.5.3/configure
jocke@1685
    22
===================================================================
jocke@1685
    23
--- ltrace-0.5.3.orig/configure	2009-10-23 23:13:45.630316494 -0700
jocke@1685
    24
+++ ltrace-0.5.3/configure	2009-10-23 23:13:59.672869527 -0700
jocke@1685
    25
@@ -30,7 +30,7 @@ int main () {
jocke@1685
    26
   return cplus_demangle();
jocke@1685
    27
 }
jocke@1685
    28
 EOF
jocke@1685
    29
-if gcc conftest.c -liberty 2>/dev/null
jocke@1685
    30
+if $CC conftest.c -liberty 2>/dev/null
jocke@1685
    31
 then
jocke@1685
    32
   HAVE_LIBIBERTY=1
jocke@1685
    33
   echo "yes"
jocke@1685
    34
@@ -48,7 +48,7 @@ int main () {
jocke@1685
    35
   return __cxa_demangle();
jocke@1685
    36
 }
jocke@1685
    37
 EOF
jocke@1685
    38
-if gcc conftest.c -lsupc++ 2>/dev/null
jocke@1685
    39
+if $CC conftest.c -lsupc++ 2>/dev/null
jocke@1685
    40
 then
jocke@1685
    41
   HAVE_LIBSUPC__=1
jocke@1685
    42
   echo "yes"
jocke@1685
    43
@@ -67,7 +67,7 @@ int main () {
jocke@1685
    44
   return 0;
jocke@1685
    45
 }
jocke@1685
    46
 EOF
jocke@1685
    47
-if gcc conftest.c 2>/dev/null
jocke@1685
    48
+if $CC conftest.c 2>/dev/null
jocke@1685
    49
 then
jocke@1685
    50
   HAVE_ELF_C_READ_MMAP=1
jocke@1685
    51
   echo "yes"
jocke@1685
    52
@@ -77,15 +77,12 @@ else
jocke@1685
    53
 fi
jocke@1685
    54
 rm -f conftest.c a.out
jocke@1685
    55
 
jocke@1685
    56
-CC=gcc
jocke@1685
    57
-CPPFLAGS=' -I /usr/include/libelf'
jocke@1685
    58
 CFLAGS='-g -O2'
jocke@1685
    59
 LIBS='-lelf -lsupc++ -liberty '
jocke@1685
    60
-INSTALL='/usr/bin/install -c'
jocke@1685
    61
+INSTALL='install -c'
jocke@1685
    62
 iquote='-iquote '
jocke@1685
    63
 iquoteend=''
jocke@1685
    64
 
jocke@1685
    65
-prefix=/usr/local
jocke@1685
    66
 sysconfdir='${prefix}/etc'
jocke@1685
    67
 bindir='${prefix}/bin'
jocke@1685
    68
 mandir='${prefix}/share/man'
jocke@1685
    69
Index: ltrace-0.5.3/debug.h
jocke@1685
    70
===================================================================
jocke@1685
    71
--- ltrace-0.5.3.orig/debug.h	2009-10-23 23:13:45.670276809 -0700
jocke@1685
    72
+++ ltrace-0.5.3/debug.h	2009-10-23 23:14:26.440319785 -0700
jocke@1685
    73
@@ -1,3 +1,5 @@
jocke@1685
    74
+#ifndef DEBUG_H
jocke@1685
    75
+#define DEBUG_H
jocke@1685
    76
 #include <features.h>
jocke@1685
    77
 
jocke@1685
    78
 /* debug levels:
jocke@1685
    79
@@ -14,4 +16,4 @@ void debug_(int level, const char *file,
jocke@1685
    80
 int xinfdump(long, void *, int);
jocke@1685
    81
 
jocke@1685
    82
 # define debug(level, expr...) debug_(level, __FILE__, __LINE__, expr)
jocke@1685
    83
-
jocke@1685
    84
+#endif