Commits

Rainer Müller authored e72ae70f859
man: add missing patchfile after d320be8

See: https://trac.macports.org/ticket/52464
No tags

sysutils/man/files/PR11291804-xcode.diff

Added
1 +Upstream: https://opensource.apple.com/source/man/man-16/patches/PR11291804-xcode.diff
2 +
3 +The header file "xcselect.h" referenced in the original patch is not available
4 +in the OS X SDK. The local modification in this patch provide the necessary
5 +declarations as implied by the context and put them right into this file.
6 +--- src/manpath.c.orig 2005-08-20 16:26:06.000000000 -0700
7 ++++ src/manpath.c 2012-10-17 13:05:56.000000000 -0700
8 +@@ -26,6 +26,15 @@
9 + #include <unistd.h>
10 + #include <sys/types.h>
11 + #include <sys/stat.h>
12 ++#ifdef __APPLE__
13 ++#include <stdbool.h>
14 ++//#include <xcselect.h>
15 ++typedef struct xcselect_manpaths xcselect_manpaths;
16 ++xcselect_manpaths *xcselect_get_manpaths(char *sdkname);
17 ++unsigned int xcselect_manpaths_get_num_paths(xcselect_manpaths *xcp);
18 ++const char *xcselect_manpaths_get_path(xcselect_manpaths *xcp, unsigned i);
19 ++void xcselect_manpaths_free(xcselect_manpaths *xcp);
20 ++#endif /* __APPLE__ */
21 +
22 + /* not always in <string.h> */
23 + extern char *index(const char *, int);
24 +@@ -372,6 +381,25 @@
25 + for (dlp = cfdirlist.nxt; dlp; dlp = dlp->nxt)
26 + if (dlp->mandatory)
27 + add_to_mandirlist (dlp->mandir, perrs);
28 ++
29 ++#ifdef __APPLE__
30 ++ xcselect_manpaths *xcp;
31 ++ const char *path;
32 ++ unsigned i, count;
33 ++
34 ++ // TODO: pass something for sdkname
35 ++ xcp = xcselect_get_manpaths(NULL);
36 ++ if (xcp != NULL) {
37 ++ count = xcselect_manpaths_get_num_paths(xcp);
38 ++ for (i = 0; i < count; i++) {
39 ++ path = xcselect_manpaths_get_path(xcp, i);
40 ++ if (path != NULL) {
41 ++ add_to_mandirlist((char *)path, perrs);
42 ++ }
43 ++ }
44 ++ xcselect_manpaths_free(xcp);
45 ++ }
46 ++#endif /* __APPLE__ */
47 + }
48 +
49 + static void

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut