Mercurial > vanilla
comparison graphics/qrencode/qrencode.sh @ 932:069f16236998
graphics/qrencode: initial import, closes #2239
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 29 Aug 2019 22:00:00 +0200 |
parents | |
children | ddab65a5b3f5 |
comparison
equal
deleted
inserted
replaced
931:20743b1b6f74 | 932:069f16236998 |
---|---|
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=qrencode | |
19 PKGVERSION=4.0.2 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="LGPLv21+" | |
22 PKGSUMMARY="QR Code encoding library" | |
23 PKGDOWNLOAD="https://fukuchi.org/works/$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz" | |
24 PKGDEPENDS="" | |
25 PKGOPTIONS="PNG TOOLS" | |
26 | |
27 : ${CHOST:=$(uname -m)-linux-musl} | |
28 : ${CBUILD:=$(uname -m)-linux-musl} | |
29 : ${CC:=clang} | |
30 : ${CFLAGS:=-O2} | |
31 : ${LDFLAGS:=} | |
32 : ${LIBS:=} | |
33 : ${PNG:=yes} | |
34 : ${TOOLS:=yes} # Note: requires PNG. | |
35 | |
36 if [ "$PNG" = "yes" ]; then | |
37 PKGDEPENDS="libpng $PKGDEPENDS" | |
38 with_png="--with-png" | |
39 else | |
40 with_png="--without-png" | |
41 fi | |
42 | |
43 if [ "$TOOLS" = "yes" ]; then | |
44 with_tools="--with-tools" | |
45 else | |
46 with_tools="--without-tools" | |
47 fi | |
48 | |
49 build() | |
50 { | |
51 rm -rf $PKGNAME-$PKGVERSION | |
52 tar xvf $PKGNAME-$PKGVERSION.tar.gz | |
53 cd $PKGNAME-$PKGVERSION | |
54 | |
55 autoreconf -vif | |
56 CC="$CC" \ | |
57 CFLAGS="$CFLAGS" \ | |
58 LDFLAGS="$LDFLAGS" \ | |
59 LIBS="$LIBS" \ | |
60 ./configure \ | |
61 --build=$CBUILD \ | |
62 --host=$CHOST \ | |
63 --prefix= \ | |
64 --enable-shared \ | |
65 --enable-static \ | |
66 $with_png \ | |
67 $with_tools | |
68 make | |
69 make install DESTDIR=$DESTDIR | |
70 find $DESTDIR -type f -name "*.la" -delete | |
71 | |
72 cd .. | |
73 rm -rf $PKGNAME-$PKGVERSION | |
74 } |