@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl
1+{ stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl, bash
22, mp3Support ? true, lame ? null
33, speexSupport ? true, speex ? null
44, theoraSupport ? true, libtheora ? null
@@ -45,7 +45,11 @@ let
4545 ++ optional (vpxSupport && hasPrefix "0.8." version) ./vpxenc-0.8.17-libvpx-1.5.patch
4646 ;
4747
48− preConfigure = "patchShebangs doc/texi2pod.pl";
48+ postPatch = ''
49+ patchShebangs .
50+ # another shebang was hidden in a here document text
51+ substituteInPlace ./configure --replace "#! /bin/sh" "#!${bash}/bin/sh"
52+ '';
4953
5054 configureFlags =
5155 assert stdenv.lib.all (x: x!=null) buildInputs;
@@ -71,8 +75,8 @@ let
7175 ++ optional freetypeSupport "--enable-libfreetype"
7276 ;
7377
74− nativeBuildInputs = [ pkgconfig ];
75− buildInputs = [ lame yasm zlib bzip2 SDL ]
78+ nativeBuildInputs = [ pkgconfig perl ];
79+ buildInputs = [ lame yasm zlib bzip2 SDL bash ]
7680 ++ [ perl ] # for install-man target
7781 ++ optional mp3Support lame
7882 ++ optional speexSupport speex
@@ -95,6 +99,7 @@ let
9599 # alltools to build smaller tools, incl. aviocat, ismindex, qt-faststart, etc.
96100 buildFlags = "all alltools install-man";
97101
102+
98103 postInstall = ''
99104 moveToOutput bin "$bin"
100105 # alltools target compiles an executable in tools/ for every C