fuse4bsd-0.3.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit portability toolchain-funcs eutils flag-o-matic
  4. DESCRIPTION="Fuse for FreeBSD"
  5. HOMEPAGE="http://fuse4bsd.creo.hu/"
  6. # -sbin is needed for getmntopts.c, hardcoding 6.2 is nasty but can't think of
  7. # any better solution right now
  8. SRC_URI="http://fuse4bsd.creo.hu/downloads/${P}.tar.gz
  9. mirror://gentoo/freebsd-sbin-6.2.tar.bz2"
  10. LICENSE="BSD"
  11. SLOT="0"
  12. KEYWORDS="~x86-fbsd"
  13. IUSE=""
  14. DEPEND=">=sys-freebsd/freebsd-sources-6.2
  15. virtual/pmake"
  16. RDEPEND="sys-fs/fuse"
  17. src_unpack() {
  18. unpack ${A}
  19. cd "${S}"
  20. cp /usr/include/fuse/fuse_kernel.h fuse_module/
  21. cp "${WORKDIR}/sbin/mount/getmntopts.c" mount_fusefs/
  22. epatch "${FILESDIR}"/${P}-gcc4.patch
  23. epatch "${FILESDIR}"/${P}-ports.patch
  24. }
  25. src_compile() {
  26. tc-export CC
  27. $(get_bmake) \
  28. KMODDIR=/boot/modules BINDIR=/usr/sbin MANDIR=/usr/share/man/man \
  29. MOUNT="${WORKDIR}/sbin/mount" LDFLAGS="$(raw-ldflags)" \
  30. || die "$(get_bmake) failed"
  31. }
  32. src_install() {
  33. dodir /boot/modules
  34. $(get_bmake) \
  35. KMODDIR=/boot/modules BINDIR=/usr/sbin MANDIR=/usr/share/man/man \
  36. DESTDIR="${D}" install \
  37. || die "$(get_bmake) failed"
  38. for docdir in ./ ./plaintext_out ./html_chunked_out ./html_aux; do
  39. docinto ${docdir}
  40. dodoc doc/${docdir}/*
  41. done
  42. }