logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

mandoc-1.14.5-r1.ebuild (1774B)


  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit multilib toolchain-funcs
  5. DESCRIPTION="Suite of tools compiling mdoc and man"
  6. HOMEPAGE="https://mandoc.bsd.lv/"
  7. SRC_URI="https://mandoc.bsd.lv/snapshots/${P}.tar.gz"
  8. LICENSE="ISC"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~arm64 ~x86"
  11. IUSE="static"
  12. LIB_DEPEND="sys-libs/zlib[static-libs(+)]"
  13. RDEPEND="
  14. !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
  15. !sys-apps/man-db
  16. !sys-apps/man
  17. "
  18. DEPEND="${RDEPEND}
  19. static? ( ${LIB_DEPEND} )"
  20. PATCHES=(
  21. "$FILESDIR"/mandoc-1.14.5-fix-tbl-null-pointer.patch
  22. "$FILESDIR"/mandoc_configure.patch
  23. )
  24. src_prepare() {
  25. default
  26. # The db-install change is to support parallel installs.
  27. sed -i \
  28. -e '/ar rs/s:ar:$(AR):' \
  29. -e '/^db-install:/s:$: base-install:' \
  30. Makefile || die
  31. # Bump Note: Remove -fcommon, fixed in [1] but doesn't applies cleanly
  32. # and it looks like no one did the rebasing work.
  33. # 1: https://inbox.vuxu.org/mandoc-source/490dd254e5b643b9@mandoc.bsd.lv/
  34. cat <<-EOF > "configure.local"
  35. PREFIX="${EPREFIX}/usr"
  36. BINDIR="${EPREFIX}/usr/bin"
  37. SBINDIR="${EPREFIX}/usr/sbin"
  38. LIBDIR="${EPREFIX}/usr/$(get_libdir)"
  39. MANDIR="${EPREFIX}/usr/share/man"
  40. INCLUDEDIR="${EPREFIX}/usr/include/mandoc"
  41. EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc"
  42. MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man"
  43. MANM_MAN=mandoc_man
  44. MANM_MDOC=mandoc_mdoc
  45. MANM_ROFF=mandoc_roff
  46. MANM_EQN=mandoc_eqn
  47. MANM_TBL=mandoc_tbl
  48. BINM_SOELIM=msoelim
  49. CFLAGS="${CFLAGS} ${CPPFLAGS} -fcommon"
  50. LDFLAGS="${LDFLAGS} $(usex static -static '')"
  51. AR="$(tc-getAR)"
  52. CC="$(tc-getCC)"
  53. # The STATIC variable is only used by man.cgi.
  54. STATIC=
  55. EOF
  56. }