Mercurial > vanilla
comparison text/libxml2/libxml2.sh @ 433:72390c93b9d3
text/libxml2: rename from lib/libxml2
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Apr 2019 21:07:00 +0200 |
parents | lib/libxml2/libxml2.sh@8017138b628e |
children | f3e036ac528e |
comparison
equal
deleted
inserted
replaced
432:23680a77e956 | 433:72390c93b9d3 |
---|---|
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=libxml2 | |
19 PKGVERSION=2.9.9 | |
20 PKGREVISION=1 | |
21 PKGLICENSE="MIT" | |
22 PKGSUMMARY="XML parsing library" | |
23 PKGDOWNLOAD="ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz" | |
24 PKGOPTIONS="ICU LZMA PYTHON ZLIB" | |
25 | |
26 : ${CHOST:=$(uname -m)-linux-musl} | |
27 : ${CBUILD:=$(uname -m)-linux-musl} | |
28 : ${CC:=clang} | |
29 : ${CFLAGS:=-O2} | |
30 : ${LDFLAGS:=} | |
31 : ${LIBS:=} | |
32 : ${ICU:=no} | |
33 : ${LZMA:=no} | |
34 : ${PYTHON:=yes} | |
35 : ${ZLIB:=no} | |
36 | |
37 if [ "$ICU" = "yes" ]; then | |
38 PKGDEPENDS="lib/icu $PKGDEPENDS" | |
39 with_icu="--with-icu" | |
40 else | |
41 with_icu="--without-icu" | |
42 fi | |
43 | |
44 if [ "$LZMA" = "yes" ]; then | |
45 PKGDEPENDS="core/xz $PKGDEPENDS" | |
46 with_lzma="--with-lzma" | |
47 else | |
48 with_lzma="--without-lzma" | |
49 fi | |
50 | |
51 if [ "$PYTHON" = "yes" ]; then | |
52 PKGDEPENDS="python/python $PKGDEPENDS" | |
53 with_python="--with-python" | |
54 else | |
55 with_python="--without-python" | |
56 fi | |
57 | |
58 if [ "$ZLIB" = "yes" ]; then | |
59 PKGDEPENDS="lib/zlib $PKGDEPENDS" | |
60 with_zlib="--with-zlib" | |
61 else | |
62 with_zlib="--without-zlib" | |
63 fi | |
64 | |
65 build() | |
66 { | |
67 rm -rf $PKGNAME-$PKGVERSION | |
68 tar xvaf $PKGNAME-$PKGVERSION.tar.gz | |
69 pushd $PKGNAME-$PKGVERSION | |
70 | |
71 sed -i -e '/SUBDIRS/ s/tests//' python/Makefile.am | |
72 autoreconf -vif | |
73 CC="$CC" \ | |
74 CFLAGS="$CFLAGS" \ | |
75 LDFLAGS="$LDFLAGS" \ | |
76 LIBS="$LIBS" \ | |
77 ./configure \ | |
78 --build=$CBUILD \ | |
79 --host=$CHOST \ | |
80 --prefix=/usr \ | |
81 --docdir=/usr/share/doc/$PKGNAME \ | |
82 --with-html-dir=/usr/share/doc/$PKGNAME/html \ | |
83 --with-html-subdir="" \ | |
84 --disable-static \ | |
85 --enable-shared \ | |
86 $with_icu \ | |
87 $with_lzma \ | |
88 $with_python \ | |
89 $with_zlib | |
90 make | |
91 make \ | |
92 DESTDIR=$DESTDIR \ | |
93 DOC_MODULE=$PKGNAME \ | |
94 docsdir=/usr/share/doc/$PKGNAME/python \ | |
95 install | |
96 rm -f $DESTDIR/usr/lib/libxml2.la | |
97 | |
98 popd | |
99 rm -rf $PKGNAME-$PKGVERSION | |
100 } |