diff options
author | Bernhard Rosenkränzer <bero@lindev.ch> | 2020-06-01 01:07:13 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-06-01 01:07:13 +0100 |
commit | 9966be79c3f24876d5f628730fc0e0e2330eb2bf (patch) | |
tree | a6a6f6aef6676581b8a4214efd3f274030f25264 | |
parent | aba742e89660a83adec28ec2353fab2b95de8773 (diff) |
Add support for zstd-compressed manual pages
* configure.ac: Check for zstd.
* include/comp_src.h.in (comp_list): Add zstd.
* include/manconfig.h.in: Define UNZSTD.
* NEWS: Document this.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | include/comp_src.h.in | 6 | ||||
-rw-r--r-- | include/manconfig.h.in | 1 |
4 files changed, 16 insertions, 0 deletions
@@ -18,6 +18,9 @@ Major changes since man-db 2.9.1: * Add a bug tracker link to man-db's own manual pages. + * Add support for zstd-compressed manual pages, thanks to Bernhard + Rosenkränzer. + man-db 2.9.1 (25 February 2020) =============================== diff --git a/configure.ac b/configure.ac index 3406c5e6..5aefa5c5 100644 --- a/configure.ac +++ b/configure.ac @@ -327,6 +327,11 @@ if test -n "$lzip" then unlzip="$lzip -dc" fi +MAN_CHECK_PROGS([zstd], [ZSTD], [use ZSTD as zstd compression utility], [zstd]) +if test -n "$zstd" +then + unzstd="$zstd -dc" +fi if test -n "$compressor" then AC_DEFINE([COMP_CAT], [1], [Define if you have compressors and want to support compressed cat files.]) @@ -339,6 +344,7 @@ AC_SUBST([bunzip2]) AC_SUBST([unlzma]) AC_SUBST([unxz]) AC_SUBST([unlzip]) +AC_SUBST([unzstd]) MAN_COMPRESS_LIB([z], [gzopen]) dnl To add more decompressors just follow the scheme above. diff --git a/include/comp_src.h.in b/include/comp_src.h.in index d3ef8901..bc5d6016 100644 --- a/include/comp_src.h.in +++ b/include/comp_src.h.in @@ -77,6 +77,12 @@ struct compression comp_list[] = { {UNLZIP, "lz", NULL}, #endif /* HAVE_LZIP */ +/* If we have zstd, incorporate the following */ +#ifdef HAVE_ZSTD + {UNZSTD, "zst", NULL}, + {UNZSTD, "zstd", NULL}, +#endif /* HAVE_ZSTD */ + /*------------------------------------------------------*/ /* Add your decompressor(s) and extension(s) below here */ /*------------------------------------------------------*/ diff --git a/include/manconfig.h.in b/include/manconfig.h.in index 859970f3..6992d979 100644 --- a/include/manconfig.h.in +++ b/include/manconfig.h.in @@ -225,6 +225,7 @@ #define UNLZMA "@unlzma@" #define UNXZ "@unxz@" #define UNLZIP "@unlzip@" +#define UNZSTD "@unzstd@" /*-----------------------------------------------------------------------*/ /* The things below here shouldn't really be changed unless you really */ |