comparison x11/libpthread-stubs/libpthread-stubs.sh @ 202:5de141a57786

x11/libpthread-stubs: initial import, closes #1393
author David Demelier <markand@malikania.fr>
date Tue, 19 Mar 2019 20:38:00 +0100
parents
children 2416430cff0b
comparison
equal deleted inserted replaced
201:8786a3791cc9 202:5de141a57786
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=libpthread-stubs
19 PKGVERSION=0.4
20 PKGREVISION=1
21 PKGLICENSE="X11"
22 PKGSUMMARY="pthread functions for portability"
23 PKGDOWNLOAD="https://xcb.freedesktop.org/dist/$PKGNAME-$PKGVERSION.tar.gz"
24
25 : ${CHOST:=$(uname -m)-linux-musl}
26 : ${CBUILD:=$(uname -m)-linux-musl}
27 : ${CC:=gcc}
28 : ${CFLAGS:=-O2}
29 : ${LDFLAGS:=}
30 : ${LIBS:=}
31
32 build()
33 {
34 rm -rf $PKGNAME-$PKGVERSION
35 tar xvaf $PKGNAME-$PKGVERSION.tar.gz
36 pushd $PKGNAME-$PKGVERSION
37
38 CC="$CC" \
39 CFLAGS="$CFLAGS" \
40 LDFLAGS="$LDFLAGS" \
41 LIBS="$LIBS" \
42 ./configure \
43 --build=$CBUILD \
44 --host=$CHOST \
45 --prefix=/usr
46 make
47 make install DESTDIR=$DESTDIR
48
49 popd
50 rm -rf $PKGNAME-$PKGVERSION
51 }