logo

overlay

My own overlay for experimentations, use with caution, no support is provided
commit: 8973d8666c64516cae44d2c6d19d941811135b1f
parent: 8b3fe0e64321e010c8b0746be5d0bb3f2623d105
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon,  1 Jun 2020 14:33:23 +0200

app-text/mandoc: Fix configure and tbl-null

Diffstat:

Aapp-text/mandoc/files/mandoc-1.14.5-fix-tbl-null-pointer.patch27+++++++++++++++++++++++++++
Aapp-text/mandoc/files/mandoc_configure.patch12++++++++++++
Aapp-text/mandoc/mandoc-1.14.5-r1.ebuild63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dapp-text/mandoc/mandoc-1.14.5.ebuild58----------------------------------------------------------
4 files changed, 102 insertions(+), 58 deletions(-)

diff --git a/app-text/mandoc/files/mandoc-1.14.5-fix-tbl-null-pointer.patch b/app-text/mandoc/files/mandoc-1.14.5-fix-tbl-null-pointer.patch @@ -0,0 +1,27 @@ +=================================================================== +RCS file: /cvs/mandoc/tbl_term.c,v +retrieving revision 1.69 +retrieving revision 1.70 +diff -u -p -r1.69 -r1.70 +--- a/tbl_term.c 2019/03/16 21:35:48 1.69 ++++ b/tbl_term.c 2019/03/18 08:00:34 1.70 +@@ -629,7 +629,8 @@ tbl_hrule(struct termp *tp, const struct tbl_span *spp + + lw = cpp == NULL || cpn == NULL || + (cpn->pos != TBL_CELL_DOWN && +- (dpn == NULL || strcmp(dpn->string, "\\^") != 0)) ++ (dpn == NULL || dpn->string == NULL || ++ strcmp(dpn->string, "\\^") != 0)) + ? hw : 0; + tbl_direct_border(tp, BHORIZ * lw, + col->width + col->spacing / 2); +@@ -675,7 +676,8 @@ tbl_hrule(struct termp *tp, const struct tbl_span *spp + + rw = cpp == NULL || cpn == NULL || + (cpn->pos != TBL_CELL_DOWN && +- (dpn == NULL || strcmp(dpn->string, "\\^") != 0)) ++ (dpn == NULL || dpn->string == NULL || ++ strcmp(dpn->string, "\\^") != 0)) + ? hw : 0; + + /* The line crossing at the end of this column. */ diff --git a/app-text/mandoc/files/mandoc_configure.patch b/app-text/mandoc/files/mandoc_configure.patch @@ -0,0 +1,12 @@ +diff -Naur a/configure b/configure +--- a/configure ++++ b/configure +@@ -41,7 +41,7 @@ + OSNAME= + UTF8_LOCALE= + +-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -` ++CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i PATH="${PATH}" make -sf -` + CFLAGS= + LDADD= + LDFLAGS= diff --git a/app-text/mandoc/mandoc-1.14.5-r1.ebuild b/app-text/mandoc/mandoc-1.14.5-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit multilib toolchain-funcs + +DESCRIPTION="Suite of tools compiling mdoc and man" +HOMEPAGE="https://mandoc.bsd.lv/" +SRC_URI="https://mandoc.bsd.lv/snapshots/${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static" + +LIB_DEPEND="sys-libs/zlib[static-libs(+)]" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + !sys-apps/man-db + !sys-apps/man +" +DEPEND="${RDEPEND} + static? ( ${LIB_DEPEND} )" + +PATCHES=( + "$FILESDIR"/mandoc-1.14.5-fix-tbl-null-pointer.patch + "$FILESDIR"/mandoc_configure.patch +) + +src_prepare() { + default + + # The db-install change is to support parallel installs. + sed -i \ + -e '/ar rs/s:ar:$(AR):' \ + -e '/^db-install:/s:$: base-install:' \ + Makefile || die + + cat <<-EOF > "configure.local" + PREFIX="${EPREFIX}/usr" + BINDIR="${EPREFIX}/usr/bin" + SBINDIR="${EPREFIX}/usr/sbin" + LIBDIR="${EPREFIX}/usr/$(get_libdir)" + MANDIR="${EPREFIX}/usr/share/man" + INCLUDEDIR="${EPREFIX}/usr/include/mandoc" + EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc" + MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man" + + MANM_MAN=mandoc_man + MANM_MDOC=mandoc_mdoc + MANM_ROFF=mandoc_roff + MANM_EQN=mandoc_eqn + MANM_TBL=mandoc_tbl + BINM_SOELIM=msoelim + CFLAGS="${CFLAGS} ${CPPFLAGS}" + LDFLAGS="${LDFLAGS} $(usex static -static '')" + AR="$(tc-getAR)" + CC="$(tc-getCC)" + # The STATIC variable is only used by man.cgi. + STATIC= + EOF +} diff --git a/app-text/mandoc/mandoc-1.14.5.ebuild b/app-text/mandoc/mandoc-1.14.5.ebuild @@ -1,58 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit multilib toolchain-funcs - -DESCRIPTION="Suite of tools compiling mdoc and man" -HOMEPAGE="https://mandoc.bsd.lv/" -SRC_URI="https://mandoc.bsd.lv/snapshots/${P}.tar.gz" - -LICENSE="ISC" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="static" - -LIB_DEPEND="sys-libs/zlib[static-libs(+)]" -RDEPEND=" - !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) - !sys-apps/man-db - !sys-apps/man -" -DEPEND="${RDEPEND} - static? ( ${LIB_DEPEND} )" - -src_prepare() { - default - - # The db-install change is to support parallel installs. - sed -i \ - -e '/ar rs/s:ar:$(AR):' \ - -e '/^db-install:/s:$: base-install:' \ - Makefile || die - - cat <<-EOF > "configure.local" - PREFIX="${EPREFIX}/usr" - BINDIR="${EPREFIX}/usr/bin" - SBINDIR="${EPREFIX}/usr/sbin" - LIBDIR="${EPREFIX}/usr/$(get_libdir)" - MANDIR="${EPREFIX}/usr/share/man" - INCLUDEDIR="${EPREFIX}/usr/include/mandoc" - EXAMPLEDIR="${EPREFIX}/usr/share/examples/mandoc" - MANPATH_DEFAULT="${EPREFIX}/usr/man:${EPREFIX}/usr/share/man:${EPREFIX}/usr/local/man:${EPREFIX}/usr/local/share/man" - - MANM_MAN=mandoc_man - MANM_MDOC=mandoc_mdoc - MANM_ROFF=mandoc_roff - MANM_EQN=mandoc_eqn - MANM_TBL=mandoc_tbl - BINM_SOELIM=msoelim - CFLAGS="${CFLAGS} ${CPPFLAGS}" - LDFLAGS="${LDFLAGS} $(usex static -static '')" - AR="$(tc-getAR)" - CC="$(tc-getCC)" - # The STATIC variable is only used by man.cgi. - STATIC= - EOF -}