lol

* man-db 2.5.1.

svn path=/nixpkgs/trunk/; revision=10541

+65 -51
+21 -4
pkgs/tools/misc/man/default.nix
··· 1 1 {stdenv, fetchurl, db4, groff}: 2 2 3 3 stdenv.mkDerivation { 4 - name = "man-2.4.3"; 4 + name = "man-db-2.5.1"; 5 + 5 6 src = fetchurl { 6 - url = http://savannah.nongnu.org/download/man-db/man-db-2.4.3.tar.gz; 7 - md5 = "30814a47f209f43b152659ba51fc7937"; 7 + url = http://download.savannah.nongnu.org/releases/man-db/man-db-2.5.1.tar.gz; 8 + sha256 = "178w1fk23ffh8vabj29cn0yyg5ps7bwy1zrrrcsw8aypbh3sfjy3"; 8 9 }; 10 + 9 11 buildInputs = [db4 groff]; 10 - configureFlags = "--disable-setuid"; 12 + 13 + configureFlags = '' 14 + --disable-setuid 15 + --with-nroff=${groff}/bin/nroff 16 + --with-tbl=${groff}/bin/tbl 17 + --with-eqn=${groff}/bin/eqn 18 + --with-neqn=${groff}/bin/neqn 19 + ''; 20 + 21 + troff = "${groff}/bin/troff"; 22 + 11 23 patches = [ 12 24 # Search in "share/man" relative to each path in $PATH (in addition to "man"). 13 25 ./share.patch 14 26 ]; 27 + 28 + meta = { 29 + homepage = http://www.nongnu.org/man-db/; 30 + description = "An implementation of the standard Unix documentation system accessed using the man command"; 31 + }; 15 32 }
+44 -47
pkgs/tools/misc/man/share.patch
··· 1 - diff -rc man-db-2.4.3/src/manp.c man-db-2.4.3-new/src/manp.c 2 - *** man-db-2.4.3/src/manp.c Mon Nov 8 10:06:03 2004 3 - --- man-db-2.4.3-new/src/manp.c Tue Jan 9 17:08:31 2007 1 + diff -rc man-db-2.5.1-orig/src/manp.c man-db-2.5.1/src/manp.c 2 + *** man-db-2.5.1-orig/src/manp.c 2008-01-07 03:23:11.000000000 +0100 3 + --- man-db-2.5.1/src/manp.c 2008-02-07 14:20:20.000000000 +0100 4 4 *************** 5 - *** 101,107 **** 5 + *** 96,102 **** 6 6 7 7 static void mkcatdirs (const char *mandir, const char *catdir); 8 - static __inline__ char *get_manpath (char *path); 9 - ! static __inline__ char *has_mandir (const char *p); 10 - static __inline__ char *fsstnd (const char *path); 8 + static inline char *get_manpath_from_path (const char *path); 9 + ! static inline char *has_mandir (const char *p); 10 + static inline char *fsstnd (const char *path); 11 11 static char *def_path (int flag); 12 12 static void add_dir_to_list (char **lp, const char *dir); 13 - --- 101,107 ---- 13 + --- 96,102 ---- 14 14 15 15 static void mkcatdirs (const char *mandir, const char *catdir); 16 - static __inline__ char *get_manpath (char *path); 17 - ! static __inline__ char *has_mandir (const char *p, const char *mandir); 18 - static __inline__ char *fsstnd (const char *path); 16 + static inline char *get_manpath_from_path (const char *path); 17 + ! static inline char *has_mandir (const char *p, const char *mandir); 18 + static inline char *fsstnd (const char *path); 19 19 static char *def_path (int flag); 20 20 static void add_dir_to_list (char **lp, const char *dir); 21 21 *************** 22 - *** 885,891 **** 23 - if (debug) 24 - fputs ("is not in the config file\n", stderr); 22 + *** 928,934 **** 23 + } else { 24 + debug ("is not in the config file\n"); 25 25 26 26 ! t = has_mandir (p); 27 27 if (t) { 28 - if (debug) 29 - fprintf (stderr, "but does have a ../man or man subdirectory\n"); 30 - --- 885,891 ---- 31 - if (debug) 32 - fputs ("is not in the config file\n", stderr); 28 + debug ("but does have a ../man or man " 29 + "subdirectory\n"); 30 + --- 928,934 ---- 31 + } else { 32 + debug ("is not in the config file\n"); 33 33 34 34 ! t = has_mandir (p, "man"); 35 35 if (t) { 36 - if (debug) 37 - fprintf (stderr, "but does have a ../man or man subdirectory\n"); 36 + debug ("but does have a ../man or man " 37 + "subdirectory\n"); 38 38 *************** 39 - *** 895,900 **** 40 - --- 895,911 ---- 39 + *** 938,943 **** 40 + --- 938,952 ---- 41 41 } else 42 - if (debug) 43 - fprintf (stderr, "and doesn't have ../man or man subdirectories\n"); 44 - + 45 - + t = has_mandir (p, "share/man"); 46 - + if (t) { 47 - + if (debug) 48 - + fprintf (stderr, "but does have a ../share/man or share/man subdirectory\n"); 49 - + 50 - + add_dir_to_list (tmplist, t); 51 - + free (t); 52 - + } 53 - + if (debug) 54 - + fprintf (stderr, "and doesn't have ../share/man or share/man subdirectories\n"); 42 + debug ("and doesn't have ../man or man " 43 + "subdirectories\n"); 44 + + 45 + + t = has_mandir (p, "share/man"); 46 + + if (t) { 47 + + debug ("but does have a ../share/man or share/man subdirectory\n"); 48 + + 49 + + add_dir_to_list (tmplist, t); 50 + + free (t); 51 + + } else 52 + + debug ("and doesn't have ../share/man or share/man subdirectories\n"); 55 53 } 56 54 } 57 55 58 56 *************** 59 - *** 973,979 **** 57 + *** 1013,1019 **** 60 58 61 59 /* path does not exist in config file: check to see if path/../man or 62 60 path/man exist. If so return it, if not return NULL. */ 63 - ! static __inline__ char *has_mandir (const char *path) 61 + ! static inline char *has_mandir (const char *path) 64 62 { 65 63 char *newpath = NULL; 66 64 67 - --- 984,990 ---- 65 + --- 1022,1028 ---- 68 66 69 67 /* path does not exist in config file: check to see if path/../man or 70 68 path/man exist. If so return it, if not return NULL. */ 71 - ! static __inline__ char *has_mandir (const char *path, const char *mandir) 69 + ! static inline char *has_mandir (const char *path, const char *mandir) 72 70 { 73 71 char *newpath = NULL; 74 72 75 73 *************** 76 - *** 983,991 **** 74 + *** 1023,1031 **** 77 75 char *subdir = strrchr (path, '/'); 78 76 if (subdir) { 79 77 const int prefix_len = subdir + 1 - path; ··· 83 81 84 82 if (is_directory (newpath) == 1) 85 83 return newpath; 86 - --- 994,1002 ---- 84 + --- 1032,1040 ---- 87 85 char *subdir = strrchr (path, '/'); 88 86 if (subdir) { 89 87 const int prefix_len = subdir + 1 - path; ··· 94 92 if (is_directory (newpath) == 1) 95 93 return newpath; 96 94 *************** 97 - *** 993,999 **** 95 + *** 1033,1039 **** 98 96 *newpath = '\0'; 99 97 } 100 98 101 - ! newpath = strappend (newpath, path, "/man", NULL); 99 + ! newpath = appendstr (newpath, path, "/man", NULL); 102 100 103 101 if (is_directory (newpath) == 1) 104 102 return newpath; 105 - --- 1004,1010 ---- 103 + --- 1042,1048 ---- 106 104 *newpath = '\0'; 107 105 } 108 106 109 - ! newpath = strappend (newpath, path, "/", mandir, NULL); 107 + ! newpath = appendstr (newpath, path, "/", mandir, NULL); 110 108 111 109 if (is_directory (newpath) == 1) 112 110 return newpath; 113 - Only in man-db-2.4.3-new/src: manp.c~