mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
gnutar: make sure libiconv is linked
gnutar’s `configure` detects libiconv but fails to link it on Darwin.
This commit is contained in:
parent
472d10b75b
commit
a79ed0daec
@ -17,12 +17,9 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-TWL/NzQux67XSFNTI5MMfPlKz3HDWRiCsmp+pQ8+3BY=";
|
||||
};
|
||||
|
||||
# avoid retaining reference to CF during stdenv bootstrap
|
||||
configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"gt_cv_func_CFPreferencesCopyAppValue=no"
|
||||
"gt_cv_func_CFLocaleCopyCurrent=no"
|
||||
"gt_cv_func_CFLocaleCopyPreferredLanguages=no"
|
||||
];
|
||||
# GNU tar fails to link libiconv even though the configure script detects it.
|
||||
# https://savannah.gnu.org/bugs/index.php?64441
|
||||
patches = [ ./link-libiconv.patch ];
|
||||
|
||||
# gnutar tries to call into gettext between `fork` and `exec`,
|
||||
# which is not safe on darwin.
|
||||
@ -33,8 +30,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook
|
||||
++ lib.optional (!stdenv.hostPlatform.isDarwin) updateAutotoolsGnuConfigScriptsHook;
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
# Add libintl on Darwin specifically as it fails to link (or skip)
|
||||
# NLS on it's own:
|
||||
# "_libintl_textdomain", referenced from:
|
||||
|
23
pkgs/tools/archivers/gnutar/link-libiconv.patch
Normal file
23
pkgs/tools/archivers/gnutar/link-libiconv.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Poznyakoff <gray@gnu.org>
|
||||
Date: Tue, 18 Jul 2023 17:02:23 +0300
|
||||
Subject: Fix savannah bug #64441
|
||||
|
||||
* src/Makefile.am (tar_LDADD): Add libiconv libraries.
|
||||
---
|
||||
src/Makefile.am | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 36c9543..e2ec58d 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
|
||||
$(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
|
||||
$(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) $(LIB_MBRTOWC)\
|
||||
- $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
|
||||
+ $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
|
||||
+ $(LIBINTL) $(LIBICONV)
|
||||
--
|
||||
cgit v1.1
|
Loading…
Reference in New Issue
Block a user