gettext: apply gnulib.passthru.longdouble-redirect-patch

This commit is contained in:
Adam Joseph 2022-07-25 21:35:38 -07:00
parent 1fa5ff7d5d
commit 810c6c387b

View file

@ -1,4 +1,6 @@
{ stdenv, lib, fetchurl, fetchpatch, libiconv, xz, bash }:
{ stdenv, lib, fetchurl, fetchpatch, libiconv, xz, bash
, gnulib
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
@ -45,6 +47,14 @@ stdenv.mkDerivation rec {
'' + lib.optionalString stdenv.hostPlatform.isCygwin ''
sed -i -e "s/\(cldr_plurals_LDADD = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
sed -i -e "s/\(libgettextsrc_la_LDFLAGS = \)/\\1..\/gnulib-lib\/libxml_rpl.la /" gettext-tools/src/Makefile.in
'' +
# This change to gettext's vendored copy of gnulib is already
# merged upstream; we can drop this patch on the next version
# bump. It must be applied twice because gettext vendors gnulib
# not once, but twice!
''
patch -p2 -d gettext-tools/gnulib-lib/ < ${gnulib.passthru.longdouble-redirect-patch}
patch -p2 -d gettext-tools/libgrep/ < ${gnulib.passthru.longdouble-redirect-patch}
'';
strictDeps = true;