recipe 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Build recipe for bison.
  2. #
  3. # Copyright (c) 2015-2019 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. program=bison
  17. version=3.4.2
  18. release=2
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/devel"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. fetch=http://ftp.gnu.org/gnu/bison/$tarname
  24. description="
  25. GNU parser generator.
  26. Bison is a general-purpose parser generator that converts an annotated
  27. context-free grammar into a deterministic LR or generalized LR (GLR)
  28. parser employing LALR(1) parser tables. As an experimental feature,
  29. bison can also generate IELR(1) or canonical LR(1) parser tables.
  30. Once you are proficient with Bison, you can use it to develop a wide
  31. range of language parsers, from those used in simple desk calculators
  32. to complex programming languages.
  33. "
  34. homepage=http://www.gnu.org/software/bison
  35. license=GPLv3+
  36. # Source documentation
  37. #
  38. # The documentation files are installed by Bison.
  39. #
  40. #docs="AUTHORS COPYING ChangeLog NEWS README* THANKS TODO"
  41. docsdir="${docdir}/${program}-${version}"
  42. build()
  43. {
  44. set -e
  45. unpack "${tardir}/$tarname"
  46. cd "$srcdir"
  47. # Set sane permissions
  48. chmod -R u+w,go-w,a+rX-s .
  49. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  50. $configure_args \
  51. --libdir=/usr/lib${libSuffix} \
  52. --infodir=$infodir \
  53. --docdir=$docsdir \
  54. --enable-threads=posix \
  55. --enable-nls \
  56. --build="$(cc -dumpmachine)"
  57. make -j${jobs} V=1
  58. make -j1 install DESTDIR="$destdir"
  59. # Delete generated charset.alias
  60. rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
  61. # Compress info documents deleting index file for the package
  62. if test -d "${destdir}/$infodir"
  63. then
  64. rm -f "${destdir}/${infodir}/dir"
  65. lzip -9 "${destdir}/${infodir}"/*
  66. fi
  67. # Compress man pages
  68. if test -d "${destdir}/$mandir"
  69. then
  70. lzip -9 "${destdir}/${mandir}"/man?/*
  71. fi
  72. }