scripts/build/companion_libs/ppl.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:26:53 2011 +0200 (2011-08-02)
changeset 2592 4908eb2b6f17
parent 2460 132c00ad3d6e
child 2927 ddaae597fd7c
permissions -rw-r--r--
scripts/functions: cvs retrieval first tries the mirror for tarballs

The cvs download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via cvs.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard cvs retrieval will kick in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # This file adds the functions to build the PPL library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_ppl_get() { :; }
     6 do_ppl_extract() { :; }
     7 do_ppl() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_PPL}" = "y" ]; then
    11 
    12 # Download PPL
    13 do_ppl_get() {
    14     CT_GetFile "ppl-${CT_PPL_VERSION}"                                      \
    15         http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION}  \
    16         ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION}            \
    17         ftp://gcc.gnu.org/pub/gcc/infrastructure
    18 }
    19 
    20 # Extract PPL
    21 do_ppl_extract() {
    22     CT_Extract "ppl-${CT_PPL_VERSION}"
    23     CT_Patch "ppl" "${CT_PPL_VERSION}"
    24 }
    25 
    26 do_ppl() {
    27     mkdir -p "${CT_BUILD_DIR}/build-ppl"
    28     cd "${CT_BUILD_DIR}/build-ppl"
    29 
    30     CT_DoStep INFO "Installing PPL"
    31 
    32     CT_DoLog EXTRA "Configuring PPL"
    33 
    34 
    35     CT_DoExecLog CFG                                \
    36     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    37     CXXFLAGS="${CT_CFLAGS_FOR_HOST}"                \
    38     "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
    39         --build=${CT_BUILD}                         \
    40         --host=${CT_HOST}                           \
    41         --prefix="${CT_COMPLIBS_DIR}"               \
    42         --with-libgmp-prefix="${CT_COMPLIBS_DIR}"   \
    43         --with-libgmpxx-prefix="${CT_COMPLIBS_DIR}" \
    44         --with-gmp-prefix="${CT_COMPLIBS_DIR}"      \
    45         --enable-watchdog                           \
    46         --disable-debugging                         \
    47         --disable-assertions                        \
    48         --disable-ppl_lcdd                          \
    49         --disable-ppl_lpsol                         \
    50         --disable-shared                            \
    51         --enable-interfaces='c c++'                 \
    52         --enable-static
    53 
    54     # Maybe-options:
    55     # --enable-optimization=speed  or sspeed (yes, with 2 's')
    56 
    57     CT_DoLog EXTRA "Building PPL"
    58     CT_DoExecLog ALL make ${JOBSFLAGS}
    59 
    60     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    61         CT_DoLog EXTRA "Checking PPL"
    62         CT_DoExecLog ALL make ${JOBSFLAGS} -s check
    63     fi
    64 
    65     CT_DoLog EXTRA "Installing PPL"
    66     CT_DoExecLog ALL make install
    67 
    68     # Remove spuriously installed file
    69     CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config"
    70 
    71     CT_EndStep
    72 }
    73 
    74 fi # CT_PPL