comparison graphics/weston/weston.sh @ 275:469cfbc5c465

graphics/weston: initial import, closes #1391
author David Demelier <markand@malikania.fr>
date Fri, 22 Mar 2019 20:20:00 +0100
parents
children 7828241c9634
comparison
equal deleted inserted replaced
274:59ff99d85c97 275:469cfbc5c465
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=weston
19 PKGVERSION=5.0.0
20 PKGREVISION=1
21 PKGLICENSE="MIT"
22 PKGSUMMARY="reference implementation of a wayland compositor"
23 PKGDOWNLOAD="https://wayland.freedesktop.org/releases/$PKGNAME-$PKGVERSION.tar.xz"
24 PKGOPTIONS="DBUS PAM X"
25
26 : ${CHOST:=$(uname -m)-linux-musl}
27 : ${CBUILD:=$(uname -m)-linux-musl}
28 : ${CC:=gcc}
29 : ${CFLAGS:=-O2}
30 : ${LDFLAGS:=}
31 : ${LIBS:=}
32 : ${DBUS:=yes}
33 : ${PAM:=yes}
34 : ${X:=yes}
35
36 if [ "$DBUS" = "yes" ]; then
37 PKGDEPENDS="core/dbus $PKGDEPENDS"
38 with_dbus="--enable-dbus"
39 else
40 with_dbus="--disable-dbus"
41 fi
42
43 if [ "$PAM" = "yes" ]; then
44 PKGDEPENDS="security/pam $PKGDEPENDS"
45 with_pam="--enable-weston-launch"
46 else
47 with_pam="--disable-weston-launch"
48 fi
49
50 if [ "$X" = "yes" ]; then
51 PKGDEPENDS="x11/libx11 x11/libxcb x11/libxcursor"
52 with_x="--enable-xwayland --enable-x11-compositor"
53 else
54 with_x="--disable-xwayland --disable-x11-compositor"
55 fi
56
57 build()
58 {
59 rm -rf $PKGNAME-$PKGVERSION
60 tar xvaf $PKGNAME-$PKGVERSION.tar.xz
61 pushd $PKGNAME-$PKGVERSION
62
63 CC="$CC" \
64 CFLAGS="$CFLAGS" \
65 LDFLAGS="$LDFLAGS" \
66 LIBS="$LIBS" \
67 ./configure \
68 --build=$CBUILD \
69 --host=$CHOST \
70 --prefix=/usr \
71 $with_dbus \
72 $with_pam \
73 $with_x
74 make
75 make install DESTDIR=$DESTDIR
76 rm -f $DESTDIR/usr/lib/libweston-5/*.la
77 rm -f $DESTDIR/usr/lib/libweston{,-desktop}-5.la
78 rm -f $DESTDIR/usr/lib/weston/*.la
79
80 popd
81 rm -rf $PKGNAME-$PKGVERSION
82 }