proot-5.0.0.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. MY_PN="PRoot"
  5. inherit eutils toolchain-funcs
  6. DESCRIPTION="User-space implementation of chroot, mount --bind, and binfmt_misc"
  7. HOMEPAGE="http://proot.me"
  8. SRC_URI="https://github.com/cedric-vincent/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="care test"
  13. RDEPEND="care? ( app-arch/libarchive:0= )
  14. sys-libs/talloc"
  15. DEPEND="${RDEPEND}
  16. care? ( dev-libs/uthash )
  17. test? ( dev-util/valgrind )"
  18. # Breaks sandbox
  19. RESTRICT="test"
  20. S="${WORKDIR}/${MY_PN}-${PV}"
  21. src_prepare() {
  22. epatch "${FILESDIR}/${PN}-3.2.1-makefile.patch" \
  23. "${FILESDIR}/${PN}-2.3.1-lib-paths-fix.patch"
  24. epatch_user
  25. }
  26. src_compile() {
  27. # build the proot and care targets
  28. emake -C src V=1 \
  29. CC="$(tc-getCC)" \
  30. CHECK_VERSION="true" \
  31. CAREBUILDENV="ok" \
  32. proot $(use care && echo "care")
  33. }
  34. src_install() {
  35. if use care; then
  36. dobin src/care
  37. dodoc doc/care/*.txt
  38. fi
  39. dobin src/proot
  40. newman doc/proot/man.1 proot.1
  41. dodoc doc/proot/*.txt
  42. dodoc -r doc/articles
  43. }
  44. src_test() {
  45. emake -C tests -j1 CC="$(tc-getCC)"
  46. }
  47. pkg_postinst() {
  48. if use care; then
  49. elog "You have enabled 'care' USE flag, that builds and installs"
  50. elog "dynamically linked care binary."
  51. elog "Upstream does NOT support such way of building CARE,"
  52. elog "it provides only prebuilt binaries."
  53. elog "CARE also has known problems on hardened systems"
  54. elog "Please do NOT file bugs about them to https://bugs.gentoo.org"
  55. fi
  56. }