comparison x11/xcalc/xcalc.sh @ 288:54d0cc332071

x11/xcalc: initial import, closes #1409
author David Demelier <markand@malikania.fr>
date Fri, 22 Mar 2019 20:55:00 +0100
parents
children 2416430cff0b
comparison
equal deleted inserted replaced
287:873f69fc408d 288:54d0cc332071
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=xcalc
19 PKGVERSION=1.0.7
20 PKGREVISION=1
21 PKGLICENSE="CUSTOM"
22 PKGSUMMARY="X.Org calculator"
23 PKGDOWNLOAD="https://www.x.org/releases/individual/app/$PKGNAME-$PKGVERSION.tar.gz"
24 PKGDEPENDS="x11/libx11
25 x11/libxaw
26 x11/libxt
27 x11/util-macros:build
28 x11/xorgproto:build"
29
30 : ${CHOST:=$(uname -m)-linux-musl}
31 : ${CBUILD:=$(uname -m)-linux-musl}
32 : ${CC:=gcc}
33 : ${CFLAGS:=-O2}
34 : ${LDFLAGS:=}
35 : ${LIBS:=}
36
37 build()
38 {
39 rm -rf $PKGNAME-$PKGVERSION
40 tar xvaf $PKGNAME-$PKGVERSION.tar.gz
41 pushd $PKGNAME-$PKGVERSION
42
43 CC="$CC" \
44 CFLAGS="$CFLAGS" \
45 LDFLAGS="$LDFLAGS" \
46 LIBS="$LIBS" \
47 ./configure \
48 --build=$CBUILD \
49 --host=$CHOST \
50 --prefix=/usr
51 make
52 make install DESTDIR=$DESTDIR
53
54 popd
55 rm -rf $PKGNAME-$PKGVERSION
56 }