complibs/cloog: fix extraction
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Oct 16 14:58:29 2011 +0200 (2011-10-16)
changeset 2757f070d922facf
parent 2756 3976adc582fb
child 2758 47199f966983
complibs/cloog: fix extraction

In the early days, cloog-ppl was bizarrely packaged: the first tarball
did not contain the version in the name of the extracted directory, so
we had to play tricks.

Nowadays, however, the first component of the path are stripped when
extracting a tarball, which means that the created directory will
always be properly named. So, our old tricks do no longer work, and
worse, they break the build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/companion_libs/cloog.sh
     1.1 --- a/scripts/build/companion_libs/cloog.sh	Sun Oct 16 14:38:52 2011 +0200
     1.2 +++ b/scripts/build/companion_libs/cloog.sh	Sun Oct 16 14:58:29 2011 +0200
     1.3 @@ -19,31 +19,22 @@
     1.4  do_cloog_extract() {
     1.5      local _t
     1.6  
     1.7 -    CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
     1.8 -
     1.9      # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    1.10      # while versions 0.15.4 onward do have the version in the dirname.
    1.11 -    case "${CT_CLOOG_VERSION}" in
    1.12 -        0.15.3) _t="";;
    1.13 -        *)      _t="-${CT_CLOOG_VERSION}";;
    1.14 -    esac
    1.15 -    CT_Pushd "${CT_SRC_DIR}/cloog-ppl${_t}"
    1.16 -    CT_Patch nochdir "cloog-ppl" "${CT_CLOOG_VERSION}"
    1.17 +    # But, because the infrastructure properly creates the extracted
    1.18 +    # directories (with tar's --strip-components), we can live safely...
    1.19 +    CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
    1.20 +    CT_Patch "cloog-ppl" "${CT_CLOOG_VERSION}"
    1.21 +
    1.22      if [ "${CT_CLOOG_VERSION}" = "0.15.10" ]; then
    1.23 +        CT_Pushd "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
    1.24          CT_DoExecLog CFG ./autogen.sh
    1.25 +        CT_Popd
    1.26      fi
    1.27 -    CT_Popd
    1.28  }
    1.29  
    1.30  do_cloog() {
    1.31 -    local _t
    1.32 -
    1.33 -    # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!)
    1.34 -    # while versions 0.15.4 onward do have the version in the dirname.
    1.35 -    case "${CT_CLOOG_VERSION}" in
    1.36 -        0.15.3) _t="";;
    1.37 -        *)      _t="-${CT_CLOOG_VERSION}";;
    1.38 -    esac
    1.39 +    local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
    1.40  
    1.41      mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
    1.42      cd "${CT_BUILD_DIR}/build-cloog-ppl"
    1.43 @@ -55,7 +46,7 @@
    1.44      CT_DoExecLog CFG                            \
    1.45      CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    1.46      LDFLAGS="-lm"                               \
    1.47 -    "${CT_SRC_DIR}/cloog-ppl${_t}/configure"    \
    1.48 +    "${cloog_src_dir}/configure"                \
    1.49          --build=${CT_BUILD}                     \
    1.50          --host=${CT_HOST}                       \
    1.51          --prefix="${CT_COMPLIBS_DIR}"           \