2007-07-13 12:22:34 +00:00
|
|
|
# Build script for ltrace
|
|
|
|
|
|
|
|
do_debug_ltrace_get() {
|
2010-01-05 17:56:44 +00:00
|
|
|
CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" .tar.gz \
|
|
|
|
{ftp,http}://ftp.de.debian.org/debian/pool/main/l/ltrace/
|
2007-07-13 12:22:34 +00:00
|
|
|
# Create a link so that the following steps are easier to do:
|
2010-01-05 22:27:19 +00:00
|
|
|
CT_Pushd "${CT_TARBALLS_DIR}"
|
2008-05-20 21:32:39 +00:00
|
|
|
ltrace_ext=$(CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig")
|
2010-01-05 17:56:44 +00:00
|
|
|
ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" \
|
|
|
|
"ltrace-${CT_LTRACE_VERSION}${ltrace_ext}"
|
2010-01-05 22:27:19 +00:00
|
|
|
CT_Popd
|
2007-07-13 12:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_debug_ltrace_extract() {
|
2009-01-05 23:02:43 +00:00
|
|
|
CT_Extract "ltrace-${CT_LTRACE_VERSION}"
|
2010-04-11 21:18:10 +00:00
|
|
|
CT_Patch "ltrace" "${CT_LTRACE_VERSION}"
|
2007-07-13 12:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_debug_ltrace_build() {
|
2010-03-06 15:05:20 +00:00
|
|
|
local ltrace_host
|
|
|
|
|
2007-07-13 12:22:34 +00:00
|
|
|
CT_DoStep INFO "Installing ltrace"
|
|
|
|
|
2008-10-24 15:40:58 +00:00
|
|
|
CT_DoLog EXTRA "Copying sources to build dir"
|
2010-01-02 17:00:54 +00:00
|
|
|
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}" \
|
|
|
|
"${CT_BUILD_DIR}/build-ltrace"
|
|
|
|
CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
|
2008-10-24 15:40:58 +00:00
|
|
|
|
2007-07-13 12:22:34 +00:00
|
|
|
CT_DoLog EXTRA "Configuring ltrace"
|
2010-01-03 15:46:58 +00:00
|
|
|
# ltrace-0.5.3, and later, don't use GNU Autotools configure script anymore
|
|
|
|
if [ "${CT_LTRACE_0_5_3_or_later}" = "y" ]; then
|
2010-03-06 15:05:20 +00:00
|
|
|
case "${CT_ARCH}:${CT_ARCH_BITNESS}" in
|
2010-03-07 11:30:01 +00:00
|
|
|
x86:32) ltrace_host="i386";;
|
|
|
|
x86:64) ltrace_host="x86_64";;
|
|
|
|
powerpc:*) ltrace_host="ppc";;
|
|
|
|
*) ltrace_host="${CT_ARCH}";;
|
2010-03-06 15:05:20 +00:00
|
|
|
esac
|
|
|
|
CC="${CT_TARGET}-${CT_CC}" \
|
|
|
|
HOST="${ltrace_host}" \
|
|
|
|
CFLAGS="${CT_TARGET_CFLAGS}" \
|
2010-10-22 20:02:57 +00:00
|
|
|
CT_DoExecLog CFG ./configure --prefix=/usr
|
2010-01-03 15:46:58 +00:00
|
|
|
else
|
2010-10-22 20:02:57 +00:00
|
|
|
CT_DoExecLog CFG \
|
2010-01-03 15:46:58 +00:00
|
|
|
./configure \
|
|
|
|
--build=${CT_BUILD} \
|
|
|
|
--host=${CT_TARGET} \
|
|
|
|
--prefix=/usr
|
|
|
|
fi
|
2007-07-13 12:22:34 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building ltrace"
|
2008-07-14 21:57:57 +00:00
|
|
|
CT_DoExecLog ALL make
|
2007-07-13 12:22:34 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing ltrace"
|
2009-03-03 17:41:59 +00:00
|
|
|
CT_DoExecLog ALL make DESTDIR="${CT_DEBUGROOT_DIR}" install
|
2007-07-13 12:22:34 +00:00
|
|
|
|
|
|
|
CT_Popd
|
|
|
|
CT_EndStep
|
|
|
|
}
|
|
|
|
|