summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
Diffstat (limited to 'textproc')
-rw-r--r--textproc/mandoc/DESCR13
-rw-r--r--textproc/mandoc/Makefile51
-rw-r--r--textproc/mandoc/PLIST23
-rw-r--r--textproc/mandoc/distinfo8
-rw-r--r--textproc/mandoc/patches/patch-configure15
-rw-r--r--textproc/mandoc/patches/patch-roff.719
6 files changed, 129 insertions, 0 deletions
diff --git a/textproc/mandoc/DESCR b/textproc/mandoc/DESCR
new file mode 100644
index 00000000000..6857ad719a7
--- /dev/null
+++ b/textproc/mandoc/DESCR
@@ -0,0 +1,13 @@
+The mandoc manual page parser and formatter contains:
+ * complete validating parsers for the mdoc and man languages
+ * a slightly incomplete parser handling most of the tbl language
+ * a very incomplete parser handling a part of the eqn language
+ * support for a few selected roff requests that often occur in manuals
+ * complete ASCII, UTF8, HTML and XHTML text output formatters
+ * simple PostScript and PDF output formatters
+ * output formatters producing indented mdoc and man parse trees
+
+To format manuals for console display, it can be used as a smaller
+and faster drop-in replacement for nroff -mandoc. Some rare manuals
+using lots of uncommon low-level roff requests may not work with
+mandoc but require a full roff implementation.
diff --git a/textproc/mandoc/Makefile b/textproc/mandoc/Makefile
new file mode 100644
index 00000000000..f496cf5a61d
--- /dev/null
+++ b/textproc/mandoc/Makefile
@@ -0,0 +1,51 @@
+# $NetBSD: Makefile,v 1.1 2017/08/01 15:06:24 wiz Exp $
+
+DISTNAME= mandoc-1.14.2
+CATEGORIES= textproc devel
+MASTER_SITES= http://mdocml.bsd.lv/snapshots/
+
+MAINTAINER= schwarze@usta.de
+HOMEPAGE= http://mdocml.bsd.lv/
+COMMENT= Convert man pages from mdoc, man, and tbl to txt, html, ps, or pdf
+LICENSE= 2-clause-bsd # not exactly, but near enough
+
+HAS_CONFIGURE= yes
+
+WRKSRC= ${WRKDIR}/${DISTNAME:C/rc[0-9]*//}
+
+SUBST_CLASSES+= roff
+SUBST_STAGE.roff= pre-build
+SUBST_FILES.roff= mandoc.1 mandoc.3
+SUBST_FILES.roff+= eqn.7 man.7 mdoc.7 tbl.7
+SUBST_SED.roff= -e 's,Xr roff,Xr mandoc-roff,g'
+
+# test needs perl
+USE_TOOLS+= perl:build
+TEST_TARGET= regress
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+post-extract:
+ ${ECHO} PREFIX=${PREFIX} > ${WRKSRC}/configure.local
+ ${ECHO} MANDIR=${PREFIX}/${PKGMANDIR} >> ${WRKSRC}/configure.local
+ ${ECHO} CFLAGS=\"${CFLAGS:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} LDFLAGS=\"${LDFLAGS:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} LD_SQLITE3=\"${LDFLAGS} -lsqlite3\" >> ${WRKSRC}/configure.local
+ ${ECHO} INSTALL=\"${INSTALL:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} INSTALL_PROGRAM=\"${INSTALL_PROGRAM:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} INSTALL_LIB=\"${INSTALL_DATA:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} INSTALL_MAN=\"${INSTALL_MAN:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} INSTALL_DATA=\"${INSTALL_DATA:Q}\" >> ${WRKSRC}/configure.local
+ ${ECHO} MANM_ROFF="mandoc-roff" >> ${WRKSRC}/configure.local
+ ${ECHO} BINM_SOELIM="msoelim" >> ${WRKSRC}/configure.local
+# Need -lrt for nanosleep(2) on Solaris.
+.if ${OPSYS} == "SunOS"
+ ${ECHO} LDADD=\"-lrt\" >> ${WRKSRC}/configure.local
+.endif
+# Mac OS X and Solaris 10 and newer do not support static binaries.
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS"
+ ${ECHO} STATIC= >> ${WRKSRC}/configure.local
+.endif
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/mandoc/PLIST b/textproc/mandoc/PLIST
new file mode 100644
index 00000000000..14e30a7773a
--- /dev/null
+++ b/textproc/mandoc/PLIST
@@ -0,0 +1,23 @@
+@comment $NetBSD: PLIST,v 1.1 2017/08/01 15:06:24 wiz Exp $
+bin/apropos
+bin/demandoc
+bin/man
+bin/mandoc
+bin/msoelim
+bin/whatis
+man/man1/apropos.1
+man/man1/demandoc.1
+man/man1/man.1
+man/man1/mandoc.1
+man/man1/msoelim.1
+man/man1/whatis.1
+man/man5/man.conf.5
+man/man5/mandoc.db.5
+man/man7/eqn.7
+man/man7/man.7
+man/man7/mandoc-roff.7
+man/man7/mandoc_char.7
+man/man7/mdoc.7
+man/man7/tbl.7
+man/man8/makewhatis.8
+sbin/makewhatis
diff --git a/textproc/mandoc/distinfo b/textproc/mandoc/distinfo
new file mode 100644
index 00000000000..6c0591f520c
--- /dev/null
+++ b/textproc/mandoc/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2017/08/01 15:06:24 wiz Exp $
+
+SHA1 (mandoc-1.14.2.tar.gz) = f0c0398398af88364f56334e93c1b307c5bea7df
+RMD160 (mandoc-1.14.2.tar.gz) = f572c277d8b2eccd7a8bc9f6e1b15ee11626a6ef
+SHA512 (mandoc-1.14.2.tar.gz) = 1691e4552b0417a30a3a546cff651665f8b4b3fbe2357c734546ca29c56eef9c971a6bd88daa170f4697fb50d14048138f4bc6f5ef55aa24a7ac03903d04c868
+Size (mandoc-1.14.2.tar.gz) = 616843 bytes
+SHA1 (patch-configure) = bd53ddf7d98de53bc04dafe6b2dbb1b79e35399e
+SHA1 (patch-roff.7) = a11e2377e034393f4d900d292b094a9e751a6c0a
diff --git a/textproc/mandoc/patches/patch-configure b/textproc/mandoc/patches/patch-configure
new file mode 100644
index 00000000000..64750cee9bd
--- /dev/null
+++ b/textproc/mandoc/patches/patch-configure
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure,v 1.1 2017/08/01 15:06:24 wiz Exp $
+
+Avoid broken CC detection.
+
+--- configure.orig 2017-02-21 00:25:20.000000000 +0000
++++ configure
+@@ -39,7 +39,7 @@ MANPATH_DEFAULT="/usr/share/man:/usr/X11
+ 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 make -sf -`
+ CFLAGS="-g -W -Wall -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings"
+ CFLAGS="${CFLAGS} -Wno-unused-parameter"
+ LDADD=
diff --git a/textproc/mandoc/patches/patch-roff.7 b/textproc/mandoc/patches/patch-roff.7
new file mode 100644
index 00000000000..f926aedd579
--- /dev/null
+++ b/textproc/mandoc/patches/patch-roff.7
@@ -0,0 +1,19 @@
+$NetBSD: patch-roff.7,v 1.1 2017/08/01 15:06:24 wiz Exp $
+
+Install roff with 'mandoc-' prefix to avoid conflict with groff.
+
+--- roff.7.orig 2017-07-20 16:39:59.000000000 +0000
++++ roff.7
+@@ -16,10 +16,10 @@
+ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .\"
+ .Dd $Mdocdate: July 5 2017 $
+-.Dt ROFF 7
++.Dt MANDOC-ROFF 7
+ .Os
+ .Sh NAME
+-.Nm roff
++.Nm mandoc-roff
+ .Nd roff language reference for mandoc
+ .Sh DESCRIPTION
+ The