scripts/build/libc_libfloat.sh
changeset 63 89b41dbffe8d
parent 1 eeea35fbf182
child 78 c3868084d81a
     1.1 --- a/scripts/build/libc_libfloat.sh	Sat Feb 24 11:00:05 2007 +0000
     1.2 +++ b/scripts/build/libc_libfloat.sh	Mon May 07 09:04:02 2007 +0000
     1.3 @@ -2,6 +2,34 @@
     1.4  # Copyright 2007 Yann E. MORIN
     1.5  # Licensed under the GPL v2. See COPYING in the root of this package
     1.6  
     1.7 +# Define libfloat functions depending on wether it is selected or not
     1.8 +if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
     1.9 +
    1.10 +# Download libfloat
    1.11 +do_libfloat_get() {
    1.12 +    # Please note: because the file we download, and the file we store on the
    1.13 +    # file system don't have the same name, CT_GetFile will always try to
    1.14 +    # download the file over and over.
    1.15 +    # To avoid this, we check that the file we want already exists in the
    1.16 +    # tarball directory first. This is an ugly hack that overrides the standard
    1.17 +    # CT_GetFile behavior... Sight...
    1.18 +    lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
    1.19 +    ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
    1.20 +    if [ -z "${ext}" ]; then
    1.21 +        CT_GetFile libfloat_990616.orig "${lib_float_url}"
    1.22 +        ext=`CT_GetFileExtension "libfloat_990616.orig"`
    1.23 +        # Hack: remove the .orig extension, and change _ to -
    1.24 +        mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
    1.25 +              "${CT_TARBALLS_DIR}/libfloat-990616${ext}"      2>&1 |CT_DoLog DEBUG
    1.26 +    fi
    1.27 +}
    1.28 +
    1.29 +# Extract libfloat
    1.30 +do_libfloat_extract() {
    1.31 +    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    1.32 +}
    1.33 +
    1.34 +# Build libfloat
    1.35  do_libfloat() {
    1.36      # Here we build and install libfloat for the target, so that the C library
    1.37      # builds OK with those versions of gcc that have severed softfloat support
    1.38 @@ -29,3 +57,17 @@
    1.39  
    1.40      CT_EndStep
    1.41  }
    1.42 +
    1.43 +else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    1.44 +
    1.45 +do_libfloat_get() {
    1.46 +    true
    1.47 +}
    1.48 +do_libfloat_extract() {
    1.49 +    true
    1.50 +}
    1.51 +do_libfloat() {
    1.52 +    true
    1.53 +}
    1.54 +
    1.55 +fi