man-db: add support for zstd

This commit is contained in:
DavHau 2021-04-29 16:06:52 +07:00 committed by Yt
parent 7408ce3c70
commit 6f6daf3a6a
2 changed files with 28 additions and 1 deletions

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "doc" ];
outputMan = "out"; # users will want `man man` to work
nativeBuildInputs = [ pkg-config makeWrapper groff ];
nativeBuildInputs = [ autoconf automake gettext groff libtool makeWrapper pkg-config zstd ];
buildInputs = [ libpipeline db groff ]; # (Yes, 'groff' is both native and build input)
checkInputs = [ libiconv /* for 'iconv' binary */ ];
@ -28,6 +28,12 @@ stdenv.mkDerivation rec {
# Add mandb locations for the above
echo "MANDB_MAP /nix/var/nix/profiles/default/share/man /var/cache/man/nixpkgs" >> src/man_db.conf.in
# use absolute paths to reference programs, otherwise artifacts will have undeclared dependencies
for f in configure.ac m4/man-check-progs.m4 m4/man-po4a.m4; do
substituteInPlace $f \
--replace AC_CHECK_PROGS AC_PATH_PROGS
done
'';
configureFlags = [
@ -44,7 +50,15 @@ stdenv.mkDerivation rec {
"ac_cv_func_mempcpy=no"
];
preConfigure = ''
# need to recreate configure script due to substitutions in postPatch
./bootstrap --gnulib-srcdir=${gnulib.src} --no-git
# deal with autoconf 2.70 bug: https://lists.gnu.org/archive/html/bug-autoconf/2020-12/msg00036.html
# can be removed once autoconf 2.71 is merged
patch < ${./fix-configure.patch}
configureFlagsArray+=("--with-sections=1 n l 8 3 0 2 5 4 9 6 7")
'';

View file

@ -0,0 +1,13 @@
--- configure 2021-04-29 09:58:14.430422095 +0000
+++ configure 2021-04-29 09:58:46.783454349 +0000
@@ -6018,8 +6018,9 @@
return 0;
}
_ACEOF
+
+ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
for ac_arg in '' ac_prog_cc_stdc=c89
- ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"