1 # Build recipe for bison.
3 # Copyright (c) 2015-2019 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.
21 # Define hash tag to categorize the package name output
24 tarname=${program}-${version}.tar.gz
27 fetch=http://ftp.gnu.org/gnu/bison/$tarname
32 Bison is a general-purpose parser generator that converts an annotated
33 context-free grammar into a deterministic LR or generalized LR (GLR)
34 parser employing LALR(1) parser tables. As an experimental feature,
35 bison can also generate IELR(1) or canonical LR(1) parser tables.
36 Once you are proficient with Bison, you can use it to develop a wide
37 range of language parsers, from those used in simple desk calculators
38 to complex programming languages.
41 homepage=http://www.gnu.org/software/bison
44 # Source documentation
46 # The documentation files are installed by Bison.
48 #docs="AUTHORS COPYING ChangeLog NEWS README* THANKS TODO"
49 docsdir="${docdir}/${program}-${version}"
55 unpack "${tardir}/$tarname"
59 # Set sane permissions
60 chmod -R u+w,go-w,a+rX-s .
62 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
64 --libdir=/usr/lib${libSuffix} \
67 --enable-threads=posix \
69 --build="$(cc -dumpmachine)"
72 make -j1 install DESTDIR="$destdir"
74 # Delete generated charset.alias
75 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
77 # Compress info documents deleting index file for the package
78 if test -d "${destdir}/$infodir"
80 rm -f "${destdir}/${infodir}/dir"
81 lzip -9 "${destdir}/${infodir}"/*
85 if test -d "${destdir}/$mandir"
87 lzip -9 "${destdir}/${mandir}"/man?/*