diff options
author | fredb <fredb> | 2001-03-20 05:27:10 +0000 |
---|---|---|
committer | fredb <fredb> | 2001-03-20 05:27:10 +0000 |
commit | ae3b1f938ab3515a9df8d53e6b13b71796fb4802 (patch) | |
tree | 71b612e3bbea6e2c00d6d92b2e358479f3922cb5 /x11/kdebase | |
parent | cfb4b82f571f06a696a98b85f846a8fd7bbc86d7 (diff) | |
download | pkgsrc-ae3b1f938ab3515a9df8d53e6b13b71796fb4802.tar.gz |
Grok NetBSD-style ${MACHINE_ARCH} subdirs in man path. Choose defaults
more suitably for NetBSD when ${MANPATH} is not set: include /usr/X11R6/man
and /usr/pkg/man.
Diffstat (limited to 'x11/kdebase')
-rw-r--r-- | x11/kdebase/files/patch-sum | 4 | ||||
-rw-r--r-- | x11/kdebase/patches/patch-bc | 94 |
2 files changed, 93 insertions, 5 deletions
diff --git a/x11/kdebase/files/patch-sum b/x11/kdebase/files/patch-sum index 054d36083d7..2ba836e8830 100644 --- a/x11/kdebase/files/patch-sum +++ b/x11/kdebase/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.23 2001/03/20 00:20:41 fredb Exp $ +$NetBSD: patch-sum,v 1.24 2001/03/20 05:27:10 fredb Exp $ SHA1 (patch-aa) = f5cbf17ad7cc49613fa0377995b2922da6166148 SHA1 (patch-ab) = f34c3a13e01ed2ba49beef268a4d42d6dc5e8b78 @@ -28,4 +28,4 @@ SHA1 (patch-ay) = b2385fd02d45e5944475c1ea4252164fc6a0ccf6 SHA1 (patch-az) = 9481308f531f879e9e33d60258b816342ba8e22d SHA1 (patch-ba) = 2620a4ff27f8de77e6de7b9b2924eba296d13f56 SHA1 (patch-bb) = 37e1e7e134dbf48181fbbaabb0fbd2567428ac52 -SHA1 (patch-bc) = e539a26ce68c39e19ba4389e6d5f8602ca6b3698 +SHA1 (patch-bc) = fed9a64984dca746faf024f57b7efff7a8f514fb diff --git a/x11/kdebase/patches/patch-bc b/x11/kdebase/patches/patch-bc index 31f322dfc78..0af1f40bcf4 100644 --- a/x11/kdebase/patches/patch-bc +++ b/x11/kdebase/patches/patch-bc @@ -1,8 +1,96 @@ -$NetBSD: patch-bc,v 1.1 2001/03/20 00:20:41 fredb Exp $ +$NetBSD: patch-bc,v 1.2 2001/03/20 05:27:10 fredb Exp $ --- kdehelp/man.cpp.orig Thu Aug 19 14:32:11 1999 -+++ kdehelp/man.cpp -@@ -475,8 +475,12 @@ ++++ kdehelp/man.cpp Mon Mar 19 23:18:51 2001 +@@ -20,6 +20,9 @@ + #include "man.h" + #include "error.h" + #include <errno.h> ++#ifdef __NetBSD__ ++#include <sys/param.h> ++#endif + + #include "dbnew.h" + +@@ -171,11 +174,15 @@ + } + else + { +-#ifndef __FreeBSD__ +- searchPath[numPaths++] = StrDup("/usr/man"); +-#else ++#ifdef __FreeBSD__ + searchPath[numPaths++] = StrDup(_PATH_MAN); + searchPath[numPaths++] = StrDup("/usr/X11R6/man"); ++#else ++ searchPath[numPaths++] = StrDup("/usr/man"); ++#ifdef __NetBSD__ ++ searchPath[numPaths++] = StrDup("/usr/X11R6/man"); ++ searchPath[numPaths++] = StrDup("/usr/pkg/man"); ++#endif + #endif + searchPath[numPaths++] = StrDup("/usr/local/man"); + } +@@ -271,10 +278,18 @@ + // + void cManSection::ReadDir(const char *dirName ) + { ++#ifdef __NetBSD__ ++ DIR *dir, *subdir; ++#else + DIR *dir; ++#endif + struct dirent *dirEntry; + char *ptr; ++#ifdef __NetBSD__ ++ char buffer[256], subdirName[256]; ++#else + char buffer[256]; ++#endif + + // cout << klocale->translate("Reading Dir: ") << dirName << endl; + +@@ -287,6 +302,39 @@ + if ( dirEntry->d_name[0] == '.' ) + continue; + ++#ifdef __NetBSD__ ++ if ( !strcmp( dirEntry->d_name, MACHINE_ARCH ) ) ++ { ++ sprintf( subdirName, "%s/%s", dirName, MACHINE_ARCH ); ++ subdir = opendir(subdirName); ++ if ( subdir ) ++ { ++ while ( (dirEntry = readdir(subdir)) ) ++ { ++ if ( dirEntry->d_name[0] == '.' ) ++ continue; ++ ++ strcpy( buffer, dirEntry->d_name ); ++ ++ ptr = strrchr( buffer, '.' ); ++ if ( !strcmp(ptr, ".gz") || !strcmp(ptr, ".Z") || ++ !strcmp(ptr,".bz2") ) // skip compress extn ++ { ++ *ptr = '\0'; ++ ptr = strrchr( buffer, '.' ); ++ } ++ if (ptr) ++ { ++ *ptr = '\0'; ++ AddPage( buffer ); ++ } ++ } ++ closedir(subdir); ++ } ++ continue; ++ } ++#endif /* __NetBSD__ */ ++ + strcpy( buffer, dirEntry->d_name ); + + ptr = strrchr( buffer, '.' ); +@@ -475,8 +523,12 @@ sprintf(errFile, "%s/khelpXXXXXX", _PATH_TMP); // temp file mktemp(errFile); |