bmake-20161126.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. MK_VER=20151111
  6. DESCRIPTION="NetBSD's portable make"
  7. HOMEPAGE="http://www.crufty.net/help/sjg/bmake.html"
  8. SRC_URI="http://void.crufty.net/ftp/pub/sjg/${P}.tar.gz
  9. http://void.crufty.net/ftp/pub/sjg/mk-${MK_VER}.tar.gz"
  10. LICENSE="BSD"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~ppc ~x86"
  13. IUSE=""
  14. DEPEND=""
  15. RDEPEND=""
  16. S="${WORKDIR}/${PN}"
  17. src_configure() {
  18. econf \
  19. --with-mksrc=../mk \
  20. --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \
  21. --with-machine_arch=${ARCH}
  22. }
  23. src_compile() {
  24. sh make-bootstrap.sh || die "bootstrap failed"
  25. }
  26. src_test() {
  27. cd unit-tests
  28. LC_ALL=C env -u A ${S}/bmake -r -m . > test.out 2>&1 \
  29. || die "tests compilation failed"
  30. sed -i \
  31. -e "s:${S}/::g" \
  32. -e "s:bmake\\[.\\]:make:g" \
  33. -e "s:unit-tests/::g" \
  34. test.out || die "Fixing values failed"
  35. diff -u test.exp test.out
  36. [[ $(diff -u test.exp test.out |wc -l) -gt 0 ]] && die "tests differ"
  37. }
  38. src_install() {
  39. dobin ${PN}
  40. newman ${PN}.cat1 ${PN}.1
  41. FORCE_BSD_MK=1 SYS_MK_DIR=. \
  42. sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \
  43. || die "failed to install mk files"
  44. }