3
0
Fork 0
forked from mirrors/nixpkgs

expect: fix cross compile

This commit is contained in:
Sandro Jäckel 2022-09-07 22:11:03 +02:00 committed by Rick van Schijndel
parent cedd23b215
commit 73f3eedb29
2 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch }:
{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch, substituteAll }:
tcl.mkTclDerivation rec {
pname = "expect";
@ -14,6 +14,10 @@ tcl.mkTclDerivation rec {
url = "https://raw.githubusercontent.com/buildroot/buildroot/c05e6aa361a4049eabd8b21eb64a34899ef83fc7/package/expect/0001-enable-cross-compilation.patch";
sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b";
})
(substituteAll {
src = ./fix-cross-compilation.patch;
tcl = "${buildPackages.tcl}/bin/tclsh";
})
];
postPatch = ''

View file

@ -0,0 +1,11 @@
--- a/Makefile.in 2022-09-07 21:46:37.090519258 +0200
+++ b/Makefile.in 2022-09-07 21:46:21.462592279 +0200
@@ -380,7 +380,7 @@
cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
$(SCRIPTS):
- $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
+ @tcl@ $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its
## expansion references the contents of LIBS, which contains linker