Skip to content

Commit

Permalink
libtool: 2.4.6 -> 2.4.7
Browse files Browse the repository at this point in the history
libtool2-macos11.patch has been merged upstream as 9e8c88251

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
  • Loading branch information
Adam Joseph and SuperSandro2000 committed Apr 12, 2022
1 parent a459707 commit dfb616b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 41 deletions.
32 changes: 0 additions & 32 deletions pkgs/development/tools/misc/libtool/libtool2-macos11.patch

This file was deleted.

26 changes: 17 additions & 9 deletions pkgs/development/tools/misc/libtool/libtool2.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ lib, stdenv, fetchurl, fetchpatch, autoconf, automake, m4, perl, help2man
, runtimeShell
, file
}:

# Note: this package is used for bootstrapping fetchurl, and thus
Expand All @@ -8,20 +10,18 @@

stdenv.mkDerivation rec {
pname = "libtool";
version = "2.4.6";
version = "2.4.7";

src = fetchurl {
url = "mirror://gnu/libtool/${pname}-${version}.tar.gz";
sha256 = "1qq61k6lp1fp75xs398yzi6wvbx232l7xbyn3p13cnh27mflvgg3";
sha256 = "sha256-BOlsJATqcMWQxUbrpCAqThJyLGQAFsErmy8c49SB6ag=";
};

outputs = [ "out" "lib" ];

patches = [
# Suport macOS version 11.0
# https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html
./libtool2-macos11.patch
];
# FILECMD was added in libtool 2.4.7; previous versions hardwired `/usr/bin/file`
# https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html
FILECMD = "${file}/bin/file";

# Normally we'd use autoreconfHook, but that includes libtoolize.
postPatch = ''
Expand All @@ -34,10 +34,18 @@ stdenv.mkDerivation rec {
automake
autoconf
popd
'' +
# libtool commit da2e352735722917bf0786284411262195a6a3f6 changed
# the shebang from `/bin/sh` (which is a special sandbox exception)
# to `/usr/bin/env sh`, meaning that we now need to patch shebangs
# in libtoolize and ltmain.sh since `dontPatchShebangs` is set:
''
substituteInPlace libtoolize.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
'';

nativeBuildInputs = [ perl help2man m4 ] ++ [ autoconf automake ];
propagatedBuildInputs = [ m4 ];
nativeBuildInputs = [ autoconf automake help2man m4 perl ];
propagatedBuildInputs = [ m4 file ];

# Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
# "fixed" path in generated files!
Expand Down

0 comments on commit dfb616b

Please sign in to comment.