Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gettext: 0.21.1 -> 0.22.4 #279197

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions pkgs/development/libraries/gettext/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

stdenv.mkDerivation rec {
pname = "gettext";
version = "0.21.1";
version = "0.22.4";

src = fetchurl {
url = "mirror://gnu/gettext/${pname}-${version}.tar.gz";
sha256 = "sha256-6MNlDh2M7odcTzVWQjgsHfgwWL1aEe6FVcDPJ21kbUU=";
hash = "sha256-weC7KkQnqQJDkMZizVMtZkxLNrj/RE7V5UsRX9t6Guo=";
};
patches = [
./absolute-paths.diff
Expand Down Expand Up @@ -47,10 +47,25 @@ stdenv.mkDerivation rec {
];

postPatch = ''
substituteAllInPlace gettext-runtime/src/gettext.sh.in
substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
# Older versions of gettext come with a copy of `extern-inline.m4` that is not compatible with clang 18.
# When a project uses gettext + autoreconfPhase, autoreconfPhase will invoke `autopoint -f`, which will
# replace whatever (probably compatible) version of `extern-inline.m4` with one that probalby won’t work
# because `autopoint` will copy the autoconf macros from the project’s required version of gettext.
# Fixing this requires replacing all the older copies of the problematic file with a new one.
#
# This is ugly, but it avoids requiring workarounds in every package using gettext and autoreconfPhase.
declare -a oldFiles=($(tar tf gettext-tools/misc/archive.dir.tar | grep '^gettext-0\.[19].*/extern-inline.m4'))
oldFilesDir=$(mktemp -d)
for oldFile in "''${oldFiles[@]}"; do
mkdir -p "$oldFilesDir/$(dirname "$oldFile")"
cp gettext-tools/gnulib-m4/extern-inline.m4 "$oldFilesDir/$oldFile"
done
tar uf gettext-tools/misc/archive.dir.tar -C "$oldFilesDir" "''${oldFiles[@]}"

substituteAllInPlace gettext-runtime/src/gettext.sh.in
substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd
substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd
'' + 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
Expand Down
5 changes: 4 additions & 1 deletion pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ in
configureFlags = (a.configureFlags or []) ++ [
"--with-native-system-header-dir=/include"
"--with-build-sysroot=${lib.getDev self.stdenv.cc.libc}"
# Don't assume that `gettext` was built with iconv support, since we don't have
# our own `glibc` yet.
"--disable-nls"
];

# This is a separate phase because gcc assembles its phase scripts
Expand Down Expand Up @@ -507,7 +510,7 @@ in
overrides = self: super: rec {
inherit (prevStage)
ccWrapperStdenv
binutils coreutils gnugrep gettext
binutils coreutils gnugrep
perl patchelf linuxHeaders gnum4 bison libidn2 libunistring libxcrypt;
# We build a special copy of libgmp which doesn't use libstdc++, because
# xgcc++'s libstdc++ references the bootstrap-files (which is what
Expand Down
5 changes: 5 additions & 0 deletions pkgs/tools/misc/fontforge/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ stdenv.mkDerivation rec {
url = "https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429.patch";
hash = "sha256-aRnir09FSQMT50keoB7z6AyhWAVBxjSQsTRvBzeBuHU=";
})
# Fixes translation compatibility with gettext 0.22
(fetchpatch {
url = "https://github.com/fontforge/fontforge/commit/55d58f87ab1440f628f2071a6f6cc7ef9626c641.patch";
hash = "sha256-rkYnKPXA8Ztvh9g0zjG2yTUCPd3lE1uqwvBuEd8+Oyw=";
})

# https://github.com/fontforge/fontforge/pull/5423
./replace-distutils.patch
Expand Down
Loading