comparison x11/pixman/pixman.sh @ 258:6edecec259ce

x11/pixman: initial import, closes #1300
author David Demelier <markand@malikania.fr>
date Thu, 21 Mar 2019 20:45:00 +0100
parents
children 59ff99d85c97
comparison
equal deleted inserted replaced
257:cfe41692cf73 258:6edecec259ce
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=pixman
19 PKGVERSION=0.38.0
20 PKGREVISION=1
21 PKGLICENSE="MIT"
22 PKGSUMMARY="X.Org pixel manipulation library"
23 PKGDOWNLOAD="https://www.x.org/releases/individual/lib/$PKGNAME-$PKGVERSION.tar.gz"
24 PKGDEPENDS="category/foo category/bar"
25 PKGOPTIONS="PNG"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=gcc}
30 : ${CFLAGS:=-O2}
31 : ${LDFLAGS:=}
32 : ${LIBS:=}
33 : ${PNG:=no}
34
35 if [ "$PNG" = "yes" ]; then
36 PKGDEPENDS="lib/libpng $PKGDEPENDS"
37 with_png="--enable-libpng"
38 else
39 with_png="--disable-libpng"
40 fi
41
42 build()
43 {
44 rm -rf $PKGNAME-$PKGVERSION
45 tar xvaf $PKGNAME-$PKGVERSION.tar.gz
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 --disable-gnuplot \
57 --disable-gtk \
58 --disable-static \
59 --enable-shared \
60 $with_png
61 make
62 make install DESTDIR=$DESTDIR
63 rm -f $DESTDIR/usr/lib/libpixman-1.la
64
65 popd
66 rm -rf $PKGNAME-$PKGVERSION
67 }