Get rid of CT_LIBC_FILE, remove useless CT_MakeAbsolutePath.
CT_LIBC_FILE:
- that one was not easy, as it had sneaked into CT_ExtractAndPatch
- which in turn made CT_ExtractAndPatch have references to C library addons
- which in turn relieved the C library _extract functions from doing their own job
- which in turn imposed some nasty tricks in CT_ExtractAndPatch
- which in turn made life easier for the DUMA _get and _extract functions
- which unveiled some bizare behavior for pushd and popd:
- if using smthg ike: 'pushd foo |bar':
- the directory is *neither* changed
- *nor* is it pushed onto the stack
- which made popd fail
CT_MakeAbsolutePath:
- used only to make CT_LOCAL_TARBALLS_DIR canonical
- which is ((almost) useless:
- hopefully, the user entered a full path already
- if it's not the case, too bad...
/trunk/scripts/build/debug/200-duma.sh | 5 1 4 0 +--
/trunk/scripts/build/libc/glibc.sh | 61 32 29 0 +++++++++++++++++---------------
/trunk/scripts/build/libc/uClibc.sh | 16 10 6 0 +++++---
/trunk/scripts/build/libc/eglibc.sh | 48 26 22 0 ++++++++++++++-----------
/trunk/scripts/crosstool.sh | 8 0 8 0 ----
/trunk/scripts/functions | 77 15 62 0 ++++++++--------------------------------
6 files changed, 84 insertions(+), 131 deletions(-)
1 # Build script for D.U.M.A.
4 CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/
5 # D.U.M.A. doesn't separate its name from its version with a dash,
6 # but with an underscore. Create a link so that crosstool-NG can
8 CT_Pushd "${CT_TARBALLS_DIR}"
9 duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}")
10 rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
11 ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
12 # Downloading from sourceforge leaves garbage, cleanup
13 rm -f showfiles.php\?group_id\=*
17 do_debug_duma_extract() {
18 CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}"
21 do_debug_duma_build() {
22 CT_DoStep INFO "Installing D.U.M.A."
23 CT_DoLog EXTRA "Copying sources"
24 cp -a "${CT_SRC_DIR}/duma-${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma"
25 CT_Pushd "${CT_BUILD_DIR}/build-duma"
28 [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1
30 # The shared library needs some love: some version have libduma.so.0.0,
31 # while others have libduma.so.0.0.0
32 duma_so=$(make -n -p 2>&1 |egrep '^libduma.so[^:]*:' |head -n 1 |cut -d : -f 1)
35 [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a"
36 [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} ${duma_so}"
38 CT_DoLog EXTRA "Building libraries '${libs}'"
40 make HOSTCC="${CT_BUILD}-gcc" \
41 CC="${CT_TARGET}-gcc" \
42 CXX="${CT_TARGET}-gcc" \
43 RANLIB="${CT_TARGET}-ranlib" \
44 DUMA_CPP="${DUMA_CPP}" \
46 CT_DoLog EXTRA "Installing libraries '${libs}'"
47 CT_DoExecLog ALL install -m 644 ${libs} "${CT_SYSROOT_DIR}/usr/lib"
48 if [ "${CT_DUMA_SO}" = "y" ]; then
49 CT_DoLog EXTRA "Installing shared library link"
50 ln -vsf ${duma_so} "${CT_SYSROOT_DIR}/usr/lib/libduma.so" 2>&1 |CT_DoLog ALL
51 CT_DoLog EXTRA "Installing wrapper script"
52 mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin"
53 # Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
54 sed -r -e 's:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/'"${duma_so}"':;' \
55 "${CT_LIB_DIR}/scripts/build/debug/duma.in" \
56 >"${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"
57 chmod 755 "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma"