1 # Build recipe for libxml2.
3 # Copyright (C) 2018, MMPG <mmpg@vp.pl>
4 # Copyright (C) 2018-2019 Matias Fonzo <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/libs"
25 tarname=${program}-${version}.tar.gz
28 fetch=http://xmlsoft.org/sources/$tarname
31 A XML C parser library and toolkit.
33 XML itself is a meta language to design markup languages. HTML is the
34 most well-known markup language. Though the library is written in C,
35 a variety of language bindings make it available in other environments.
38 homepage=http://xmlsoft.org
41 docs="AUTHORS ChangeLog Copyright NEWS README TODO"
42 docsdir="${docdir}/${program}-${version}"
44 # The source has a custom directory
45 srcdir="${program}-${version%-*}"
50 unpack "${tardir}/$tarname"
54 # Set sane permissions
55 chmod -R u+w,go-w,a+rX-s .
57 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
59 --libdir=/usr/lib${libSuffix} \
64 --with-python=/usr/bin/python3 \
68 --build="$(cc -dumpmachine)" \
69 ac_cv_path_XSLTPROC=/usr/bin/xsltproc \
70 ac_cv_func_isnan=yes \
74 make -j${jobs} DESTDIR="$destdir" install-strip
76 # Move python2 documentation directory to be accorded
77 # with the "libxml2_python2" package
78 mv "${destdir}${docdir}/libxml2-python-${version}" \
79 "${destdir}${docdir}/libxml2_python2-${version}"
81 # Compress and link man pages (if needed)
82 if test -d "${destdir}/$mandir"
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 '{}' +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96 mkdir -p "${destdir}${docsdir}"
97 cp -p $docs "${destdir}${docsdir}"