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 <stdio.h>
+
+#define HAVE_FGETLN
+#define HAVE_STRPTIME
+#define HAVE_GETSUBOPT
+#define HAVE_STRLCAT
+#define HAVE_MMAP
+#define HAVE_STRLCPY
+
+#include <sys/types.h>
+
+#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 <bsd.lib.mk>

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 <bsd.prog.mk>
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to