Adapt to mainline changes in task_spawnvf()
[harbours.git] / libisl / HARBOUR
blobaf1fa7362b570501d308646d780daaa4d7a9a2e3
2 # Copyright (c) 2013 Vojtech Horky
3 # All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
9 # - Redistributions of source code must retain the above copyright
10 #   notice, this list of conditions and the following disclaimer.
11 # - Redistributions in binary form must reproduce the above copyright
12 #   notice, this list of conditions and the following disclaimer in the
13 #   documentation and/or other materials provided with the distribution.
14 # - The name of the author may not be used to endorse or promote products
15 #   derived from this software without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 shipname=libisl
30 shipname_=isl
31 shipversion=0.11.1
32 shipsources="http://isl.gforge.inria.fr/${shipname_}-${shipversion}.tar.bz2"
33 shiptugs="libgmp"
34 shipfunnels=4
36 build() {
37         run tar xjf "${shipname_}-${shipversion}.tar.bz2"
38         cd ${shipname_}-${shipversion}
39                 
40         extra_cflags="-I$HSCT_INCLUDE_DIR -L$HSCT_LIB_DIR"
41         
42         run ./configure \
43                 --disable-shared \
44                 --host="$HSCT_GNU_TARGET" \
45                 CC="$HSCT_CC" \
46                 CFLAGS="$HSCT_CFLAGS $HSCT_LDFLAGS_FOR_CC $extra_cflags" \
47                 LD="$HSCT_LD" \
48                 STRIP="$HSCT_STRIP" \
49                 AR="$HSCT_AR" \
50                 OBJDUMP="$HSCT_OBJDUMP" \
51                 NM="$HSCT_NM" \
52                 RANLIB="$HSCT_RANLIB"
53         
54         run make -j$shipfunnels STATIC_ONLY=y
57 package() {
58         cd "${shipname_}-${shipversion}"
59         run make install "DESTDIR=$PWD/PKG"
60         
61         # Copy the headers and static library
62         run mkdir -p "$HSCT_INCLUDE_DIR/${shipname_}"
63         run cp PKG/usr/local/include/isl/*.h "$HSCT_INCLUDE_DIR/isl"
64         run cp PKG/usr/local/lib/libisl.a "$HSCT_LIB_DIR/"
65         
66         run mkdir -p "$HSCT_MY_DIR/inc/c/isl"
67         run cp PKG/usr/local/include/isl/*.h "$HSCT_MY_DIR/inc/c/isl"
68         
69         run mkdir -p "$HSCT_MY_DIR/lib"
70         run cp PKG/usr/local/lib/libisl.a "$HSCT_MY_DIR/lib"
71         
72         (
73                 msg "Preparing tests..."
74                 run mkdir -p "$HSCT_MY_DIR/tests/${shipname}/"
75                 run cp isl_pip "$HSCT_MY_DIR/tests/${shipname}/"
76                 cd test_inputs
77                 run cp *.pip "$HSCT_MY_DIR/tests/${shipname}/"
78                 echo "echo Running ${shipname} tests..." >"$HSCT_MY_DIR/tests/run_${shipname}.bdsh"
79                 for testname in *.pip; do
80                         # This is taken from pip_test.sh
81                         cat >>"$HSCT_MY_DIR/tests/run_${shipname}.bdsh" <<EOF_PIP_TEST
82 echo --- $testname ---
83 from /tests/${shipname}/$testname | /tests/${shipname}/isl_pip --format=set --context=gbr -T
84 from /tests/${shipname}/$testname | /tests/${shipname}/isl_pip --format=set --context=lexmin -T
85 from /tests/${shipname}/$testname | /tests/${shipname}/isl_pip --format=affine --context=gbr -T
86 from /tests/${shipname}/$testname | /tests/${shipname}/isl_pip --format=affine --context=lexmin -T
87 EOF_PIP_TEST
88                 done || exit 1
89         )