scripts/build/companion_libs/gmp.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Oct 16 14:58:29 2011 +0200 (2011-10-16)
changeset 2757 f070d922facf
parent 2346 ab441b3f8ea1
child 2927 ddaae597fd7c
permissions -rw-r--r--
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>
     1 # This file adds the functions to build the GMP library
     2 # Copyright 2008 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_gmp_get() { :; }
     6 do_gmp_extract() { :; }
     7 do_gmp() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_GMP}" = "y" ]; then
    11 
    12 # Download GMP
    13 do_gmp_get() {
    14     CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
    15 }
    16 
    17 # Extract GMP
    18 do_gmp_extract() {
    19     CT_Extract "gmp-${CT_GMP_VERSION}"
    20     CT_Patch "gmp" "${CT_GMP_VERSION}"
    21 }
    22 
    23 do_gmp() {
    24     mkdir -p "${CT_BUILD_DIR}/build-gmp"
    25     cd "${CT_BUILD_DIR}/build-gmp"
    26 
    27     CT_DoStep INFO "Installing GMP"
    28 
    29     CT_DoLog EXTRA "Configuring GMP"
    30 
    31     CT_DoExecLog CFG                                \
    32     CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions"     \
    33     "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    34         --build=${CT_BUILD}                         \
    35         --host=${CT_HOST}                           \
    36         --prefix="${CT_COMPLIBS_DIR}"               \
    37         --enable-fft                                \
    38         --enable-mpbsd                              \
    39         --enable-cxx                                \
    40         --disable-shared                            \
    41         --enable-static
    42 
    43     CT_DoLog EXTRA "Building GMP"
    44     CT_DoExecLog ALL make ${JOBSFLAGS}
    45 
    46     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    47         CT_DoLog EXTRA "Checking GMP"
    48         CT_DoExecLog ALL make ${JOBSFLAGS} -s check
    49     fi
    50 
    51     CT_DoLog EXTRA "Installing GMP"
    52     CT_DoExecLog ALL make install
    53 
    54     CT_EndStep
    55 }
    56 
    57 fi # CT_GMP