From owner-svn-src-head@FreeBSD.ORG Fri Oct 19 22:21:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B51CDA90; Fri, 19 Oct 2012 22:21:02 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9145B8FC08; Fri, 19 Oct 2012 22:21:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9JML21s088826; Fri, 19 Oct 2012 22:21:02 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9JML2Wg088821; Fri, 19 Oct 2012 22:21:02 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201210192221.q9JML2Wg088821@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 19 Oct 2012 22:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241754 - in head: contrib/mdocml etc/mtree lib/libmandoc usr.bin/mandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 22:21:02 -0000 Author: uqs Date: Fri Oct 19 22:21:01 2012 New Revision: 241754 URL: http://svn.freebsd.org/changeset/base/241754 Log: Merge mandoc from vendor into contrib and provide the necessary Makefile glue. It's not yet connected to the build. Added: head/contrib/mdocml/ - copied from r241675, vendor/mdocml/dist/ head/contrib/mdocml/config.h (contents, props changed) head/lib/libmandoc/ head/lib/libmandoc/Makefile (contents, props changed) head/usr.bin/mandoc/ head/usr.bin/mandoc/Makefile (contents, props changed) Deleted: head/contrib/mdocml/Makefile head/contrib/mdocml/TODO head/contrib/mdocml/apropos.1 head/contrib/mdocml/apropos.c head/contrib/mdocml/apropos_db.c head/contrib/mdocml/apropos_db.h head/contrib/mdocml/catman.8 head/contrib/mdocml/catman.c head/contrib/mdocml/cgi.c head/contrib/mdocml/config.h.post head/contrib/mdocml/config.h.pre head/contrib/mdocml/demandoc.1 head/contrib/mdocml/demandoc.c head/contrib/mdocml/index.css head/contrib/mdocml/index.sgml head/contrib/mdocml/man-cgi.css head/contrib/mdocml/man.cgi.7 head/contrib/mdocml/mandocdb.8 head/contrib/mdocml/mandocdb.c head/contrib/mdocml/mandocdb.h head/contrib/mdocml/manpath.c head/contrib/mdocml/manpath.h head/contrib/mdocml/preconv.1 head/contrib/mdocml/preconv.c head/contrib/mdocml/test-fgetln.c head/contrib/mdocml/test-getsubopt.c head/contrib/mdocml/test-mmap.c head/contrib/mdocml/test-strlcat.c head/contrib/mdocml/test-strlcpy.c head/contrib/mdocml/test-strptime.c head/contrib/mdocml/whatis.1 Modified: head/etc/mtree/BSD.usr.dist Added: head/contrib/mdocml/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/mdocml/config.h Fri Oct 19 22:21:01 2012 (r241754) @@ -0,0 +1,58 @@ +#ifndef MANDOC_CONFIG_H +#define MANDOC_CONFIG_H + +#if defined(__linux__) || defined(__MINT__) +# define _GNU_SOURCE /* strptime(), getsubopt() */ +#endif + +#include + +#define HAVE_FGETLN +#define HAVE_STRPTIME +#define HAVE_GETSUBOPT +#define HAVE_STRLCAT +#define HAVE_MMAP +#define HAVE_STRLCPY + +#include + +#if !defined(__BEGIN_DECLS) +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# else +# define __BEGIN_DECLS +# endif +#endif +#if !defined(__END_DECLS) +# ifdef __cplusplus +# define __END_DECLS } +# else +# define __END_DECLS +# endif +#endif + +#if defined(__APPLE__) +# define htobe32(x) OSSwapHostToBigInt32(x) +# define betoh32(x) OSSwapBigToHostInt32(x) +# define htobe64(x) OSSwapHostToBigInt64(x) +# define betoh64(x) OSSwapBigToHostInt64(x) +#elif defined(__linux__) +# define betoh32(x) be32toh(x) +# define betoh64(x) be64toh(x) +#endif + +#ifndef HAVE_STRLCAT +extern size_t strlcat(char *, const char *, size_t); +#endif +#ifndef HAVE_STRLCPY +extern size_t strlcpy(char *, const char *, size_t); +#endif +#ifndef HAVE_GETSUBOPT +extern int getsubopt(char **, char * const *, char **); +extern char *suboptarg; +#endif +#ifndef HAVE_FGETLN +extern char *fgetln(FILE *, size_t *); +#endif + +#endif /* MANDOC_CONFIG_H */ Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Fri Oct 19 22:07:40 2012 (r241753) +++ head/etc/mtree/BSD.usr.dist Fri Oct 19 22:21:01 2012 (r241754) @@ -944,6 +944,8 @@ man9 .. .. + mdocml + .. misc fonts .. Added: head/lib/libmandoc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libmandoc/Makefile Fri Oct 19 22:21:01 2012 (r241754) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml +.PATH: ${MDOCMLDIR} + +LIB= mandoc +#NO_PIC= +INTERNALLIB= +MAN= mandoc.3 +SRCS= arch.c att.c chars.c \ + compat_fgetln.c compat_getsubopt.c compat_strlcat.c compat_strlcpy.c \ + eqn.c lib.c man.c man_hash.c man_macro.c man_validate.c mandoc.c \ + mdoc.c mdoc_argv.c mdoc_hash.c mdoc_macro.c mdoc_validate.c \ + msec.c read.c roff.c st.c \ + tbl.c tbl_data.c tbl_layout.c tbl_opts.c vol.c + +WARNS?= 3 +CFLAGS+= -DHAVE_CONFIG_H -DVERSION="\"1.12.1\"" + +.include Added: head/usr.bin/mandoc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/mandoc/Makefile Fri Oct 19 22:21:01 2012 (r241754) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +MDOCMLDIR= ${.CURDIR}/../../contrib/mdocml +LIBMANDOC= ${.OBJDIR}/../../lib/libmandoc/libmandoc.a +.PATH: ${MDOCMLDIR} + +PROG= mandoc +FILES= example.style.css external.png style.css +FILESDIR= ${SHAREDIR}/mdocml +LINKS= mdocml +MAN= mandoc.1 eqn.7 mandoc_char.7 tbl.7 # man.7 mdoc.7 roff.7 +MLINKS= mandoc.1 mdocml.1 +SRCS= eqn_html.c eqn_term.c html.c main.c man_html.c man_term.c mdoc_html.c \ + mdoc_man.c mdoc_term.c out.c tbl_html.c tbl_term.c term.c \ + term_ascii.c term_ps.c tree.c + +WARNS?= 3 +CFLAGS+= -DHAVE_CONFIG_H -DVERSION="\"1.12.1\"" +DPADD= ${LIBMANDOC} +LDADD= ${LIBMANDOC} + +.include