peg-0.1.13.ebuild 803 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. DESCRIPTION="Recursive-descent parser generators for C"
  5. HOMEPAGE="http://piumarta.com/software/peg/"
  6. SRC_URI="http://piumarta.com/software/${PN}/${PF}.tar.gz"
  7. LICENSE="MIT"
  8. SLOT="0"
  9. KEYWORDS="~amd64 ~x86"
  10. IUSE="test"
  11. # FIXME: tests don't respect {C,LD}FLAGS and build stuff in runtime.
  12. RESTRICT="test"
  13. DEPEND=""
  14. RDEPEND="${DEPEND}"
  15. src_prepare() {
  16. sed -i \
  17. -e '/strip/d' \
  18. -e '/^CFLAGS/d' \
  19. -e 's/$(CFLAGS)/$(CFLAGS) $(LDFLAGS)/g' \
  20. Makefile || die "sed failed"
  21. }
  22. src_install() {
  23. mkdir -p "${D}/usr/bin" || die "mkdir failed"
  24. emake ROOT="${D}" PREFIX="/usr" install
  25. rm -rf "${D}/usr/man" || die "rm failed"
  26. doman src/${PN}.1
  27. }
  28. src_test() {
  29. emake check
  30. emake test
  31. }