2010-07-11 19:36:20 +00:00
|
|
|
do_libc_get() {
|
|
|
|
CT_GetFile "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src" \
|
|
|
|
http://downloads.sourceforge.net/sourceforge/mingw
|
2010-07-11 19:36:55 +00:00
|
|
|
|
|
|
|
if [ -n "${CT_MINGW_DIRECTX}" ]; then
|
|
|
|
CT_GetFile "directx-devel" \
|
|
|
|
http://www.libsdl.org/extras/win32/common
|
|
|
|
fi
|
|
|
|
if [ -n "${CT_MINGW_OPENGL}" ]; then
|
|
|
|
CT_GetFile "opengl-devel" \
|
|
|
|
http://www.libsdl.org/extras/win32/common
|
|
|
|
fi
|
|
|
|
if [ -n "${CT_MINGW_PDCURSES}" ]; then
|
|
|
|
CT_GetFile "PDCurses-${CT_MINGW_PDCURSES_VERSION}" \
|
|
|
|
http://downloads.sourceforge.net/sourceforge/pdcurses
|
|
|
|
fi
|
|
|
|
if [ -n "${CT_MINGW_GNURX}" ]; then
|
|
|
|
CT_GetFile "mingw-libgnurx-${CT_MINGW_GNURX_VERSION}-src" \
|
|
|
|
http://downloads.sourceforge.net/sourceforge/mingw
|
|
|
|
fi
|
2010-07-11 19:36:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_libc_extract() {
|
|
|
|
CT_Extract "mingwrt-${CT_MINGWRT_VERSION}-mingw32-src"
|
2010-07-11 19:36:55 +00:00
|
|
|
|
|
|
|
if [ -n "${CT_MINGW_PDCURSES}" ]; then
|
|
|
|
CT_Extract "PDCurses-${CT_MINGW_PDCURSES_VERSION}"
|
|
|
|
CT_Patch "PDCurses" "${CT_MINGW_PDCURSES_VERSION}"
|
|
|
|
fi
|
|
|
|
if [ -n "${CT_MINGW_GNURX}" ]; then
|
|
|
|
CT_Extract "mingw-libgnurx-${CT_MINGW_GNURX_VERSION}-src"
|
|
|
|
CT_Patch "mingw-libgnurx" "${CT_MINGW_GNURX_VERSION}"
|
|
|
|
fi
|
2010-07-11 19:36:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_libc_check_config() {
|
|
|
|
:
|
|
|
|
}
|
|
|
|
|
2011-01-22 21:32:44 +00:00
|
|
|
do_libc_start_files() {
|
2010-07-11 19:36:20 +00:00
|
|
|
CT_DoStep INFO "Installing C library headers"
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing MinGW Runtime headers"
|
2010-08-14 21:21:06 +00:00
|
|
|
mkdir -p "${CT_HEADERS_DIR}"
|
|
|
|
cp -r ${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/include/* \
|
|
|
|
${CT_HEADERS_DIR}
|
2011-01-25 23:04:41 +00:00
|
|
|
|
|
|
|
# It seems mingw is strangely set up to look into /mingw instead of
|
|
|
|
# /usr (notably when looking for the headers). This symlink is
|
|
|
|
# here to workaround this, and seems to be here to last... :-/
|
2010-08-14 22:00:51 +00:00
|
|
|
CT_DoExecLog ALL ln -sv "usr" "${CT_SYSROOT_DIR}/mingw"
|
2010-07-11 19:36:20 +00:00
|
|
|
|
|
|
|
CT_EndStep
|
|
|
|
}
|
|
|
|
|
|
|
|
do_libc() {
|
|
|
|
CT_DoStep INFO "Building MinGW files"
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring W32-API"
|
|
|
|
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-w32api"
|
|
|
|
cd "${CT_BUILD_DIR}/build-w32api"
|
|
|
|
|
2011-03-20 00:16:34 +00:00
|
|
|
CT_DoExecLog CFG \
|
2010-08-14 21:21:06 +00:00
|
|
|
CFLAGS="-I${CT_HEADERS_DIR}" \
|
2010-07-11 19:36:20 +00:00
|
|
|
LDFLAGS="-L${CT_SYSROOT_DIR}/lib" \
|
|
|
|
"${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/configure" \
|
|
|
|
--prefix=${CT_SYSROOT_DIR} \
|
2010-08-14 22:00:51 +00:00
|
|
|
--includedir=${CT_HEADERS_DIR} \
|
2010-07-11 19:36:20 +00:00
|
|
|
--host=${CT_TARGET}
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building W32-API"
|
2011-01-22 21:35:43 +00:00
|
|
|
CT_DoExecLog ALL make ${JOBSFLAGS}
|
2010-07-11 19:36:20 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing W32-API"
|
|
|
|
CT_DoExecLog ALL make install
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring MinGW Runtime"
|
|
|
|
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-mingwrt"
|
|
|
|
cd "${CT_BUILD_DIR}/build-mingwrt"
|
|
|
|
|
2011-03-20 00:16:34 +00:00
|
|
|
CT_DoExecLog CFG \
|
2010-08-14 21:21:06 +00:00
|
|
|
CFLAGS="-I${CT_HEADERS_DIR}" \
|
2010-07-11 19:36:20 +00:00
|
|
|
LDFLAGS="-L${CT_SYSROOT_DIR}/lib" \
|
|
|
|
"${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/configure" \
|
|
|
|
--prefix=${CT_SYSROOT_DIR}/ \
|
2010-08-14 22:00:51 +00:00
|
|
|
--includedir=${CT_HEADERS_DIR} \
|
2010-07-11 19:36:20 +00:00
|
|
|
--host=${CT_TARGET}
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building MinGW Runtime"
|
2011-01-22 21:35:43 +00:00
|
|
|
CT_DoExecLog ALL make ${JOBSFLAGS}
|
2010-07-11 19:36:20 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing MinGW Runtime"
|
|
|
|
CT_DoExecLog ALL make install
|
|
|
|
|
|
|
|
CT_EndStep
|
|
|
|
}
|
|
|
|
|
|
|
|
do_libc_finish() {
|
2010-07-11 19:36:55 +00:00
|
|
|
CT_DoStep INFO "Installing MinGW Development libraries"
|
|
|
|
|
|
|
|
CT_Pushd "${CT_SYSROOT_DIR}"
|
|
|
|
if [ -n "${CT_MINGW_DIRECTX}" ]; then
|
|
|
|
CT_DoLog EXTRA "Installing DirectX development package"
|
|
|
|
CT_Extract nochdir "directx-devel"
|
|
|
|
fi
|
|
|
|
if [ -n "${CT_MINGW_OPENGL}" ]; then
|
|
|
|
CT_DoLog EXTRA "Installing OpenGL development package"
|
|
|
|
CT_Extract nochdir "opengl-devel"
|
|
|
|
fi
|
|
|
|
CT_Popd
|
|
|
|
|
|
|
|
if [ -n "${CT_MINGW_PDCURSES}" ]; then
|
|
|
|
CT_DoLog EXTRA "Building PDCurses development files"
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-pdcurses"
|
|
|
|
cd "${CT_BUILD_DIR}/build-pdcurses"
|
|
|
|
|
|
|
|
make -f ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/win32/mingwin32.mak libs \
|
|
|
|
PDCURSES_SRCDIR=${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION} \
|
|
|
|
CROSS_COMPILE=${CT_TARGET}-
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing PDCurses development files"
|
|
|
|
chmod a+r ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h
|
|
|
|
cp ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h \
|
2010-08-14 22:00:51 +00:00
|
|
|
${CT_HEADERS_DIR}/
|
2010-07-11 19:36:55 +00:00
|
|
|
cp pdcurses.a ${CT_SYSROOT_DIR}/lib/libpdcurses.a
|
|
|
|
cp pdcurses.a ${CT_SYSROOT_DIR}/lib/libncurses.a
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "${CT_MINGW_GNURX}" ]; then
|
|
|
|
CT_DoLog EXTRA "Configuring GnuRX development files"
|
|
|
|
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-gnurx"
|
|
|
|
cd "${CT_BUILD_DIR}/build-gnurx"
|
|
|
|
|
2010-10-22 20:02:57 +00:00
|
|
|
CT_DoExecLog CFG \
|
2011-03-20 00:16:34 +00:00
|
|
|
CFLAGS="${CT_CFLAGS_FOR_TARGET}" \
|
2010-08-17 21:50:03 +00:00
|
|
|
"${CT_SRC_DIR}/mingw-libgnurx-${CT_MINGW_GNURX_VERSION}/configure" \
|
|
|
|
--build=${CT_BUILD} \
|
|
|
|
--host=${CT_TARGET} \
|
|
|
|
--prefix=${CT_SYSROOT_DIR} \
|
|
|
|
--includedir=${CT_HEADERS_DIR} \
|
|
|
|
--enable-shared \
|
2010-07-11 19:36:55 +00:00
|
|
|
--enable-static
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building GnuRX development files"
|
2011-01-22 21:35:43 +00:00
|
|
|
CT_DoExecLog ALL make ${JOBSFLAGS}
|
2010-07-11 19:36:55 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing GnuRX development files"
|
|
|
|
CT_DoExecLog ALL make install-dev
|
|
|
|
fi
|
|
|
|
|
|
|
|
CT_EndStep
|
2010-07-11 19:36:20 +00:00
|
|
|
}
|
|
|
|
|