mandoc-1.14.1-r1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. MY_PN="mdocml"
  5. MY_P="${MY_PN}-${PV}"
  6. inherit multilib toolchain-funcs
  7. DESCRIPTION="Suite of tools compiling mdoc and man"
  8. HOMEPAGE="http://mdocml.bsd.lv/"
  9. SRC_URI="http://mdocml.bsd.lv/snapshots/${MY_P}.tar.gz"
  10. LICENSE="ISC"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="sqlite static"
  14. LIB_DEPEND="sys-libs/zlib[static-libs(+)]
  15. sqlite? ( dev-db/sqlite:3[static-libs(+)] )"
  16. RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
  17. DEPEND="${RDEPEND}
  18. static? ( ${LIB_DEPEND} )"
  19. S="${WORKDIR}/${MY_P}"
  20. src_prepare() {
  21. default
  22. # The db-install change is to support parallel installs.
  23. sed -i \
  24. -e '/ar rs/s:ar:$(AR):' \
  25. -e '/^db-install:/s:$: base-install:' \
  26. Makefile || die
  27. cat <<EOF > "configure.local"
  28. PREFIX="${EPREFIX}/usr"
  29. BINDIR="${EPREFIX}/usr/bin"
  30. SBINDIR="${EPREFIX}/usr/sbin"
  31. LIBDIR="${EPREFIX}/usr/$(get_libdir)"
  32. MANDIR="${EPREFIX}/usr/share/man"
  33. INCLUDEDIR="${EPREFIX}/usr/include/mandoc"
  34. EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc"
  35. MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man"
  36. BINM_MAN=mman
  37. BINM_SOELIM=msoelim
  38. BINM_APROPOS=mapropos
  39. BINM_WHATIS=mwhatis
  40. BINM_MAKEWHATIS=mmakewhatis
  41. MANM_MAN=mandoc_man
  42. MANM_MDOC=mandoc_mdoc
  43. MANM_ROFF=mandoc_roff
  44. MANM_EQN=mandoc_eqn
  45. MANM_TBL=mandoc_tbl
  46. MANM_MANCONF=mman.conf
  47. HAVE_SQLITE3="$(usex sqlite 1 0)"
  48. CFLAGS="${CFLAGS} ${CPPFLAGS}"
  49. LDFLAGS="${LDFLAGS} $(usex static -static '')"
  50. AR="$(tc-getAR)"
  51. CC="$(tc-getCC)"
  52. # The STATIC variable is only used by man.cgi.
  53. STATIC=
  54. EOF
  55. }