Merge pull request #228714 from helsinki-systems/upd/gnugrep
[staging] gnugrep: 3.7 -> 3.11
This commit is contained in:
commit
91b69f8555
6 changed files with 23 additions and 55 deletions
|
@ -487,7 +487,7 @@ rec {
|
||||||
nghttp2.lib
|
nghttp2.lib
|
||||||
coreutils
|
coreutils
|
||||||
gnugrep
|
gnugrep
|
||||||
pcre.out
|
gnugrep.pcre2.out
|
||||||
gmp
|
gmp
|
||||||
libiconv
|
libiconv
|
||||||
brotli.lib
|
brotli.lib
|
||||||
|
@ -563,7 +563,7 @@ rec {
|
||||||
nghttp2.lib
|
nghttp2.lib
|
||||||
coreutils
|
coreutils
|
||||||
gnugrep
|
gnugrep
|
||||||
pcre.out
|
gnugrep.pcre2.out
|
||||||
gmp
|
gmp
|
||||||
libiconv
|
libiconv
|
||||||
brotli.lib
|
brotli.lib
|
||||||
|
@ -587,8 +587,9 @@ rec {
|
||||||
persistent = self: super: with prevStage; {
|
persistent = self: super: with prevStage; {
|
||||||
inherit
|
inherit
|
||||||
gnumake gzip gnused bzip2 ed xz patch bash python3
|
gnumake gzip gnused bzip2 ed xz patch bash python3
|
||||||
ncurses libffi zlib gmp pcre gnugrep cmake
|
ncurses libffi zlib gmp gnugrep cmake
|
||||||
coreutils findutils diffutils patchutils ninja libxml2;
|
coreutils findutils diffutils patchutils ninja libxml2;
|
||||||
|
inherit (gnugrep) pcre2;
|
||||||
|
|
||||||
# Hack to make sure we don't link ncurses in bootstrap tools. The proper
|
# Hack to make sure we don't link ncurses in bootstrap tools. The proper
|
||||||
# solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib,
|
# solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib,
|
||||||
|
@ -643,8 +644,9 @@ rec {
|
||||||
persistent = self: super: with prevStage; {
|
persistent = self: super: with prevStage; {
|
||||||
inherit
|
inherit
|
||||||
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
gnumake gzip gnused bzip2 gawk ed xz patch bash
|
||||||
ncurses libffi zlib gmp pcre gnugrep
|
ncurses libffi zlib gmp gnugrep
|
||||||
coreutils findutils diffutils patchutils pbzx;
|
coreutils findutils diffutils patchutils pbzx;
|
||||||
|
inherit (gnugrep) pcre2;
|
||||||
|
|
||||||
darwin = super.darwin.overrideScope (_: _: {
|
darwin = super.darwin.overrideScope (_: _: {
|
||||||
inherit (darwin) dyld ICU Libsystem Csu libiconv rewrite-tbd;
|
inherit (darwin) dyld ICU Libsystem Csu libiconv rewrite-tbd;
|
||||||
|
@ -734,7 +736,7 @@ rec {
|
||||||
gawk
|
gawk
|
||||||
gnugrep
|
gnugrep
|
||||||
patch
|
patch
|
||||||
pcre.out
|
gnugrep.pcre2.out
|
||||||
gettext
|
gettext
|
||||||
binutils.bintools
|
binutils.bintools
|
||||||
binutils.bintools.lib
|
binutils.bintools.lib
|
||||||
|
|
|
@ -54,7 +54,7 @@ in rec {
|
||||||
chmod -R u+w $out/include
|
chmod -R u+w $out/include
|
||||||
cp -rL ${darwin.ICU}/include* $out/include
|
cp -rL ${darwin.ICU}/include* $out/include
|
||||||
cp -rL ${libiconv}/include/* $out/include
|
cp -rL ${libiconv}/include/* $out/include
|
||||||
cp -rL ${lib.getDev gnugrep.pcre}/include/* $out/include
|
cp -rL ${lib.getDev gnugrep.pcre2}/include/* $out/include
|
||||||
mv $out/include $out/include-Libsystem
|
mv $out/include $out/include-Libsystem
|
||||||
|
|
||||||
# Copy coreutils, bash, etc.
|
# Copy coreutils, bash, etc.
|
||||||
|
@ -86,7 +86,7 @@ in rec {
|
||||||
cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib
|
cp -d ${libssh2.out}/lib/libssh*.dylib $out/lib
|
||||||
cp -d ${lib.getLib openssl}/lib/*.dylib $out/lib
|
cp -d ${lib.getLib openssl}/lib/*.dylib $out/lib
|
||||||
|
|
||||||
cp -d ${gnugrep.pcre.out}/lib/libpcre*.dylib $out/lib
|
cp -d ${gnugrep.pcre2.out}/lib/libpcre2*.dylib $out/lib
|
||||||
cp -d ${lib.getLib libiconv}/lib/lib*.dylib $out/lib
|
cp -d ${lib.getLib libiconv}/lib/lib*.dylib $out/lib
|
||||||
cp -d ${lib.getLib gettext}/lib/libintl*.dylib $out/lib
|
cp -d ${lib.getLib gettext}/lib/libintl*.dylib $out/lib
|
||||||
chmod +x $out/lib/libintl*.dylib
|
chmod +x $out/lib/libintl*.dylib
|
||||||
|
|
|
@ -637,7 +637,7 @@ in
|
||||||
]
|
]
|
||||||
# Library dependencies
|
# Library dependencies
|
||||||
++ map getLib (
|
++ map getLib (
|
||||||
[ attr acl zlib pcre libidn2 libunistring ]
|
[ attr acl zlib gnugrep.pcre2 libidn2 libunistring ]
|
||||||
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv
|
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv
|
||||||
)
|
)
|
||||||
# More complicated cases
|
# More complicated cases
|
||||||
|
@ -656,7 +656,8 @@ in
|
||||||
inherit (prevStage)
|
inherit (prevStage)
|
||||||
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
gzip bzip2 xz bash coreutils diffutils findutils gawk
|
||||||
gnused gnutar gnugrep gnupatch patchelf
|
gnused gnutar gnugrep gnupatch patchelf
|
||||||
attr acl zlib pcre libunistring;
|
attr acl zlib libunistring;
|
||||||
|
inherit (prevStage.gnugrep) pcre2;
|
||||||
${localSystem.libc} = getLibc prevStage;
|
${localSystem.libc} = getLibc prevStage;
|
||||||
|
|
||||||
# Hack: avoid libidn2.{bin,dev} referencing bootstrap tools. There's a logical cycle.
|
# Hack: avoid libidn2.{bin,dev} referencing bootstrap tools. There's a logical cycle.
|
||||||
|
|
|
@ -130,7 +130,7 @@ in with pkgs; rec {
|
||||||
cp -d ${patch}/bin/* $out/bin
|
cp -d ${patch}/bin/* $out/bin
|
||||||
cp ${patchelf}/bin/* $out/bin
|
cp ${patchelf}/bin/* $out/bin
|
||||||
|
|
||||||
cp -d ${gnugrep.pcre.out}/lib/libpcre*.so* $out/lib # needed by grep
|
cp -d ${gnugrep.pcre2.out}/lib/libpcre2*.so* $out/lib # needed by grep
|
||||||
|
|
||||||
# Copy what we need of GCC.
|
# Copy what we need of GCC.
|
||||||
cp -d ${bootGCC.out}/bin/gcc $out/bin
|
cp -d ${bootGCC.out}/bin/gcc $out/bin
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, stdenv, fetchurl, pcre, libiconv, perl, autoreconfHook }:
|
{ lib, stdenv, glibcLocales, fetchurl, pcre2, libiconv, perl, autoreconfHook }:
|
||||||
|
|
||||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||||
# files.
|
# files.
|
||||||
|
|
||||||
let version = "3.7"; in
|
let version = "3.11"; in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "gnugrep";
|
pname = "gnugrep";
|
||||||
|
@ -13,23 +13,17 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/grep/grep-${version}.tar.xz";
|
url = "mirror://gnu/grep/grep-${version}.tar.xz";
|
||||||
sha256 = "0g42svbc1nq5bamxfj6x7320wli4dlj86padk0hwgbk04hqxl42w";
|
hash = "sha256-HbKu3eidDepCsW2VKPiUyNFdrk4ZC1muzHj1qVEnbqs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=b50c6442e43d79471a31a2a202d3e50c0557446f
|
nativeCheckInputs = [ perl glibcLocales ];
|
||||||
patches = lib.optional stdenv.hostPlatform.isLoongArch64 ./sigsegv-loongarch.patch;
|
|
||||||
|
|
||||||
# Perl is needed for testing
|
|
||||||
nativeBuildInputs = [ perl ] ++ lib.optional stdenv.hostPlatform.isLoongArch64 autoreconfHook;
|
|
||||||
outputs = [ "out" "info" ]; # the man pages are rather small
|
outputs = [ "out" "info" ]; # the man pages are rather small
|
||||||
|
|
||||||
buildInputs = [ pcre libiconv ];
|
buildInputs = [ pcre2 libiconv ];
|
||||||
|
|
||||||
# cygwin: FAIL: multibyte-white-space
|
# cygwin: FAIL: multibyte-white-space
|
||||||
# freebsd: FAIL mb-non-UTF8-performance
|
# freebsd: FAIL mb-non-UTF8-performance
|
||||||
# all platforms: timing sensitivity in long-pattern-perf
|
doCheck = !stdenv.isCygwin && !stdenv.isFreeBSD;
|
||||||
#doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin && !stdenv.isFreeBSD;
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
# On macOS, force use of mkdir -p, since Grep's fallback
|
# On macOS, force use of mkdir -p, since Grep's fallback
|
||||||
# (./install-sh) is broken.
|
# (./install-sh) is broken.
|
||||||
|
@ -62,12 +56,14 @@ stdenv.mkDerivation {
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
|
|
||||||
maintainers = [
|
maintainers = [
|
||||||
maintainers.eelco
|
maintainers.das_j
|
||||||
maintainers.m00wl
|
maintainers.m00wl
|
||||||
];
|
];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
mainProgram = "grep";
|
mainProgram = "grep";
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {inherit pcre;};
|
passthru = {
|
||||||
|
inherit pcre2;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
From b50c6442e43d79471a31a2a202d3e50c0557446f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sun Haiyong <youbest@sina.com>
|
|
||||||
Date: Sat, 4 Sep 2021 15:06:43 +0200
|
|
||||||
Subject: sigsegv: Improve cross-compilation support for LoongArch CPU.
|
|
||||||
|
|
||||||
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
|
|
||||||
down on LoongArch.
|
|
||||||
---
|
|
||||||
m4/stack-direction.m4 | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
|
|
||||||
index 9328725..e682be9 100644
|
|
||||||
--- a/m4/stack-direction.m4
|
|
||||||
+++ b/m4/stack-direction.m4
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-# stack-direction.m4 serial 7
|
|
||||||
+# stack-direction.m4 serial 8
|
|
||||||
dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software, distributed under the terms of the GNU
|
|
||||||
dnl General Public License. As a special exception to the GNU General
|
|
||||||
@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
|
|
||||||
i?86 | x86_64 | \
|
|
||||||
i860 | \
|
|
||||||
ia64 | \
|
|
||||||
+ loongarch* | \
|
|
||||||
m32r | \
|
|
||||||
m68* | \
|
|
||||||
m88k | \
|
|
||||||
--
|
|
||||||
cgit v1.1
|
|
Loading…
Reference in a new issue