From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 2ff71326; for ; Wed, 21 Jan 2015 17:42:20 -0500 (EST) Date: Wed, 21 Jan 2015 17:42:20 -0500 (EST) Message-Id: <13528922471925430310.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Support homebrew-style linking on Mac OS X. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Support homebrew-style linking on Mac OS X. Idea found together with Alexis Hildebrandt . Modified Files: -------------- mdocml: configure configure.local.example mandocdb.c Revision Data ------------- Index: mandocdb.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mandocdb.c,v retrieving revision 1.183 retrieving revision 1.184 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.183 -r1.184 --- mandocdb.c +++ mandocdb.c @@ -613,7 +613,11 @@ treescan(void) say(path, "&realpath"); continue; } - if (strstr(buf, basedir) != buf) { + if (strstr(buf, basedir) != buf +#ifdef HOMEBREWDIR + && strstr(buf, HOMEBREWDIR) != buf +#endif + ) { if (warnings) say("", "%s: outside base directory", buf); continue; @@ -818,6 +822,10 @@ filescan(const char *file) start = buf; else if (strstr(buf, basedir) == buf) start = buf + strlen(basedir); +#ifdef HOMEBREWDIR + else if (strstr(buf, HOMEBREWDIR) == buf) + start = buf; +#endif else { exitcode = (int)MANDOCLEVEL_BADARG; say("", "%s: outside base directory", buf); Index: configure.local.example =================================================================== RCS file: /home/cvs/mdocml/mdocml/configure.local.example,v retrieving revision 1.2 retrieving revision 1.3 diff -Lconfigure.local.example -Lconfigure.local.example -u -p -r1.2 -r1.3 --- configure.local.example +++ configure.local.example @@ -1,6 +1,6 @@ # $Id$ # -# Copyright (c) 2014 Ingo Schwarze +# Copyright (c) 2014, 2015 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -152,6 +152,14 @@ BINM_APROPOS=mapropos # default is "apr BINM_MAN=mman # default is "man" BINM_WHATIS=mwhatis # default is "whatis" BINM_MAKEWHATIS=mandocdb # default is "makewhatis" + +# When using the "homebrew" package manager on Mac OS X, the actual +# manuals are located in a so-called "cellar" and only symlinked +# into the manual trees. To allow mandoc to follow such symlinks, +# you have to specify the physical location of the cellar as returned +# by realpath(3), for example: + +HOMEBREWDIR=/Cellar # --- user settings related man.cgi ------------------------------------ Index: configure =================================================================== RCS file: /home/cvs/mdocml/mdocml/configure,v retrieving revision 1.17 retrieving revision 1.18 diff -Lconfigure -Lconfigure -u -p -r1.17 -r1.18 --- configure +++ configure @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2014 Ingo Schwarze +# Copyright (c) 2014, 2015 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -70,6 +70,7 @@ INCLUDEDIR= LIBDIR= MANDIR= EXAMPLEDIR= +HOMEBREWDIR= WWWPREFIX="/var/www" HTDOCDIR= @@ -276,6 +277,7 @@ __HEREDOC__ echo echo "#define VERSION \"${VERSION}\"" [ -n "${OSNAME}" ] && echo "#define OSNAME \"${OSNAME}\"" +[ -n "${HOMEBREWDIR}" ] && echo "#define HOMEBREWDIR \"${HOMEBREWDIR}\"" cat << __HEREDOC__ #define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN} -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv