scripts/build/debug/200-duma.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Oct 09 19:17:49 2008 +0000 (2008-10-09)
changeset 914 0b164a321177
parent 669 ca740b4c4262
child 916 68af6b83ff7e
permissions -rw-r--r--
Remove CT_BROKEN.
Only one component is actually BROKEN (libelf), make it depend on EXPERIMENTAL, but state BROKEN in the prompt.
ltrace (which depends on libelf) is now marked as EXPERIMENTAL, with the reference to the BROKEN libelf in the help entry.

/trunk/docs/overview.txt | 6 0 6 0 ------
/trunk/config/debug/ltrace.in | 7 4 3 0 ++++---
/trunk/config/global/ct-behave.in | 8 0 8 0 --------
/trunk/config/tools/libelf.in | 5 3 2 0 +++--
4 files changed, 7 insertions(+), 19 deletions(-)
     1 # Build script for D.U.M.A.
     2 
     3 is_enabled="${CT_DUMA}"
     4 
     5 do_print_filename() {
     6     [ "${CT_DUMA}" = "y" ] || return 0
     7     echo "duma_${CT_DUMA_VERSION}"
     8 }
     9 
    10 do_debug_duma_get() {
    11     CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/
    12     # D.U.M.A. doesn't separate its name from its version with a dash,
    13     # but with an underscore. Create a link so that crosstool-NG can
    14     # work correctly:
    15     CT_Pushd "${CT_TARBALLS_DIR}"
    16     duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}")
    17     rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
    18     ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
    19     # Downloading from sourceforge leaves garbage, cleanup
    20     rm -f showfiles.php\?group_id\=*
    21     CT_Popd
    22 }
    23 
    24 do_debug_duma_extract() {
    25     CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}"
    26     cd "${CT_SRC_DIR}"
    27     rm -f "duma-${CT_DUMA_VERSION}"
    28     ln -sf "duma_${CT_DUMA_VERSION}" "duma-${CT_DUMA_VERSION}"
    29 }
    30 
    31 do_debug_duma_build() {
    32     CT_DoStep INFO "Installing D.U.M.A."
    33     CT_DoLog EXTRA "Copying sources"
    34     cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma"
    35     CT_Pushd "${CT_BUILD_DIR}/build-duma"
    36 
    37     DUMA_CPP=
    38     [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1
    39 
    40     # The shared library needs some love: some version have libduma.so.0.0,
    41     # while others have libduma.so.0.0.0
    42     duma_so=$(make -n -p 2>&1 |egrep '^libduma.so[^:]*:' |head -n 1 |cut -d : -f 1)
    43 
    44     libs=
    45     [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
    46     [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} ${duma_so}"
    47     libs="${libs# }"
    48     CT_DoLog EXTRA "Building libraries '${libs}'"
    49     CT_DoExecLog ALL                    \
    50     make HOSTCC="${CT_CC_NATIVE}"       \
    51          HOSTCXX="${CT_CC_NATIVE}"      \
    52          CC="${CT_TARGET}-gcc"          \
    53          CXX="${CT_TARGET}-gcc"         \
    54          RANLIB="${CT_TARGET}-ranlib"   \
    55          DUMA_CPP="${DUMA_CPP}"         \
    56          ${libs}
    57     CT_DoLog EXTRA "Installing libraries '${libs}'"
    58     CT_DoExecLog ALL install -m 644 ${libs} "${CT_SYSROOT_DIR}/usr/lib"
    59     if [ "${CT_DUMA_SO}" = "y" ]; then
    60         CT_DoLog EXTRA "Installing shared library link"
    61         ln -vsf ${duma_so} "${CT_SYSROOT_DIR}/usr/lib/libduma.so"   2>&1 |CT_DoLog ALL
    62         CT_DoLog EXTRA "Installing wrapper script"
    63         mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin"
    64         # Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
    65         sed -r -e 's:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/'"${duma_so}"':;'   \
    66             "${CT_LIB_DIR}/scripts/build/debug/duma.in"                     \
    67             >"${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
    68         chmod 755 "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
    69     fi
    70 
    71     CT_Popd
    72     CT_EndStep
    73 }
    74