2008-06-17 22:26:44 +00:00
|
|
|
# Build script for D.U.M.A.
|
2007-07-12 08:47:15 +00:00
|
|
|
|
|
|
|
do_debug_duma_get() {
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_Fetch DUMA
|
2007-07-12 08:47:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_debug_duma_extract() {
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_ExtractPatch DUMA
|
2007-07-12 08:47:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_debug_duma_build() {
|
2017-01-30 02:54:13 +00:00
|
|
|
local -a make_args
|
|
|
|
|
2007-07-12 08:47:15 +00:00
|
|
|
CT_DoStep INFO "Installing D.U.M.A."
|
|
|
|
CT_DoLog EXTRA "Copying sources"
|
2017-05-30 05:32:38 +00:00
|
|
|
cp -a "${CT_SRC_DIR}/duma/." "${CT_BUILD_DIR}/build-duma"
|
2007-07-12 08:47:15 +00:00
|
|
|
CT_Pushd "${CT_BUILD_DIR}/build-duma"
|
|
|
|
|
2017-01-30 02:54:13 +00:00
|
|
|
make_args=(
|
|
|
|
prefix="${CT_DEBUGROOT_DIR}/usr"
|
|
|
|
HOSTCC="${CT_BUILD}-gcc"
|
2022-05-14 01:01:32 +00:00
|
|
|
CC_FOR_BUILD="${CT_BUILD}-gcc"
|
2018-05-26 06:57:29 +00:00
|
|
|
CC="${CT_TARGET}-${CT_CC} ${CT_ALL_TARGET_CFLAGS}"
|
|
|
|
CXX="${CT_TARGET}-g++ ${CT_ALL_TARGET_CFLAGS}"
|
2017-01-30 02:54:13 +00:00
|
|
|
RANLIB="${CT_TARGET}-ranlib"
|
|
|
|
OS="${CT_KERNEL}"
|
|
|
|
)
|
|
|
|
[ "${CT_CC_LANG_CXX}" = "y" ] && make_args+=( DUMA_CPP=1 )
|
|
|
|
[ "${CT_DUMA_SO}" = "y" ] || make_args+=( DUMASO= )
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building D.U.M.A"
|
|
|
|
CT_DoExecLog ALL make "${make_args[@]}" all
|
|
|
|
CT_DoLog EXTRA "Installing D.U.M.A"
|
|
|
|
CT_DoExecLog ALL make "${make_args[@]}" install
|
2007-07-12 08:47:15 +00:00
|
|
|
|
2017-01-30 02:54:13 +00:00
|
|
|
if [ "${CT_DUMA_CUSTOM_WRAPPER}" = "y" ]; then
|
|
|
|
# The shared library needs some love: some version have libduma.so.0.0,
|
|
|
|
# while others have libduma.so.0.0.0
|
2017-02-27 03:06:35 +00:00
|
|
|
duma_so=$( make "${make_args[@]}" printvars | sed -n -r -e 's/^DUMASO \[(.*)\]$/\1/p' )
|
2008-06-17 22:26:44 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing wrapper script"
|
2017-01-30 02:54:13 +00:00
|
|
|
CT_DoExecLog ALL mkdir -p "${CT_DEBUGROOT_DIR}/usr/bin"
|
2008-06-17 22:26:44 +00:00
|
|
|
# Install a simpler, smaller, safer wrapper than the one provided by D.U.M.A.
|
2017-01-30 02:54:13 +00:00
|
|
|
CT_DoExecLog ALL rm -f "${CT_DEBUGROOT_DIR}/usr/bin/duma"
|
|
|
|
CT_DoExecLog ALL cp "${CT_LIB_DIR}/scripts/build/debug/duma.in" \
|
|
|
|
"${CT_DEBUGROOT_DIR}/usr/bin/duma"
|
2017-02-27 03:06:35 +00:00
|
|
|
CT_DoExecLog ALL sed -i -r -e "s:^LIBDUMA_SO=.*:LIBDUMA_SO=/usr/lib/${duma_so}:;" \
|
2017-01-30 02:54:13 +00:00
|
|
|
"${CT_DEBUGROOT_DIR}/usr/bin/duma"
|
|
|
|
CT_DoExecLog ALL chmod 755 "${CT_DEBUGROOT_DIR}/usr/bin/duma"
|
2007-07-12 08:47:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
CT_Popd
|
2008-06-17 22:26:44 +00:00
|
|
|
CT_EndStep
|
2007-07-12 08:47:15 +00:00
|
|
|
}
|
|
|
|
|