scripts/build/debug/400-ltrace.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Aug 30 00:57:40 2009 +0200 (2009-08-30)
changeset 1495 2542421e3321
parent 1147 86930cd9340a
child 1678 ac247da318a1
permissions -rw-r--r--
tools wrapper: introduce the silent WRAPPER_NEEDED config option

Add the WRAPPER_NEEDED silent config option, that can be selected by
components that require it (companion libs so far).
Rely on this config option when deciding to install the wrapper,
instead of checking GMP/MPFR or PPL/CLoog/MPC.
     1 # Build script for ltrace
     2 
     3 do_debug_ltrace_get() {
     4     CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" {ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
     5     # Create a link so that the following steps are easier to do:
     6     cd "${CT_TARBALLS_DIR}"
     7     ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
     8     ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
     9 }
    10 
    11 do_debug_ltrace_extract() {
    12     CT_Extract "ltrace-${CT_LTRACE_VERSION}"
    13     CT_Patch "ltrace-${CT_LTRACE_VERSION}"
    14     # ltrace uses ppc instead of powerpc for the arch name
    15     # create a symlink to get it to build for powerpc
    16     CT_Pushd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/sysdeps/linux-gnu"
    17     CT_DoExecLog ALL ln -sf ppc powerpc
    18     CT_Popd
    19 }
    20 
    21 do_debug_ltrace_build() {
    22     CT_DoStep INFO "Installing ltrace"
    23     mkdir -p "${CT_BUILD_DIR}/build-ltrace"
    24     CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
    25 
    26     CT_DoLog EXTRA "Copying sources to build dir"
    27     (cd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}"; tar cf - .)| tar xvf - |CT_DoLog ALL
    28 
    29     CT_DoLog EXTRA "Configuring ltrace"
    30     CT_DoExecLog ALL        \
    31     ./configure             \
    32         --build=${CT_BUILD} \
    33         --host=${CT_TARGET} \
    34         --prefix=/usr
    35 
    36     CT_DoLog EXTRA "Building ltrace"
    37     CT_DoExecLog ALL make
    38 
    39     CT_DoLog EXTRA "Installing ltrace"
    40     CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
    41 
    42     CT_Popd
    43     CT_EndStep
    44 }
    45