diff options
author | wiz <wiz> | 2013-10-11 14:45:18 +0000 |
---|---|---|
committer | wiz <wiz> | 2013-10-11 14:45:18 +0000 |
commit | f8c4b4c8e8537e7ab466501bff05ee12f24310fa (patch) | |
tree | 3b336ee569f4f93a089e53f74b4d4331070308a0 /textproc/mdocml | |
parent | 0b3c2b380981b246d00f33d9a6d98c20732a7f97 (diff) | |
download | pkgsrc-f8c4b4c8e8537e7ab466501bff05ee12f24310fa.tar.gz |
Fix build on SunOS. Parts of the patches from Ingo Schwarze.
Diffstat (limited to 'textproc/mdocml')
-rw-r--r-- | textproc/mdocml/Makefile | 9 | ||||
-rw-r--r-- | textproc/mdocml/distinfo | 12 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-Makefile | 6 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-apropos__db.c | 6 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-catman.c | 15 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-cgi.c | 90 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-config.h.post | 4 | ||||
-rw-r--r-- | textproc/mdocml/patches/patch-mandocdb.c | 6 |
8 files changed, 134 insertions, 14 deletions
diff --git a/textproc/mdocml/Makefile b/textproc/mdocml/Makefile index 24dc0e28c45..c893a7db1b9 100644 --- a/textproc/mdocml/Makefile +++ b/textproc/mdocml/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2013/10/05 14:48:15 wiz Exp $ +# $NetBSD: Makefile,v 1.38 2013/10/11 14:45:18 wiz Exp $ DISTNAME= mdocml-1.12.2 CATEGORIES= textproc devel @@ -19,5 +19,12 @@ 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' +.include "../../mk/bsd.fast.prefs.mk" + +# Solaris 10 and newer do not support static binaries +.if ${OPSYS} == "SunOS" +MAKE_FLAGS+= STATIC= +.endif + .include "../../mk/bdb.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/textproc/mdocml/distinfo b/textproc/mdocml/distinfo index fd73dfc557e..7c17e5a51a4 100644 --- a/textproc/mdocml/distinfo +++ b/textproc/mdocml/distinfo @@ -1,11 +1,13 @@ -$NetBSD: distinfo,v 1.29 2013/10/06 15:48:42 wiz Exp $ +$NetBSD: distinfo,v 1.30 2013/10/11 14:45:18 wiz Exp $ SHA1 (mdocml-1.12.2.tar.gz) = 6a86cc4f373bcc51aa8bf1a7499db368e977a166 RMD160 (mdocml-1.12.2.tar.gz) = 8fcd1b9dd20b3a2eee9412d210e1b994c9ae7c17 Size (mdocml-1.12.2.tar.gz) = 286400 bytes -SHA1 (patch-Makefile) = 30ae6393f1af5995735fb98c9bbfa53f22cdc0a8 -SHA1 (patch-apropos__db.c) = fa26351e17a465dd1b89854903f3c04408440d47 -SHA1 (patch-config.h.post) = 23b57b1c20e02733a12acbe7a62c5113cc245ecd -SHA1 (patch-mandocdb.c) = 6c376bff856ab48f16721e589e71ce7b981a802b +SHA1 (patch-Makefile) = 569fdf24dff306c6c7222a3807e99d9ae1bb0ce6 +SHA1 (patch-apropos__db.c) = 74ec4c549c2a093f9d5090209f89c16bebc3a749 +SHA1 (patch-catman.c) = c7738a6c1089963b83556cafc6bdca2735d28c48 +SHA1 (patch-cgi.c) = 2eccde5060bbf0479c80f0b4368ebf1950c90c47 +SHA1 (patch-config.h.post) = ff9805110e590e19a65bf9a6130e1b086893cfb0 +SHA1 (patch-mandocdb.c) = 88ab5ceb2db1f108c9a4d8f6c3a23718b2ad05ce SHA1 (patch-preconv.1) = 92787c58f451e1d247a25bbe136f188bf42e4c73 SHA1 (patch-roff.7) = a8daeae7e8e6c0117d499fb0c4a848d724b29b3e diff --git a/textproc/mdocml/patches/patch-Makefile b/textproc/mdocml/patches/patch-Makefile index 0aa08937b28..2425f5049a1 100644 --- a/textproc/mdocml/patches/patch-Makefile +++ b/textproc/mdocml/patches/patch-Makefile @@ -1,10 +1,10 @@ -$NetBSD: patch-Makefile,v 1.5 2013/10/05 14:48:15 wiz Exp $ +$NetBSD: patch-Makefile,v 1.6 2013/10/11 14:45:18 wiz Exp $ Install preconv and roff with 'mandoc-' prefix to avoid conflict with groff. ---- Makefile.orig 2013-09-29 23:34:34.000000000 +0000 +--- Makefile.orig 2013-10-05 14:09:07.000000000 +0000 +++ Makefile -@@ -321,12 +321,15 @@ install: all +@@ -322,12 +322,15 @@ install: all mkdir -p $(DESTDIR)$(MANDIR)/man1 mkdir -p $(DESTDIR)$(MANDIR)/man3 mkdir -p $(DESTDIR)$(MANDIR)/man7 diff --git a/textproc/mdocml/patches/patch-apropos__db.c b/textproc/mdocml/patches/patch-apropos__db.c index dc9d86a6b31..15a940b5183 100644 --- a/textproc/mdocml/patches/patch-apropos__db.c +++ b/textproc/mdocml/patches/patch-apropos__db.c @@ -1,4 +1,6 @@ -$NetBSD: patch-apropos__db.c,v 1.1 2013/10/06 15:48:42 wiz Exp $ +$NetBSD: patch-apropos__db.c,v 1.2 2013/10/11 14:45:18 wiz Exp $ + +SunOS fix. --- apropos_db.c.orig 2013-10-05 14:09:07.000000000 +0000 +++ apropos_db.c @@ -21,7 +23,7 @@ $NetBSD: patch-apropos__db.c,v 1.1 2013/10/06 15:48:42 wiz Exp $ # include <sys/endian.h> +#endif + -+#if defined(__linux__) ++#if defined(__linux__) || defined(__sun) +# include <db_185.h> +#else # include <db.h> diff --git a/textproc/mdocml/patches/patch-catman.c b/textproc/mdocml/patches/patch-catman.c new file mode 100644 index 00000000000..d6031463de4 --- /dev/null +++ b/textproc/mdocml/patches/patch-catman.c @@ -0,0 +1,15 @@ +$NetBSD: patch-catman.c,v 1.1 2013/10/11 14:45:18 wiz Exp $ + +SunOS fix. + +--- catman.c.orig 2013-10-05 14:09:07.000000000 +0000 ++++ catman.c +@@ -31,7 +31,7 @@ + #include <string.h> + #include <unistd.h> + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__sun) + # include <db_185.h> + #else + # include <db.h> diff --git a/textproc/mdocml/patches/patch-cgi.c b/textproc/mdocml/patches/patch-cgi.c new file mode 100644 index 00000000000..55ec52f721c --- /dev/null +++ b/textproc/mdocml/patches/patch-cgi.c @@ -0,0 +1,90 @@ +$NetBSD: patch-cgi.c,v 1.1 2013/10/11 14:45:18 wiz Exp $ + +SunOS fix. + +--- cgi.c.orig 2013-10-05 14:09:07.000000000 +0000 ++++ cgi.c +@@ -33,6 +33,12 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#if defined(__sun) ++/* for stat() */ ++#include <fcntl.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#endif + + #include "apropos_db.h" + #include "mandoc.h" +@@ -42,7 +48,7 @@ + #include "manpath.h" + #include "mandocdb.h" + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__sun) + # include <db_185.h> + #else + # include <db.h> +@@ -1097,11 +1103,20 @@ static int + pathstop(DIR *dir) + { + struct dirent *d; ++#if defined(__sun) ++ struct stat sb; ++#endif + +- while (NULL != (d = readdir(dir))) ++ while (NULL != (d = readdir(dir))) { ++#if defined(__sun) ++ stat(d->d_name, &sb); ++ if (S_IFREG & sb.st_mode) ++#else + if (DT_REG == d->d_type) ++#endif + if (0 == strcmp(d->d_name, "catman.conf")) + return(1); ++ } + + return(0); + } +@@ -1118,6 +1133,9 @@ pathgen(DIR *dir, char *path, struct req + DIR *cd; + int rc; + size_t sz, ssz; ++#if defined(__sun) ++ struct stat sb; ++#endif + + sz = strlcat(path, "/", PATH_MAX); + if (sz >= PATH_MAX) { +@@ -1133,7 +1151,13 @@ pathgen(DIR *dir, char *path, struct req + + rc = 0; + while (0 == rc && NULL != (d = readdir(dir))) { +- if (DT_DIR != d->d_type || strcmp(d->d_name, "etc")) ++#if defined(__sun) ++ stat(d->d_name, &sb); ++ if (!(S_IFDIR & sb.st_mode) ++#else ++ if (DT_DIR != d->d_type ++#endif ++ || strcmp(d->d_name, "etc")) + continue; + + path[(int)sz] = '\0'; +@@ -1182,7 +1206,13 @@ pathgen(DIR *dir, char *path, struct req + + rewinddir(dir); + while (NULL != (d = readdir(dir))) { +- if (DT_DIR != d->d_type || '.' == d->d_name[0]) ++#if defined(__sun) ++ stat(d->d_name, &sb); ++ if (!(S_IFDIR & sb.st_mode) ++#else ++ if (DT_DIR != d->d_type ++#endif ++ || '.' == d->d_name[0]) + continue; + + path[(int)sz] = '\0'; diff --git a/textproc/mdocml/patches/patch-config.h.post b/textproc/mdocml/patches/patch-config.h.post index 94dea5991fb..23d4cc353fd 100644 --- a/textproc/mdocml/patches/patch-config.h.post +++ b/textproc/mdocml/patches/patch-config.h.post @@ -1,4 +1,6 @@ -$NetBSD: patch-config.h.post,v 1.1 2013/10/06 15:48:42 wiz Exp $ +$NetBSD: patch-config.h.post,v 1.2 2013/10/11 14:45:18 wiz Exp $ + +SunOS fix. --- config.h.post.orig 2013-10-05 14:09:07.000000000 +0000 +++ config.h.post diff --git a/textproc/mdocml/patches/patch-mandocdb.c b/textproc/mdocml/patches/patch-mandocdb.c index e615528bc0c..1023190f08e 100644 --- a/textproc/mdocml/patches/patch-mandocdb.c +++ b/textproc/mdocml/patches/patch-mandocdb.c @@ -1,4 +1,6 @@ -$NetBSD: patch-mandocdb.c,v 1.4 2013/10/06 15:48:42 wiz Exp $ +$NetBSD: patch-mandocdb.c,v 1.5 2013/10/11 14:45:18 wiz Exp $ + +SunOS fix. --- mandocdb.c.orig 2013-10-05 14:09:07.000000000 +0000 +++ mandocdb.c @@ -25,7 +27,7 @@ $NetBSD: patch-mandocdb.c,v 1.4 2013/10/06 15:48:42 wiz Exp $ -#if defined(__sun) -#include <sys/stat.h> -+#if defined(__linux__) ++#if defined(__linux__) || defined(__sun) +# include <db_185.h> +#else +# include <db.h> |