lpeg-0.12.1.ebuild 801 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit flag-o-matic toolchain-funcs eutils multilib
  5. DESCRIPTION="Parsing Expression Grammars for Lua"
  6. HOMEPAGE="http://www.inf.puc-rio.br/~roberto/lpeg/"
  7. SRC_URI="http://www.inf.puc-rio.br/~roberto/${PN}/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~hppa ~mips ~x86"
  11. IUSE="debug doc"
  12. RDEPEND=">=dev-lang/lua-5.1"
  13. DEPEND="${RDEPEND}
  14. virtual/pkgconfig"
  15. src_prepare() {
  16. epatch "${FILESDIR}"/${P}-makefile.patch
  17. use debug && append-cflags -DLPEG_DEBUG
  18. }
  19. src_compile() {
  20. emake CC="$(tc-getCC)"
  21. }
  22. src_test() {
  23. lua test.lua || die
  24. }
  25. src_install() {
  26. exeinto "$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD lua)"
  27. doexe lpeg.so
  28. dodoc HISTORY
  29. use doc && dohtml *
  30. }