mldonkey: fix build with gettext 0.25

This commit is contained in:
Weijia Wang 2025-07-15 23:14:59 +02:00
parent bb6f90906a
commit eefa00c564
2 changed files with 21 additions and 0 deletions

View File

@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
hash = "sha256-Dbb7163CdqHY7/FJY2yWBFRudT+hTFT6fO4sFgt6C/A=";
};
patches = [
./gettext-0.25.patch
];
postPatch = ''
substituteInPlace config/Makefile.in \
--replace-fail '+camlp4' '${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4'
@ -56,6 +60,9 @@ stdenv.mkDerivation rec {
# https://github.com/ygrek/mldonkey/issues/117
// lib.optionalAttrs stdenv.cc.isClang {
CXXFLAGS = "-std=c++98";
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
meta = {

View File

@ -0,0 +1,14 @@
diff --git a/config/configure.in b/config/configure.in
index f2dd838b..e1b5ed47 100644
--- a/config/configure.in
+++ b/config/configure.in
@@ -10,6 +10,9 @@ AC_CONFIG_SRCDIR([Makefile.config.in])
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
+AM_GNU_GETTEXT_VERSION([0.25])
+AM_GNU_GETTEXT([external])
+
CONFIGURE_RUN=yes
CONFIGURE_ARGUMENTS=$ac_configure_args
echo "Arguments to configure: $CONFIGURE_ARGUMENTS"