bison_3.8.2.bb 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. SUMMARY = "GNU Project parser generator (yacc replacement)"
  2. DESCRIPTION = "Bison is a general-purpose parser generator that converts an annotated context-free grammar into \
  3. an LALR(1) or GLR parser for that grammar. Bison is upward compatible with Yacc: all properly-written Yacc \
  4. grammars ought to work with Bison with no change. Anyone familiar with Yacc should be able to use Bison with \
  5. little trouble."
  6. HOMEPAGE = "http://www.gnu.org/software/bison/"
  7. LICENSE = "GPL-3.0-only"
  8. LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
  9. SECTION = "devel"
  10. DEPENDS = "bison-native flex-native"
  11. SRC_URI = "${GNU_MIRROR}/bison/bison-${PV}.tar.xz \
  12. file://autoconf-2.73.patch \
  13. file://add-with-bisonlocaledir.patch \
  14. "
  15. SRC_URI[sha256sum] = "9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2"
  16. inherit autotools gettext texinfo
  17. # No point in hardcoding path to m4, just use PATH
  18. CACHED_CONFIGUREVARS = "ac_cv_path_M4=m4"
  19. PACKAGECONFIG ??= "readline ${@ 'textstyle' if d.getVar('USE_NLS') == 'yes' else ''}"
  20. PACKAGECONFIG:class-native ??= ""
  21. # Make readline and textstyle optional. There are recipie for these, but leave them
  22. # disabled for the native recipe. This prevents host contamination of the native tool.
  23. PACKAGECONFIG[readline] = "--with-libreadline-prefix,--without-libreadline-prefix,readline"
  24. PACKAGECONFIG[textstyle] = "--with-libtextstyle-prefix,--without-libtextstyle-prefix,gettext"
  25. # Include the cached configure variables, configure is really good at finding
  26. # libreadline, even if we don't want it.
  27. CACHED_CONFIGUREVARS += "${@bb.utils.contains('PACKAGECONFIG', 'readline', '', ' \
  28. ac_cv_header_readline_history_h=no \
  29. ac_cv_header_readline_readline_h=no \
  30. gl_cv_lib_readline=no', d)} \
  31. ${@bb.utils.contains('PACKAGECONFIG', 'textstyle', '', ' \
  32. ac_cv_libtextstyle=no', d)}"
  33. # The automatic m4 path detection gets confused, so force the right value
  34. acpaths = "-I ./m4"
  35. do_compile:prepend() {
  36. for i in mfcalc calc++ rpcalc; do mkdir -p ${B}/examples/$i; done
  37. }
  38. do_install:append:class-native() {
  39. create_wrapper ${D}/${bindir}/bison \
  40. BISON_PKGDATADIR=${STAGING_DATADIR_NATIVE}/bison
  41. }
  42. do_install:append:class-nativesdk() {
  43. create_wrapper ${D}/${bindir}/bison \
  44. BISON_PKGDATADIR=${datadir}/bison
  45. }
  46. BBCLASSEXTEND = "native nativesdk"