qi: remove adding the depends.order into the meta file
[dragora.git] / recipes / devel / flex / recipe
blob4cd955c82b905af89ce29c3dcb0cb86571462733
1 # Build recipe for flex.
3 # Copyright (c) 2015-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=flex
18 version=2.6.4
19 release=1
21 tarname=${program}-${version}.tar.lz
23 # Remote source(s)
24 fetch=http://github.com/westes/flex/releases/download/v${version}/$tarname
26 description="
27 The fast lexical analyser generator.
29 Flex is a fast lexical analyser generator.  It is a tool for
30 generating programs that perform pattern-matching on text.
33 homepage=http://flex.sourceforge.net
34 license=Custom
36 # Source documentation.
38 # The documentation files are installed by Flex.
40 docsdir="${docdir}/${program}-${version}"
42 build()
44     set -e
46     unpack "${tardir}/$tarname"
48     cd "$srcdir"
50     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
51      $configure_args \
52      --libdir=/usr/lib${libSuffix} \
53      --infodir=$infodir \
54      --mandir=$mandir \
55      --docdir=$docsdir \
56      --enable-static \
57      --enable-shared \
58      --enable-nls \
59      --build="$(cc -dumpmachine)"
61     make -j${jobs}
62     make -j${jobs} DESTDIR="$destdir" install-strip
64     # Compress info documents deleting index file for the package
65     if test -d "${destdir}/$infodir"
66     then
67         rm -f "${destdir}/${infodir}/dir"
68         lzip -9 "${destdir}/${infodir}"/*
69     fi
71     # Compress man pages
72     lzip -9 "${destdir}/${mandir}"/man?/*
74     # Provide compatibility with flex's predecessor, lex
75     if test -f "${worktree}/archive/flex/usr/bin/lex"
76     then
77         cp -f "${worktree}/archive/flex/usr/bin/lex" \
78               "${destdir}/usr/bin"
79         chmod 755 "${destdir}/usr/bin/lex"
81         ln -sf libfl.a "${destdir}/usr/lib${libSuffix}/libl.a"
82     fi