1 # Build recipe for libxslt.
3 # Copyright (C) 2018-2021 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.gz
30 fetch=http://xmlsoft.org/sources/$tarname
33 XSLT support for libxml2.
35 The libxslt package contains XSLT libraries. These are useful for
36 extending libxml2 libraries in order to support XSLT files.
39 homepage=https://xmlsoft.org
42 docs="AUTHORS ChangeLog Copyright NEWS README TODO"
43 docsdir="${docdir}/${program}-${version}"
45 # The source has a custom directory
46 srcdir="${program}-${version%-*}"
50 unpack "${tardir}/$tarname"
54 # Set sane permissions
55 chmod -R u+w,go-w,a+rX-s .
57 # This increases the recursion limit. This is
58 # needed by some packages for their documentation
59 sed -e 's/3000/5000/' \
60 -i libxslt/transform.c doc/xsltproc.1 doc/xsltproc.xml
62 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
69 --with-python=/usr/bin/python3 \
70 --build="$(gcc -dumpmachine)"
73 make -j${jobs} DESTDIR="$destdir" install-strip
75 # Compress and link man pages (if needed)
76 if test -d "${destdir}/$mandir"
79 cd "${destdir}/$mandir"
80 find . -type f -exec lzip -9 {} +
81 find . -type l | while read -r file
83 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
90 mkdir -p "${destdir}/$docsdir"
91 cp -p $docs "${destdir}/$docsdir"