push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
From 1e000ca711886055176a2f90197a383d09de0e67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
<rosen644835@gmail.com>
Date: Fri, 18 Dec 2020 14:19:36 +0100
Subject: [PATCH] msginit: Do not use POT-Creation-Date.
* gettext-tools/src/msginit.c (po_revision_date): Do not use
POT-Creation-Date when the file is automatically generated.
---
gettext-tools/src/msginit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c
index 8ca9a3b77..06e0e7195 100644
--- a/gettext-tools/src/msginit.c
+++ b/gettext-tools/src/msginit.c
@@ -1075,9 +1075,9 @@ static const char *
po_revision_date (const char *header)
{
if (no_translator)
- /* Because the PO file is automatically generated, we use the
- POT-Creation-Date, not the current time. */
- return get_field (header, "POT-Creation-Date");
+ /* Because the PO file is automatically generated, we don't
+ generate PO-Revision-Date field. */
+ return NULL;
else
{
/* Assume the translator will modify the PO file now. */
--
2.29.2

View File

@@ -0,0 +1,21 @@
diff --git a/gettext-runtime/src/gettext.sh.in b/gettext-runtime/src/gettext.sh.in
index 1dfa3bb..d6ef8a8 100644
--- a/gettext-runtime/src/gettext.sh.in
+++ b/gettext-runtime/src/gettext.sh.in
@@ -86,14 +86,14 @@ fi
# looks up the translation of MSGID and substitutes shell variables in the
# result.
eval_gettext () {
- gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1")
+ @out@/bin/gettext "$1" | (export PATH `@out@/bin/envsubst --variables "$1"`; @out@/bin/envsubst "$1")
}
# eval_ngettext MSGID MSGID-PLURAL COUNT
# looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes
# shell variables in the result.
eval_ngettext () {
- ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2")
+ @out@/bin/ngettext "$1" "$2" "$3" | (export PATH `@out@/bin/envsubst --variables "$1 $2"`; @out@/bin/envsubst "$1 $2")
}
# Note: This use of envsubst is much safer than using the shell built-in 'eval'

View File

@@ -0,0 +1,142 @@
{
stdenv,
lib,
fetchurl,
libiconv,
bashNonInteractive,
updateAutotoolsGnuConfigScriptsHook,
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "gettext";
version = "0.25.1";
src = fetchurl {
url = "mirror://gnu/gettext/${pname}-${version}.tar.gz";
hash = "sha256-dG+VXULXHrac52OGnLkmgvCaQGZSjQGLbKej9ICJoIU=";
};
patches = [
./absolute-paths.diff
# fix reproducibile output, in particular in the grub2 build
# https://savannah.gnu.org/bugs/index.php?59658
./0001-msginit-Do-not-use-POT-Creation-Date.patch
./memory-safety.patch
];
outputs = [
"out"
"man"
"doc"
"info"
];
LDFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec";
configureFlags = [
"--disable-csharp"
]
++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# On cross building, gettext supposes that the wchar.h from libc
# does not fulfill gettext needs, so it tries to work with its
# own wchar.h file, which does not cope well with the system's
# wchar.h and stddef.h (gcc-4.3 - glibc-2.9)
"gl_cv_func_wcwidth_works=yes"
];
postPatch = ''
# 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 wont work
# because `autopoint` will copy the autoconf macros from the projects 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 -a gettext-tools/gnulib-m4/extern-inline.m4 "$oldFilesDir/$oldFile"
done
tar uf gettext-tools/misc/archive.dir.tar --owner=0 --group=0 --numeric-owner -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
''
+ lib.optionalString stdenv.hostPlatform.isMinGW ''
sed -i "s/@GNULIB_CLOSE@/1/" */*/unistd.in.h
'';
strictDeps = true;
nativeBuildInputs = [
updateAutotoolsGnuConfigScriptsHook
];
buildInputs =
lib.optionals (!stdenv.hostPlatform.isMinGW) [
bashNonInteractive
]
++ lib.optionals (!stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isCygwin) [
# HACK, see #10874 (and 14664)
libiconv
];
setupHooks = [
../../../build-support/setup-hooks/role.bash
./gettext-setup-hook.sh
];
env = {
gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl;
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
# macOS iconv implementation is slightly broken since Sonoma
# https://github.com/Homebrew/homebrew-core/pull/199639
# https://savannah.gnu.org/bugs/index.php?66541
am_cv_func_iconv_works = "yes";
};
enableParallelBuilding = true;
enableParallelChecking = false; # fails sometimes
meta = with lib; {
description = "Well integrated set of translation tools and documentation";
longDescription = ''
Usually, programs are written and documented in English, and use
English at execution time for interacting with users. Using a common
language is quite handy for communication between developers,
maintainers and users from all countries. On the other hand, most
people are less comfortable with English than with their own native
language, and would rather be using their mother tongue for day to
day's work, as far as possible. Many would simply love seeing their
computer screen showing a lot less of English, and far more of their
own language.
GNU `gettext` is an important step for the GNU Translation Project, as
it is an asset on which we may build many other steps. This package
offers to programmers, translators, and even users, a well integrated
set of tools and documentation. Specifically, the GNU `gettext`
utilities are a set of tools that provides a framework to help other
GNU packages produce multi-lingual messages.
'';
homepage = "https://www.gnu.org/software/gettext/";
maintainers = with maintainers; [ zimbatm ];
license = licenses.gpl2Plus;
platforms = platforms.all;
};
}
// lib.optionalAttrs stdenv.hostPlatform.isDarwin {
makeFlags = [ "CFLAGS=-D_FORTIFY_SOURCE=0" ];
}

View File

@@ -0,0 +1,17 @@
gettextDataDirsHook() {
# See pkgs/build-support/setup-hooks/role.bash
getHostRoleEnvHook
if [ -d "$1/share/gettext" ]; then
addToSearchPath "GETTEXTDATADIRS${role_post}" "$1/share/gettext"
fi
}
addEnvHooks "$hostOffset" gettextDataDirsHook
# libintl must be listed in load flags on non-Glibc
# it doesn't hurt to have it in Glibc either though
if [ -n "@gettextNeedsLdflags@" -a -z "${dontAddExtraLibs-}" ]; then
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
export NIX_LDFLAGS${role_post}+=" -lintl"
fi

View File

@@ -0,0 +1,44 @@
From: Bruno Haible <bruno@clisp.org>
Date: Mon, 7 Jul 2025 07:02:41 +0000 (+0200)
Subject: xgettext: Perl: Fix bug with comment lines longer than 1024 (regr. 2024-09-26).
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff_plain;h=f98de965a08d1883a46ba5411922b54cc5125f14
xgettext: Perl: Fix bug with comment lines longer than 1024 (regr. 2024-09-26).
Reported by Alyssa Ross <hi@alyssa.is> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-07/msg00009.html>.
* gettext-tools/src/x-perl.c (phase2_getc): Move the sb_free call until after
the savable_comment_add call.
---
diff --git a/gettext-tools/src/x-perl.c b/gettext-tools/src/x-perl.c
index d3aa50476..312fef371 100644
--- a/gettext-tools/src/x-perl.c
+++ b/gettext-tools/src/x-perl.c
@@ -558,7 +558,6 @@ phase2_getc (struct perl_extractor *xp)
{
int lineno;
int c;
- char *utf8_string;
c = phase1_getc (xp);
if (c == '#')
@@ -587,12 +586,13 @@ phase2_getc (struct perl_extractor *xp)
sb_xappend1 (&buffer, c);
}
/* Convert it to UTF-8. */
- utf8_string =
- from_current_source_encoding (sb_xcontents_c (&buffer), lc_comment,
+ const char *contents = sb_xcontents_c (&buffer);
+ char *utf8_contents =
+ from_current_source_encoding (contents, lc_comment,
logical_file_name, lineno);
- sb_free (&buffer);
/* Save it until we encounter the corresponding string. */
- savable_comment_add (utf8_string);
+ savable_comment_add (utf8_contents);
+ sb_free (&buffer);
xp->last_comment_line = lineno;
}
return c;