comparison text/rasqal/rasqal.sh @ 1174:7fd00429dcae

text/rasqal: initial import, closes #2323
author David Demelier <markand@malikania.fr>
date Thu, 17 Oct 2019 14:08:27 +0200
parents
children 6710613b88b9
comparison
equal deleted inserted replaced
1173:b56931d3ac0d 1174:7fd00429dcae
1 #!/bin/sh
2 #
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
4 #
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
8 #
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 #
17
18 PKGNAME=rasqal
19 PKGVERSION=0.9.33
20 PKGREVISION=1
21 PKGLICENSE="GPLv20 LGPLv21"
22 PKGSUMMARY="Rasqal RDF Query Library"
23 PKGDOWNLOAD="http://download.librdf.org/source/rasqal-0.9.33.tar.gz"
24 PKGDEPENDS="bison:build flex:build libgcrypt mpfr raptor util-linux"
25 PKGOPTIONS="REGEX"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=clang}
30 : ${CFLAGS:=-O2}
31 : ${LDFLAGS:=}
32 : ${LIBS:=}
33 : ${REGEX:=yes} # Note: regular expressions support through pcre.
34
35 if [ "$REGEX" = "yes" ]; then
36 PKGDEPENDS="pcre $PKGDEPENDS"
37 with_regex="--enable-pcre"
38 else
39 with_regex="--disable-pcre"
40 fi
41
42 build()
43 {
44 rm -rf $PKGNAME-$PKGVERSION
45 tar xvf $PKGNAME-$PKGVERSION.tar.gz
46 cd $PKGNAME-$PKGVERSION
47
48 # We don't provide a XML option because raptor requires libxml2 anyway.
49 autoreconf -vif
50 CC="$CC" \
51 CFLAGS="$CFLAGS" \
52 LDFLAGS="$LDFLAGS" \
53 LIBS="$LIBS" \
54 ./configure \
55 --build=$CBUILD \
56 --host=$CHOST \
57 --prefix= \
58 --enable-release \
59 $with_regex
60 make
61 make install DESTDIR=$DESTDIR
62 find $DESTDIR -type f -name "*.la" -delete
63
64 cd ..
65 rm -rf $PKGNAME-$PKGVERSION
66 }