comparison x11/libxrandr/libxrandr.sh @ 230:1655260ec0b8

x11/libxrandr: initial import, closes #1322
author David Demelier <markand@malikania.fr>
date Wed, 20 Mar 2019 21:46:00 +0100
parents
children 2416430cff0b
comparison
equal deleted inserted replaced
229:0bb9db6b8676 230:1655260ec0b8
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=libxrandr
19 PKGVERSION=1.5.2
20 PKGREVISION=1
21 PKGLICENSE="CUSTOM"
22 PKGSUMMARY="X.Org resize, rotate and reflection extension library"
23 PKGDOWNLOAD="https://www.x.org/releases/individual/lib/libXrandr-$PKGVERSION.tar.gz"
24 PKGDEPENDS="x11/libx11
25 x11/libxext
26 x11/libxrender
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 libXrandr-$PKGVERSION
40 tar xvaf libXrandr-$PKGVERSION.tar.gz
41 pushd libXrandr-$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 --disable-static \
52 --enable-shared
53 make
54 make install DESTDIR=$DESTDIR
55 rm -f $DESTDIR/usr/lib/libXrandr.la
56
57 popd
58 rm -rf libXrandr-$PKGVERSION
59 }