pmake-1.111.3.1.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils toolchain-funcs versionator
  5. MY_P="${PN}-$(get_version_component_range 1-2)"
  6. DEBIAN_SOURCE="${PN}_$(get_version_component_range 1-2).orig.tar.gz"
  7. DEBIAN_PATCH="${PN}_$(replace_version_separator 2 '-').debian.tar.gz"
  8. DESCRIPTION="BSD build tool to create programs in parallel. Debian's version of NetBSD's make"
  9. HOMEPAGE="http://www.netbsd.org/"
  10. SRC_URI="mirror://debian/pool/main/p/pmake/${DEBIAN_SOURCE}
  11. mirror://debian/pool/main/p/pmake/${DEBIAN_PATCH}"
  12. LICENSE="BSD"
  13. SLOT="0"
  14. KEYWORDS="alpha amd64 arm ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
  15. IUSE=""
  16. RDEPEND=""
  17. DEPEND=""
  18. S="${WORKDIR}/${PN}"
  19. src_prepare() {
  20. EPATCH_FORCE="yes" \
  21. EPATCH_OPTS="-g0 -E --no-backup-if-mismatch -p1" \
  22. EPATCH_SUFFIX="diff" \
  23. epatch "${WORKDIR}/debian/patches"
  24. # pmake makes the assumption that . and .. are the first two
  25. # entries in a directory, which doesn't always appear to be the
  26. # case on ext3... (05 Apr 2004 agriffis)
  27. epatch "${FILESDIR}/${PN}-1.98-skipdots.patch"
  28. # Don't ignore ldflags
  29. epatch "${FILESDIR}/${PN}-1.111.1-ldflags.patch"
  30. }
  31. src_compile() {
  32. # The following CFLAGS are almost directly from Red Hat 8.0 and
  33. # debian/rules, so assume it's okay to void out the __COPYRIGHT
  34. # and __RCSID. I've checked the source and don't see the point,
  35. # but whatever... (07 Feb 2004 agriffis)
  36. CFLAGS="${CFLAGS} -Wall -Wno-unused -D_GNU_SOURCE \
  37. -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_SETENV \
  38. -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -I. \
  39. -DMACHINE=\\\"gentoo\\\" -DMACHINE_ARCH=\\\"$(tc-arch-kernel)\\\" \
  40. -D_PATH_DEFSHELLDIR=\\\"${EPREFIX}/bin\\\" \
  41. -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk\\\" \
  42. -DHAVE_VSNPRINTF"
  43. if [[ "${USERLAND}" == "GNU" ]]; then
  44. CFLAGS="${CFLAGS} -D_PATH_DEFSYSPATH=\\\"${EPREFIX}/usr/share/mk/${PN}\\\""
  45. fi
  46. emake -f Makefile.boot \
  47. CC="$(tc-getCC)" \
  48. CFLAGS="${CFLAGS}"
  49. }
  50. src_install() {
  51. # Don't install these on BSD, else they conflict
  52. if [[ "${USERLAND}" == "GNU" ]]; then
  53. insinto /usr/share/mk/${PN}
  54. doins mk/*
  55. fi
  56. newbin bmake pmake
  57. dobin mkdep
  58. mv make.1 pmake.1
  59. doman mkdep.1 pmake.1
  60. dodoc PSD.doc/tutorial.ms
  61. if [[ "${USERLAND}" == "BSD" ]]; then
  62. dosym pmake /usr/bin/make
  63. dosym pmake.1.gz /usr/share/man/man1/make.1.gz
  64. fi
  65. }