Format groff manuals with groff before installing them
because mandoc(1) doesn't like them, with the exception of groff_mdoc(7), which is derived from the traditional mdoc.samples(7) and which is just fine with mandoc(1). Problem reported and fix tested by <Pascal dot Stumpf at cubes dot de>. naddy@ and deraadt@ agree with the general direction
This commit is contained in:
parent
76973c6fde
commit
25d26710b1
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.13 2011/07/07 05:27:15 schwarze Exp $
|
||||
# $OpenBSD: Makefile,v 1.14 2011/10/12 22:00:07 schwarze Exp $
|
||||
|
||||
COMMENT = GNU troff typesetter
|
||||
DISTNAME = groff-1.21
|
||||
REVISION = 4
|
||||
REVISION = 5
|
||||
|
||||
CATEGORIES = textproc
|
||||
HOMEPAGE = http://www.gnu.org/software/groff/
|
||||
|
60
textproc/groff/patches/patch-Makefile_comm
Normal file
60
textproc/groff/patches/patch-Makefile_comm
Normal file
@ -0,0 +1,60 @@
|
||||
$OpenBSD: patch-Makefile_comm,v 1.1 2011/10/12 22:00:07 schwarze Exp $
|
||||
# Install preformatted manuals
|
||||
# since mandoc(1) does not format the groff manuals well.
|
||||
# But install groff_mdoc(7) as source
|
||||
# because mandoc(1) handles that one better than groff.
|
||||
--- Makefile.comm.orig Fri Dec 31 08:33:08 2010
|
||||
+++ Makefile.comm Tue Oct 11 02:57:44 2011
|
||||
@@ -176,27 +176,44 @@ install_man:
|
||||
-test -d $(DESTDIR)$(man1dir) || $(mkinstalldirs) $(DESTDIR)$(man1dir)
|
||||
@-pages="$(MAN1)"; \
|
||||
for p in $$pages; do \
|
||||
- prog=`basename $$p .n`; \
|
||||
- target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX)$$prog.$(man1ext); \
|
||||
+ p0="$${p%.n}.0"; \
|
||||
+ echo "groff -mandoc -Tascii -P -c $$p > $$p0"; \
|
||||
+ $(top_srcdir)/test-groff -mandoc -Tascii -P -c $$p > $$p0; \
|
||||
+ target=$(DESTDIR)$(man1dir)/$(NAMEPREFIX)$$p0; \
|
||||
rm -f $$target; \
|
||||
- echo $(INSTALL_DATA) $$p $$target; \
|
||||
- $(INSTALL_DATA) $$p $$target; \
|
||||
+ echo $(INSTALL_DATA) $$p0 $$target; \
|
||||
+ $(INSTALL_DATA) $$p0 $$target; \
|
||||
done
|
||||
-test -d $(DESTDIR)$(man5dir) || $(mkinstalldirs) $(DESTDIR)$(man5dir)
|
||||
@-pages="$(MAN5)"; \
|
||||
for p in $$pages; do \
|
||||
- target=$(DESTDIR)$(man5dir)/`basename $$p .n`.$(man5ext); \
|
||||
+ p0="$${p%.n}.0"; \
|
||||
+ echo "groff -mandoc -Tascii -P -c $$p > $$p0"; \
|
||||
+ $(top_srcdir)/test-groff -mandoc -Tascii -P -c $$p > $$p0; \
|
||||
+ target=$(DESTDIR)$(man5dir)/$$p0; \
|
||||
rm -f $$target; \
|
||||
- echo $(INSTALL_DATA) $$p $$target; \
|
||||
- $(INSTALL_DATA) $$p $$target; \
|
||||
+ echo $(INSTALL_DATA) $$p0 $$target; \
|
||||
+ $(INSTALL_DATA) $$p0 $$target; \
|
||||
done
|
||||
-test -d $(DESTDIR)$(man7dir) || $(mkinstalldirs) $(DESTDIR)$(man7dir)
|
||||
@-pages="$(MAN7)"; \
|
||||
for p in $$pages; do \
|
||||
- target=$(DESTDIR)$(man7dir)/`basename $$p .n`.$(man7ext); \
|
||||
+ if [ "X$$p" = "Xgroff_mdoc.n" ]; then \
|
||||
+ mdocdir=$(DESTDIR)$(manroot)/man$(man7ext); \
|
||||
+ test -d $$mdocdir || $(mkinstalldirs) $$mdocdir; \
|
||||
+ target=$$mdocdir/groff_mdoc.7; \
|
||||
rm -f $$target; \
|
||||
echo $(INSTALL_DATA) $$p $$target; \
|
||||
$(INSTALL_DATA) $$p $$target; \
|
||||
+ else \
|
||||
+ p0="$${p%.n}.0"; \
|
||||
+ echo "groff -mandoc -Tascii -P -c $$p > $$p0"; \
|
||||
+ $(top_srcdir)/test-groff -mandoc -Tascii -P -c $$p > $$p0; \
|
||||
+ target=$(DESTDIR)$(man7dir)/$$p0; \
|
||||
+ rm -f $$target; \
|
||||
+ echo $(INSTALL_DATA) $$p0 $$target; \
|
||||
+ $(INSTALL_DATA) $$p0 $$target; \
|
||||
+ fi; \
|
||||
done
|
||||
|
||||
.PHONY: uninstall_man
|
@ -1,11 +1,31 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1 2011/03/19 16:48:53 schwarze Exp $
|
||||
# Do not depend on MAKEOVERRIDES, a GNU make extension that prevents the
|
||||
# recursive passing of command line assignments to sub-makes.
|
||||
$OpenBSD: patch-Makefile_in,v 1.2 2011/10/12 22:00:07 schwarze Exp $
|
||||
# Chunk 1: Install preformatted manuals, not source pages.
|
||||
# Chunk 2: Do not depend on MAKEOVERRIDES, a GNU make extension that
|
||||
# prevents the recursive passing of command line assignments to sub-makes.
|
||||
# Specifically, we must not pass overrides like top_srcdir=...
|
||||
# to the sub-makes called in src/libs/gnulib where those variables
|
||||
# have different values created by the sub-configure there.
|
||||
--- Makefile.in.orig Tue Mar 15 14:42:23 2011
|
||||
+++ Makefile.in Tue Mar 15 14:43:16 2011
|
||||
--- Makefile.in.orig Fri Dec 31 08:33:08 2010
|
||||
+++ Makefile.in Tue Oct 11 01:25:20 2011
|
||||
@@ -247,15 +247,15 @@ manroot=$(mandir)
|
||||
|
||||
# `man1ext' is the man section for user commands.
|
||||
man1ext=1
|
||||
-man1dir=$(manroot)/man$(man1ext)
|
||||
+man1dir=$(manroot)/cat$(man1ext)
|
||||
|
||||
# `man5ext' is the man section for file formats.
|
||||
man5ext=5
|
||||
-man5dir=$(manroot)/man$(man5ext)
|
||||
+man5dir=$(manroot)/cat$(man5ext)
|
||||
|
||||
# `man7ext' is the man section for macros.
|
||||
man7ext=7
|
||||
-man7dir=$(manroot)/man$(man7ext)
|
||||
+man7dir=$(manroot)/cat$(man7ext)
|
||||
|
||||
# The configure script checks whether all necessary utility programs for
|
||||
# grohtml are available -- only then we can build the HTML documentation.
|
||||
@@ -686,7 +686,7 @@ subdir=src/roff/troff
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2011/03/20 17:30:24 schwarze Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.4 2011/10/12 22:00:07 schwarze Exp $
|
||||
@conflict groff-mdoc-*
|
||||
@pkgpath textproc/groff.mdoc
|
||||
@bin bin/addftinfo
|
||||
@ -52,65 +52,65 @@ lib/groff/groffer/perl_test.pl
|
||||
lib/groff/groffer/split_env.sh
|
||||
lib/groff/groffer/version.sh
|
||||
lib/groff/site-tmac/
|
||||
@man man/man1/addftinfo.1
|
||||
@man man/man1/afmtodit.1
|
||||
@man man/man1/chem.1
|
||||
@man man/man1/eqn.1
|
||||
@man man/man1/eqn2graph.1
|
||||
@man man/man1/gdiffmk.1
|
||||
@man man/man1/grap2graph.1
|
||||
@man man/man1/grn.1
|
||||
@man man/man1/grodvi.1
|
||||
@man man/man1/groff.1
|
||||
@man man/man1/groffer.1
|
||||
@man man/man1/grog.1
|
||||
@man man/man1/grohtml.1
|
||||
@man man/man1/grolbp.1
|
||||
@man man/man1/grolj4.1
|
||||
@man man/man1/grops.1
|
||||
@man man/man1/grotty.1
|
||||
@man man/man1/hpftodit.1
|
||||
@man man/man1/indxbib.1
|
||||
@man man/man1/lkbib.1
|
||||
@man man/man1/lookbib.1
|
||||
@man man/man1/mmroff.1
|
||||
@man man/man1/neqn.1
|
||||
@man man/man1/nroff.1
|
||||
@man man/man1/pdfroff.1
|
||||
@man man/man1/pfbtops.1
|
||||
@man man/man1/pic.1
|
||||
@man man/man1/pic2graph.1
|
||||
@man man/man1/preconv.1
|
||||
@man man/man1/refer.1
|
||||
@man man/man1/roff2dvi.1
|
||||
@man man/man1/roff2html.1
|
||||
@man man/man1/roff2pdf.1
|
||||
@man man/man1/roff2ps.1
|
||||
@man man/man1/roff2text.1
|
||||
@man man/man1/roff2x.1
|
||||
@man man/man1/soelim.1
|
||||
@man man/man1/tbl.1
|
||||
@man man/man1/tfmtodit.1
|
||||
@man man/man1/troff.1
|
||||
@man man/man5/groff_font.5
|
||||
@man man/man5/groff_out.5
|
||||
@man man/man5/groff_tmac.5
|
||||
@man man/man5/lj4_font.5
|
||||
@man man/man7/ditroff.7
|
||||
@man man/man7/groff.7
|
||||
@man man/man7/groff_char.7
|
||||
@man man/man7/groff_diff.7
|
||||
@man man/man7/groff_hdtbl.7
|
||||
@man man/man7/groff_man.7
|
||||
@man man/cat1/addftinfo.0
|
||||
@man man/cat1/afmtodit.0
|
||||
@man man/cat1/chem.0
|
||||
@man man/cat1/eqn.0
|
||||
@man man/cat1/eqn2graph.0
|
||||
@man man/cat1/gdiffmk.0
|
||||
@man man/cat1/grap2graph.0
|
||||
@man man/cat1/grn.0
|
||||
@man man/cat1/grodvi.0
|
||||
@man man/cat1/groff.0
|
||||
@man man/cat1/groffer.0
|
||||
@man man/cat1/grog.0
|
||||
@man man/cat1/grohtml.0
|
||||
@man man/cat1/grolbp.0
|
||||
@man man/cat1/grolj4.0
|
||||
@man man/cat1/grops.0
|
||||
@man man/cat1/grotty.0
|
||||
@man man/cat1/hpftodit.0
|
||||
@man man/cat1/indxbib.0
|
||||
@man man/cat1/lkbib.0
|
||||
@man man/cat1/lookbib.0
|
||||
@man man/cat1/mmroff.0
|
||||
@man man/cat1/neqn.0
|
||||
@man man/cat1/nroff.0
|
||||
@man man/cat1/pdfroff.0
|
||||
@man man/cat1/pfbtops.0
|
||||
@man man/cat1/pic.0
|
||||
@man man/cat1/pic2graph.0
|
||||
@man man/cat1/preconv.0
|
||||
@man man/cat1/refer.0
|
||||
@man man/cat1/roff2dvi.0
|
||||
@man man/cat1/roff2html.0
|
||||
@man man/cat1/roff2pdf.0
|
||||
@man man/cat1/roff2ps.0
|
||||
@man man/cat1/roff2text.0
|
||||
@man man/cat1/roff2x.0
|
||||
@man man/cat1/soelim.0
|
||||
@man man/cat1/tbl.0
|
||||
@man man/cat1/tfmtodit.0
|
||||
@man man/cat1/troff.0
|
||||
@man man/cat5/groff_font.0
|
||||
@man man/cat5/groff_out.0
|
||||
@man man/cat5/groff_tmac.0
|
||||
@man man/cat5/lj4_font.0
|
||||
@man man/cat7/ditroff.0
|
||||
@man man/cat7/groff.0
|
||||
@man man/cat7/groff_char.0
|
||||
@man man/cat7/groff_diff.0
|
||||
@man man/cat7/groff_hdtbl.0
|
||||
@man man/cat7/groff_man.0
|
||||
@man man/cat7/groff_me.0
|
||||
@man man/cat7/groff_mm.0
|
||||
@man man/cat7/groff_mmse.0
|
||||
@man man/cat7/groff_mom.0
|
||||
@man man/cat7/groff_ms.0
|
||||
@man man/cat7/groff_trace.0
|
||||
@man man/cat7/groff_www.0
|
||||
@man man/cat7/roff.0
|
||||
@man man/man7/groff_mdoc.7
|
||||
@man man/man7/groff_me.7
|
||||
@man man/man7/groff_mm.7
|
||||
@man man/man7/groff_mmse.7
|
||||
@man man/man7/groff_mom.7
|
||||
@man man/man7/groff_ms.7
|
||||
@man man/man7/groff_trace.7
|
||||
@man man/man7/groff_www.7
|
||||
@man man/man7/roff.7
|
||||
share/doc/groff/
|
||||
share/doc/groff/html/
|
||||
share/doc/groff/html/mom/
|
||||
|
Loading…
Reference in New Issue
Block a user