Mercurial > vanilla
comparison core/diffutils/diffutils.sh @ 115:395c09d4a2b8
core/diffutils: initial import, closes #1141
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 10 Mar 2019 09:26:16 +0100 |
parents | |
children | e737b80da269 |
comparison
equal
deleted
inserted
replaced
114:96731cb1fcb0 | 115:395c09d4a2b8 |
---|---|
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 : ${CHOST:=$(uname -m)-linux-musl} | |
19 : ${CBUILD:=$(uname -m)-linux-musl} | |
20 : ${CC:=gcc} | |
21 : ${CFLAGS:=-O2} | |
22 : ${NLS:=yes} | |
23 | |
24 source ./diffutils.info | |
25 | |
26 set -ex | |
27 | |
28 if [ "$NLS" = "yes" ]; then | |
29 with_nls="--enable-nls" | |
30 else | |
31 with_nls="--disable-nls" | |
32 fi | |
33 | |
34 rm -rf $PKGNAME-$PKGVERSION | |
35 tar xvaf $PKGNAME-$PKGVERSION.tar.xz | |
36 pushd $PKGNAME-$PKGVERSION | |
37 | |
38 CC="$CC" \ | |
39 CFLAGS="$CFLAGS" \ | |
40 ./configure \ | |
41 --build=$CBUILD \ | |
42 --host=$CHOST \ | |
43 --target=$CTARGET \ | |
44 --prefix=/usr \ | |
45 ${with_nls} | |
46 make | |
47 make install DESTDIR=$DESTDIR | |
48 | |
49 popd | |
50 rm -rf $PKGNAME-$PKGVERSION |