This commit is contained in:
parent
ba881e29ac
commit
b56f7565c4
@ -41,29 +41,29 @@
|
||||
+dnl
|
||||
+if test "$zio" = "no" || test -n "$zio"
|
||||
+then
|
||||
+ AC_CHECK_HEADER(zio.h,[
|
||||
+ for lib in ${zio#lib} zio
|
||||
+ do
|
||||
+ AC_CHECK_LIB($lib, fzopen, [LIBS="-l$lib $LIBS"
|
||||
+ AC_DEFINE([COMP_SRC],[],[Define if you have compressors and want to support compressed cat files.])
|
||||
+ AC_DEFINE([HAVE_ZIO],[],[Define to 1 if you have libzio for opening compressed manuals])])
|
||||
+ done])
|
||||
+ AC_CHECK_HEADER(zlib.h,[
|
||||
+ for lib in z gz
|
||||
+ do
|
||||
+ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib" ; break])
|
||||
+ AC_CHECK_LIB($lib, gzopen, [LIBS="$LIBS -Wl,--no-as-needed -l$lib" ; break])
|
||||
+ done])
|
||||
+ AC_CHECK_HEADER(bzlib.h,[
|
||||
+ for lib in bz2 bzip2
|
||||
+ do
|
||||
+ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib" ; break])
|
||||
+ done])
|
||||
+ AC_CHECK_HEADER(zio.h,[
|
||||
+ for lib in ${zio#lib} zio
|
||||
+ do
|
||||
+ AC_CHECK_LIB($lib, fzopen, [LIBS="$LIBS -l$lib" ; LEXLIB="$LEXLIB -l$lib"
|
||||
+ AC_DEFINE([COMP_SRC],[],[Define if you have compressors and want to support compressed cat files.])
|
||||
+ AC_DEFINE([HAVE_ZIO],[],[Define to 1 if you have libzio for opening compressed manuals])])
|
||||
+ AC_CHECK_LIB($lib, BZ2_bzopen, [LIBS="$LIBS -Wl,--no-as-needed -l$lib" ; break])
|
||||
+ done])
|
||||
+fi
|
||||
dnl To add more decompressors just follow the scheme above.
|
||||
|
||||
# Work out which manual page hierarchy scheme might be in use.
|
||||
--- lib/decompress.c
|
||||
+++ lib/decompress.c 2008-04-22 10:48:45.049189929 +0000
|
||||
+++ lib/decompress.c 2008-04-23 10:48:04.431353342 +0000
|
||||
@@ -36,6 +36,10 @@
|
||||
# include "zlib.h"
|
||||
#endif /* HAVE_LIBZ */
|
||||
@ -108,7 +108,7 @@
|
||||
pipeline *decompress_open (const char *filename)
|
||||
{
|
||||
command *cmd;
|
||||
@@ -77,9 +107,49 @@ pipeline *decompress_open (const char *f
|
||||
@@ -77,9 +107,53 @@ pipeline *decompress_open (const char *f
|
||||
char *ext;
|
||||
struct compression *comp;
|
||||
|
||||
@ -124,6 +124,7 @@
|
||||
+ cmd = command_new_function (name, &decompress_zio, "g");
|
||||
+ free (name);
|
||||
+ p = pipeline_new_commands (cmd, NULL);
|
||||
+ if (strcmp(program_name, "mandb") == 0)
|
||||
+ p->libzio = 1;
|
||||
+ goto got_pipeline;
|
||||
+ }
|
||||
@ -133,6 +134,7 @@
|
||||
+ cmd = command_new_function (name, &decompress_zio, "z");
|
||||
+ free (name);
|
||||
+ p = pipeline_new_commands (cmd, NULL);
|
||||
+ if (strcmp(program_name, "mandb") == 0)
|
||||
+ p->libzio = 1;
|
||||
+ goto got_pipeline;
|
||||
+ }
|
||||
@ -142,6 +144,7 @@
|
||||
+ cmd = command_new_function (name, &decompress_zio, "b");
|
||||
+ free (name);
|
||||
+ p = pipeline_new_commands (cmd, NULL);
|
||||
+ if (strcmp(program_name, "mandb") == 0)
|
||||
+ p->libzio = 1;
|
||||
+ goto got_pipeline;
|
||||
+ }
|
||||
@ -151,6 +154,7 @@
|
||||
+ cmd = command_new_function (name, &decompress_zio, "Z");
|
||||
+ free (name);
|
||||
+ p = pipeline_new_commands (cmd, NULL);
|
||||
+ if (strcmp(program_name, "mandb") == 0)
|
||||
+ p->libzio = 1;
|
||||
+ goto got_pipeline;
|
||||
+ }
|
||||
@ -160,7 +164,7 @@
|
||||
filename_len = strlen (filename);
|
||||
if (filename_len > 3 && STREQ (filename + filename_len - 3, ".gz")) {
|
||||
--- lib/pipeline.c
|
||||
+++ lib/pipeline.c 2008-04-22 13:38:04.181934493 +0000
|
||||
+++ lib/pipeline.c 2008-04-23 10:52:16.655715088 +0000
|
||||
@@ -50,6 +50,10 @@
|
||||
#include "error.h"
|
||||
#include "pipeline.h"
|
||||
@ -240,7 +244,7 @@
|
||||
/* Flush all pending output so that subprocesses don't inherit it. */
|
||||
fflush (NULL);
|
||||
|
||||
@@ -1009,6 +1046,18 @@ int pipeline_wait (pipeline *p)
|
||||
@@ -1009,6 +1046,19 @@ int pipeline_wait (pipeline *p)
|
||||
pipeline_dump (p, stderr);
|
||||
}
|
||||
|
||||
@ -252,6 +256,7 @@
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ p->outfile = (FILE*)0;
|
||||
+ p->outfd = -1;
|
||||
+ return ret;
|
||||
+ }
|
||||
+#endif
|
||||
@ -259,7 +264,7 @@
|
||||
assert (p->pids); /* pipeline started */
|
||||
assert (p->statuses);
|
||||
|
||||
@@ -1549,11 +1598,20 @@ static const char *get_block (pipeline *
|
||||
@@ -1549,11 +1599,20 @@ static const char *get_block (pipeline *
|
||||
|
||||
if (!peek)
|
||||
p->peek_offset = 0;
|
||||
@ -282,7 +287,7 @@
|
||||
if (peek)
|
||||
p->peek_offset += r;
|
||||
--- lib/pipeline.h
|
||||
+++ lib/pipeline.h 2008-04-22 10:49:00.455159182 +0000
|
||||
+++ lib/pipeline.h 2008-04-22 13:52:44.846881571 +0000
|
||||
@@ -60,6 +60,14 @@ typedef struct pipeline {
|
||||
pid_t *pids;
|
||||
int *statuses; /* -1 until command exits */
|
||||
|
@ -838,15 +838,18 @@
|
||||
return NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -801,6 +802,8 @@ static int local_man_loop (const char *a
|
||||
@@ -801,8 +802,10 @@ static int local_man_loop (const char *a
|
||||
argv_abs = xstrdup (argv);
|
||||
}
|
||||
lang = lang_dir (argv_abs);
|
||||
+ if (!lang || !*lang)
|
||||
+ lang = internal_locale;
|
||||
free (argv_abs);
|
||||
if (!display (NULL, argv, NULL, argv_base, NULL)) {
|
||||
- if (!display (NULL, argv, NULL, argv_base, NULL)) {
|
||||
+ if (!display (NULL, file, NULL, argv_base, NULL)) {
|
||||
if (local_mf)
|
||||
error (0, errno, "%s", argv);
|
||||
exit_status = NOT_FOUND;
|
||||
@@ -834,7 +837,16 @@ int main (int argc, char *argv[])
|
||||
bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 23 13:12:12 CEST 2008 - werner@suse.de
|
||||
|
||||
- Use speedup for bnc#381830 only in mandb as man would be break
|
||||
- Avoid trouble with -Wl,--as-needed therefore fore -lbz2 and -lz
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 22 15:45:22 CEST 2008 - werner@suse.de
|
||||
|
||||
|
5
man.spec
5
man.spec
@ -24,7 +24,7 @@ BuildRequires: gettext-runtime gettext-tools
|
||||
BuildRequires: gettext gettext-devel
|
||||
%endif
|
||||
Version: 2.5.1
|
||||
Release: 1
|
||||
Release: 3
|
||||
Summary: A Program for Displaying man Pages
|
||||
License: GPL v2 or later
|
||||
Url: https://savannah.nongnu.org/projects/man-db
|
||||
@ -270,6 +270,9 @@ test -d var/catman/ && rm -rf var/catman/ || true
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.cron-man
|
||||
|
||||
%changelog
|
||||
* Wed Apr 23 2008 werner@suse.de
|
||||
- Use speedup for bnc#381830 only in mandb as man would be break
|
||||
- Avoid trouble with -Wl,--as-needed therefore fore -lbz2 and -lz
|
||||
* Tue Apr 22 2008 werner@suse.de
|
||||
- Make libzio interface smarter, that is if used only for simple
|
||||
decompression do not use a pipe (saves 30%% mandb run time)
|
||||
|
Loading…
Reference in New Issue
Block a user