Wednesday, December 12, 2018

Re: [FIX] textproc/txt2man

> bash whines too (though does accept it), I think the below diff is
> what was meant.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/textproc/txt2man/Makefile,v
> retrieving revision 1.3
> diff -u -p -r1.3 Makefile
> --- Makefile 11 Jan 2016 11:04:22 -0000 1.3
> +++ Makefile 12 Dec 2018 21:24:18 -0000
> @@ -2,7 +2,7 @@
>
> COMMENT = convert ASCII text to man page
> DISTNAME = txt2man-1.5.6
> -REVISION = 1
> +REVISION = 2
> CATEGORIES = textproc
> HOMEPAGE = http://mvertes.free.fr/
>
> Index: patches/patch-bookman
> ===================================================================
> RCS file: /cvs/ports/textproc/txt2man/patches/patch-bookman,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-bookman
> --- patches/patch-bookman 25 Mar 2015 11:11:37 -0000 1.1
> +++ patches/patch-bookman 12 Dec 2018 21:24:18 -0000
> @@ -2,8 +2,21 @@ $OpenBSD: patch-bookman,v 1.1 2015/03/25
>
> GNUism.
>
> ---- bookman.orig Fri Feb 18 19:12:35 2011
> -+++ bookman Wed Mar 25 10:51:04 2015
> +Index: bookman
> +--- bookman.orig
> ++++ bookman
> +@@ -83,9 +83,9 @@ done
> + shift $(($OPTIND - 1))
> + date=${date:-$(date +'%d %B %Y')}
> +
> +-[[ $1 ]] || set -- $(while read; do echo $REPLY; done)
> ++[[ -n $1 ]] || set -- $(while read; do echo $REPLY; done)
> +
> +-[[ $outfile ]] && post="$post >$outfile"
> ++[[ -n $outfile ]] && post="$post >$outfile"
> +
> + {
> + # Compute table of content from postscript output.
> @@ -127,7 +127,7 @@ date=${date:-$(date +'%d %B %Y')}
> name = $0
> }
>

I would favor this solution over mine, as it is more elegant and avoids
adding an unnecessary dependency. The diff you provided appears to work
correctly on my machine.

No comments:

Post a Comment