diff options
author | wiz <wiz@pkgsrc.org> | 2015-12-11 14:24:35 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2015-12-11 14:24:35 +0000 |
commit | 7ef75ab24ecc6963ade74b94ad4ce18d8ebe2442 (patch) | |
tree | 3d66db8d76b2c248db615a6656cab221235ae7f6 /textproc | |
parent | 1ba0ac70eb8efa6031b50ea1e4071d4baafe1b89 (diff) | |
download | pkgsrc-7ef75ab24ecc6963ade74b94ad4ce18d8ebe2442.tar.gz |
OpenBSD will remove man page symlinks and let man(1) find them via
a database.
Adapt code for that case using a patch from Ingo Schwarze.
Bump version.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/mdoclint/Makefile | 4 | ||||
-rwxr-xr-x | textproc/mdoclint/files/mdoclint | 20 |
2 files changed, 16 insertions, 8 deletions
diff --git a/textproc/mdoclint/Makefile b/textproc/mdoclint/Makefile index 0bc08a3abfd..51adfd9098f 100644 --- a/textproc/mdoclint/Makefile +++ b/textproc/mdoclint/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.44 2015/12/02 17:31:24 wiz Exp $ +# $NetBSD: Makefile,v 1.45 2015/12/11 14:24:35 wiz Exp $ -DISTNAME= mdoclint-1.34 +DISTNAME= mdoclint-1.35 CATEGORIES= textproc MASTER_SITES= # none DISTFILES= # none diff --git a/textproc/mdoclint/files/mdoclint b/textproc/mdoclint/files/mdoclint index 866ebd64672..9dcca8d2612 100755 --- a/textproc/mdoclint/files/mdoclint +++ b/textproc/mdoclint/files/mdoclint @@ -1,7 +1,7 @@ #!@PERL5@ # # $OpenBSD: mdoclint,v 1.42 2014/03/18 22:36:30 miod Exp $ -# $NetBSD: mdoclint,v 1.53 2015/12/02 17:31:24 wiz Exp $ +# $NetBSD: mdoclint,v 1.54 2015/12/11 14:24:35 wiz Exp $ # # Copyright (c) 2001-2013 Thomas Klausner # All rights reserved. @@ -273,11 +273,19 @@ sub verify_xref $self->warning("Xref to itself (use .Nm instead)") if $opt_x; } # try to find corresponding man page - for my $dir ("/usr/share/man", - OPENBSD ? "/usr/X11R6/man" : "/usr/X11R7/man") { - for my $a ("", $arch) { - for my $page ("man$section/$a/$page.$section") { - return 1 if -f "$dir/$page"; + if (OPENBSD) { + open my $saveout, '>&', STDOUT; + open STDOUT, '>', '/dev/null'; + my $irc = system 'man', '-M', '/usr/share/man:/usr/X11R6/man', + '-s', $section, '-f', $page; + open STDOUT, '>&', $saveout; + return 1 unless $irc; + } else { + for my $dir ('/usr/share/man', '/usr/X11R7/man') { + for my $a ('', $arch) { + for my $page ("man$section/$a/$page.$section") { + return 1 if -f "$dir/$page"; + } } } } |