comparison mate/mate-calc/mate-calc.sh @ 360:3c80c1387418

mate/mate-calc: initial import, closes #1449
author David Demelier <markand@malikania.fr>
date Fri, 29 Mar 2019 22:43:04 +0100
parents
children 515778c3a417
comparison
equal deleted inserted replaced
359:abdcb45c3187 360:3c80c1387418
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=mate-calc
19 PKGVERSION=1.22.0
20 PKGREVISION=1
21 PKGLICENSE="GPLv2"
22 PKGSUMMARY="MATE calculator"
23 PKGDOWNLOAD="https://pub.mate-desktop.org/releases/1.22/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGDEPENDS="lib/glib graphics/gtk misc/itstool:build"
25 PKGOPTIONS="NLS"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=gcc}
30 : ${CFLAGS:=-O2}
31 : ${LDFLAGS:=}
32 : ${LIBS:=}
33 : ${NLS:=yes}
34
35 if [ "$NLS" = "yes" ]; then
36 PKGDEPENDS="core/gettext $PKGDEPENDS"
37 with_nls="--enable-nls"
38 else
39 with_nls="--disable-nls"
40 fi
41
42 build()
43 {
44 rm -rf $PKGNAME-$PKGVERSION
45 tar xvaf $PKGNAME-$PKGVERSION.tar.xz
46 pushd $PKGNAME-$PKGVERSION
47
48 CC="$CC" \
49 CFLAGS="$CFLAGS" \
50 LDFLAGS="$LDFLAGS" \
51 LIBS="$LIBS" \
52 ./configure \
53 --build=$CBUILD \
54 --host=$CHOST \
55 --prefix=/usr \
56 $with_nls
57 make
58 make install DESTDIR=$DESTDIR
59
60 popd
61 rm -rf $PKGNAME-$PKGVERSION
62 }