diff options
Diffstat (limited to 'scripts/build/libfloat.sh')
-rw-r--r-- | scripts/build/libfloat.sh | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/scripts/build/libfloat.sh b/scripts/build/libfloat.sh index 70b95c2d..e80e3932 100644 --- a/scripts/build/libfloat.sh +++ b/scripts/build/libfloat.sh @@ -7,26 +7,20 @@ if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then # Download libfloat do_libfloat_get() { - # Please note: because the file we download, and the file we store on the - # file system don't have the same name, CT_GetFile will always try to - # download the file over and over. - # To avoid this, we check that the file we want already exists in the - # tarball directory first. This is an ugly hack that overrides the standard - # CT_GetFile behavior... Sight... - lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/" - ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"` - if [ -z "${ext}" ]; then - CT_GetFile libfloat_990616.orig "${lib_float_url}" - ext=`CT_GetFileExtension "libfloat_990616.orig"` - # Hack: remove the .orig extension, and change _ to - - mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \ - "${CT_TARBALLS_DIR}/libfloat-990616${ext}" 2>&1 |CT_DoLog DEBUG - fi + # Ah! libfloat separates the version string from the base name with + # an underscore. We need to workaround this in a sane manner: soft link. + local libfloat_file=`echo "${CT_LIBFLOAT_FILE}" |sed -r -e 's/^libfloat-/libfloat_/;'` + CT_GetFile "${libfloat_file}" \ + ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat + CT_Pushd "${CT_TARBALLS_DIR}" + ext=`CT_GetFileExtension "${libfloat_file}"` + ln -s "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" + CT_Popd } # Extract libfloat do_libfloat_extract() { - [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}" + CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}" } # Build libfloat @@ -34,13 +28,12 @@ do_libfloat() { # Here we build and install libfloat for the target, so that the C library # builds OK with those versions of gcc that have severed softfloat support # code - [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0 - CT_DoStep INFO "Installing software floating point emulation library libfloat" + CT_DoStep INFO "Installing software floating point emulation library libfloat" + mkdir build-libfloat + cd build-libfloat CT_Pushd "${CT_BUILD_DIR}" CT_DoLog EXTRA "Copying sources to build dir" - mkdir build-libfloat - cd build-libfloat ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL CT_DoLog EXTRA "Cleaning library" |