scripts/build/companion_libs/ppl.sh
author Anthony Foiani <anthony.foiani@gmail.com>
Thu May 19 23:05:32 2011 +0200 (2011-05-19)
changeset 2459 4f0c4fb572e2
parent 2381 0ca0f85a4b2a
child 2460 132c00ad3d6e
child 2464 4b844234d214
permissions -rw-r--r--
complibs/ppl: update GMP location configuration argument for PPL v0.11 and later

'configure' for PPL 0.11 (and later) needs "--with-gmp-prefix" to
provide the location of the GMP toolkit; the previous switches were
"--with-libgmp-prefix" and "--with-libgmpxx-prefix".

The upstream log message is:

commit 08dfb6fea094f8c5a533575a3ea2095edce99a6d
Author: Roberto Bagnara <bagnara@cs.unipr.it>
Date: Sun Jul 12 21:39:46 2009 +0200

New configure option --with-gmp-prefix supersedes the (now removed)
options --with-libgmp-prefix and --with-libgmpxx-prefix.

Link: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=08dfb6fea094f8c5a533575a3ea2095edce99a6d

Since PPL's 'configure' ignores unknown switches, we use all three so we
don't have to conditionalize the ppl.sh build script itself.

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