mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
libarchive: add patch to fix .pc
file
(cherry picked from commit 505530e3de
)
This commit is contained in:
parent
2c9cbf7c3b
commit
b5ca14bb98
18
pkgs/by-name/li/libarchive/fix-pkg-config-iconv.patch
Normal file
18
pkgs/by-name/li/libarchive/fix-pkg-config-iconv.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0fdfaf06a5..d08611848c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -453,13 +453,8 @@
|
||||
AC_CHECK_HEADERS([iconv.h],[],[],[#include <stdlib.h>])
|
||||
if test "x$am_cv_func_iconv" = "xyes"; then
|
||||
AC_CHECK_HEADERS([localcharset.h])
|
||||
- am_save_LIBS="$LIBS"
|
||||
LIBS="${LIBS} ${LIBICONV}"
|
||||
- if test -n "$LIBICONV"; then
|
||||
- LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
|
||||
- fi
|
||||
AC_CHECK_FUNCS([locale_charset])
|
||||
- LIBS="${am_save_LIBS}"
|
||||
if test "x$ac_cv_func_locale_charset" != "xyes"; then
|
||||
# If locale_charset() is not in libiconv, we have to find libcharset.
|
||||
AC_CHECK_LIB(charset,locale_charset)
|
@ -40,6 +40,22 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-maV2+Whi4aDG1VLAYpOTxluO9I0zNiZ8fA3w7epGlDg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# The `.pc` file lists `iconv` in `Requires.private` when `-liconv`
|
||||
# is required, even though common platforms in that situation like
|
||||
# Darwin don’t ship a `.pc` file for their `libiconv`. This isn’t
|
||||
# upstreamed as there are a handful of closed or regressed PRs
|
||||
# trying to fix it already and it seems upstream added this to deal
|
||||
# with some non‐portable MSYS2 thing or something.
|
||||
#
|
||||
# See:
|
||||
#
|
||||
# * <https://github.com/libarchive/libarchive/issues/1766>
|
||||
# * <https://github.com/libarchive/libarchive/issues/1819>
|
||||
# * <https://github.com/Homebrew/homebrew-core/blob/f8e9e8d4f30979dc99146b5877fce76be6d35124/Formula/lib/libarchive.rb#L48-L52>
|
||||
./fix-pkg-config-iconv.patch
|
||||
];
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
postPatch = let
|
||||
|
Loading…
Reference in New Issue
Block a user