summaryrefslogtreecommitdiff
path: root/textproc/mdocml
diff options
context:
space:
mode:
authortez <tez>2014-01-06 17:43:50 +0000
committertez <tez>2014-01-06 17:43:50 +0000
commit6f980abe1fa7e02fbfac6454dc680c2981f71953 (patch)
treea81e65eb9ecb96e72f9f1454d3be10a250f36b7d /textproc/mdocml
parentaca9fc0ff106f0745fd476c999c4a64c20abb12d (diff)
downloadpkgsrc-6f980abe1fa7e02fbfac6454dc680c2981f71953.tar.gz
Solaris, Mingw32 & OS X prior to 10.7 are missing strnlen, so provide an
implementation. Sent request for similar fix upstream.
Diffstat (limited to 'textproc/mdocml')
-rw-r--r--textproc/mdocml/Makefile3
-rw-r--r--textproc/mdocml/distinfo3
-rw-r--r--textproc/mdocml/patches/patch-mdoc_validate.c32
3 files changed, 36 insertions, 2 deletions
diff --git a/textproc/mdocml/Makefile b/textproc/mdocml/Makefile
index 476107cc07c..f8df0ab8966 100644
--- a/textproc/mdocml/Makefile
+++ b/textproc/mdocml/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.41 2013/12/31 11:06:29 wiz Exp $
+# $NetBSD: Makefile,v 1.42 2014/01/06 17:43:50 tez Exp $
DISTNAME= mdocml-1.12.3
+PKGREVISION= 1
CATEGORIES= textproc devel
MASTER_SITES= http://mdocml.bsd.lv/snapshots/
diff --git a/textproc/mdocml/distinfo b/textproc/mdocml/distinfo
index 675eb2a5271..314ef63bc77 100644
--- a/textproc/mdocml/distinfo
+++ b/textproc/mdocml/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.32 2013/12/31 11:06:29 wiz Exp $
+$NetBSD: distinfo,v 1.33 2014/01/06 17:43:50 tez Exp $
SHA1 (mdocml-1.12.3.tar.gz) = 6a74b4e4b54a20b8022f05236e2294ad2915e5d7
RMD160 (mdocml-1.12.3.tar.gz) = 0a9a717ddf9d32c4ce1be8e51659932c5ccf2b8b
Size (mdocml-1.12.3.tar.gz) = 292544 bytes
SHA1 (patch-Makefile) = 569fdf24dff306c6c7222a3807e99d9ae1bb0ce6
SHA1 (patch-apropos__db.c) = efde1e020c84307e8549cf8b3e25668023fb4d34
+SHA1 (patch-mdoc_validate.c) = 270d754613fa4f1e079cc047593d1eb05c9fc7a9
SHA1 (patch-preconv.1) = 92787c58f451e1d247a25bbe136f188bf42e4c73
SHA1 (patch-roff.7) = 9b6033b5ec92c8e8c827fe79aff30228f7c2fc2f
diff --git a/textproc/mdocml/patches/patch-mdoc_validate.c b/textproc/mdocml/patches/patch-mdoc_validate.c
new file mode 100644
index 00000000000..bd79d422568
--- /dev/null
+++ b/textproc/mdocml/patches/patch-mdoc_validate.c
@@ -0,0 +1,32 @@
+$NetBSD: patch-mdoc_validate.c,v 1.1 2014/01/06 17:43:50 tez Exp $
+
+Solaris, Mingw32 & OS X prior to 10.7 are missing strnlen
+
+
+--- mdoc_validate.c.orig Mon Jan 6 10:25:04 2014
++++ mdoc_validate.c Mon Jan 6 10:36:31 2014
+@@ -1863,6 +1863,15 @@
+ return(1);
+ }
+
++#if defined(__MINGW32__) ||defined(__sun) || defined(__APPLE__)
++static size_t p_strnlen(const char *s, size_t maxlen) {
++ const char *end = memchr(s, 0, maxlen);
++ return end ? (size_t)(end - s) : maxlen;
++}
++#else
++ # define p_strnlen strnlen
++#endif
++
+ /*
+ * For some arguments of some macros,
+ * convert all breakable hyphens into ASCII_HYPH.
+@@ -1893,7 +1902,7 @@
+ if (MDOC_TEXT != nch->type)
+ continue;
+ cp = nch->string;
+- if (3 > strnlen(cp, 3))
++ if (3 > p_strnlen(cp, 3))
+ continue;
+ while ('\0' != *(++cp))
+ if ('-' == *cp &&