bmake-20170201.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. S="${WORKDIR}/${PN}"
  14. src_configure() {
  15. econf \
  16. --with-mksrc=../mk \
  17. --with-default-sys-path="${EPREFIX}"/usr/share/mk/${PN} \
  18. --with-machine_arch=${ARCH}
  19. }
  20. src_compile() {
  21. sh make-bootstrap.sh || die "bootstrap failed"
  22. }
  23. src_test() {
  24. cd unit-tests || die
  25. LC_ALL=C env -u A ${S}/bmake -r -m . > test.out 2>&1 \
  26. || die "tests compilation failed"
  27. sed -i \
  28. -e "s:${S}/::g" \
  29. -e "s:bmake\\[.\\]:make:g" \
  30. -e "s:unit-tests/::g" \
  31. test.out || die "Fixing values failed"
  32. diff -u test.exp test.out
  33. [[ $(diff -u test.exp test.out |wc -l) -gt 0 ]] && die "tests differ"
  34. }
  35. src_install() {
  36. dobin "${PN}"
  37. doman "${PN}.1"
  38. FORCE_BSD_MK=1 SYS_MK_DIR=. \
  39. sh ../mk/install-mk -v -m 644 "${ED}"/usr/share/mk/${PN} \
  40. || die "failed to install mk files"
  41. }