recipes: libs/pcre: reconfigured with --enable-jit
[dragora.git] / recipes / libs / pcre / recipe
blob83ca3a52e966b7d9c56ec1bb3e513eb168572cae
1 # Build recipe for pcre.
3 # Copyright (c) 2016-2017 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 program=pcre
18 version=8.41
19 release=1
21 tarname=${program}-${version}.tar.bz2
23 # Remote source(s)
24 fetch=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$tarname
26 description="
27 Perl-compatible regular expressions.
29 The PCRE library is a set of functions that implement regular
30 expression pattern matching using the same syntax and semantics
31 as Perl, with just a few differences.
34 homepage=http://www.pcre.org
35 license=BSD
37 # Source documentation
38 docsdir="${docdir}/${program}-${version}"
40 build()
42     set -e
44     unpack "${tardir}/$tarname"
46     cd "$srcdir"
48     ./configure \
49     CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
50      $configure_args \
51      --libdir=/usr/lib${libSuffix} \
52      --infodir=$infodir \
53      --mandir=$mandir \
54      --docdir=$docsdir \
55      --enable-jit \
56      --enable-unicode-properties \
57      --enable-pcretest-libreadline \
58      --enable-pcregrep-libz \
59      --enable-pcregrep-libbz2 \
60      --build="$(cc -dumpmachine)"
62     make -j${jobs} V=1
63     make -j${jobs} DESTDIR="$destdir" install
65     # Compress info documents deleting index file for the package
66     if test -d "${destdir}/$infodir"
67     then
68         rm -f "${destdir}/${infodir}/dir"
69         lzip -9 "${destdir}/${infodir}"/*
70     fi
72     # Compress and link man pages (if needed)
73     if test -d "${destdir}/$mandir"
74     then
75         (
76             cd "${destdir}/$mandir"
77             find . -type f -exec lzip -9 '{}' +
78             find . -type l | while read -r file
79             do
80                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
81                 rm -- "$file"
82             done
83         )
84     fi