scripts/build/libc/mingw.sh
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Fri Jan 03 17:10:09 2014 +0100 (2014-01-03)
changeset 3270 dff359adf15c
parent 3112 6cb56b3f2d34
permissions -rw-r--r--
libc/eglibc: fix downloading of localedef addon

For the versions of eglibc where the ports addon is not external (ie,
all versions after, and including 2.17), we would fail to download the
localedef addon, since the test did not care about the addon we were
about to download, only whether the ports addon was external or not.

Fix that by skipping the ports addon only if that's the addon we're
trying to download.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # Copyright 2012 Yann Diorcet
     2 # Licensed under the GPL v2. See COPYING in the root of this package
     3 
     4 do_libc_get() { 
     5     CT_GetFile "mingw-w64-v${CT_WINAPI_VERSION}" \
     6         http://downloads.sourceforge.net/sourceforge/mingw-w64
     7 }
     8 
     9 do_libc_extract() {
    10     CT_Extract "mingw-w64-v${CT_WINAPI_VERSION}"
    11     CT_Pushd "${CT_SRC_DIR}/mingw-w64-v${CT_WINAPI_VERSION}/"
    12     CT_Patch nochdir mingw-w64 "${CT_WINAPI_VERSION}"
    13     CT_Popd
    14 }
    15 
    16 do_libc_check_config() {
    17     :
    18 }
    19 
    20 do_libc_start_files() {
    21     local -a sdk_opts
    22 
    23     CT_DoStep INFO "Installing C library headers"
    24 
    25     case "${CT_MINGW_DIRECTX}:${CT_MINGW_DDK}" in
    26         y:y)    sdk_opts+=( "--enable-sdk=all"     );;
    27         y:)     sdk_opts+=( "--enable-sdk=directx" );;
    28         :y)     sdk_opts+=( "--enable-sdk=ddk"     );;
    29         :)      ;;
    30     esac
    31 
    32     CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-headers"
    33 
    34     CT_DoLog EXTRA "Configuring Headers"
    35 
    36     CT_DoExecLog CFG        \
    37     "${CT_SRC_DIR}/mingw-w64-v${CT_WINAPI_VERSION}/mingw-w64-headers/configure" \
    38         --build=${CT_BUILD} \
    39         --host=${CT_TARGET} \
    40         --prefix=/usr       \
    41         "${sdk_opts[@]}"
    42 
    43     CT_DoLog EXTRA "Compile Headers"
    44     CT_DoExecLog ALL make
    45 
    46     CT_DoLog EXTRA "Installing Headers"
    47     CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
    48     
    49     CT_Popd
    50 
    51     # It seems mingw is strangely set up to look into /mingw instead of
    52     # /usr (notably when looking for the headers). This symlink is
    53     # here to workaround this, and seems to be here to last... :-/
    54     CT_DoExecLog ALL ln -sv "usr/${CT_TARGET}" "${CT_SYSROOT_DIR}/mingw"
    55 
    56     CT_EndStep
    57 }
    58 
    59 do_libc() {
    60     CT_DoStep INFO "Building mingw-w64 files"
    61 
    62     CT_DoLog EXTRA "Configuring mingw-w64-crt"
    63 
    64     CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-crt"
    65 
    66     CT_DoExecLog CFG                                                        \
    67     "${CT_SRC_DIR}/mingw-w64-v${CT_WINAPI_VERSION}/mingw-w64-crt/configure" \
    68         --prefix=/usr                                                       \
    69         --build=${CT_BUILD}                                                 \
    70         --host=${CT_TARGET}                                                 \
    71 
    72     CT_DoLog EXTRA "Building mingw-w64-crt"
    73     CT_DoExecLog ALL make ${JOBSFLAGS}
    74 
    75     CT_DoLog EXTRA "Installing mingw-w64-crt"
    76     CT_DoExecLog ALL make install DESTDIR=${CT_SYSROOT_DIR}
    77 
    78     CT_EndStep
    79 }