recipes: Replace 'outdir' with package hash tags
[dragora.git] / recipes / devel / bison / recipe
blob99aeec34155ef74f892870af9c9a15c19af81760
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.
17 program=bison
18 version=3.4.2
19 release=2
21 # Define hash tag to categorize the package name output
22 pkghashtag=devel
24 tarname=${program}-${version}.tar.gz
26 # Remote source(s)
27 fetch=http://ftp.gnu.org/gnu/bison/$tarname
29 description="
30 GNU parser generator.
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
42 license=GPLv3+
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}"
51 build()
53     set -e
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Set sane permissions
60     chmod -R u+w,go-w,a+rX-s .
62     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
63      $configure_args \
64      --libdir=/usr/lib${libSuffix} \
65      --infodir=$infodir \
66      --docdir=$docsdir \
67      --enable-threads=posix \
68      --enable-nls \
69      --build="$(cc -dumpmachine)"
71     make -j${jobs} V=1
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"
79     then
80         rm -f "${destdir}/${infodir}/dir"
81         lzip -9 "${destdir}/${infodir}"/*
82     fi
84     # Compress man pages
85     if test -d "${destdir}/$mandir"
86     then
87         lzip -9 "${destdir}/${mandir}"/man?/*
88     fi