flashplayer: fix build on 32-bit platform

This commit is contained in:
taku0 2016-04-08 22:33:14 +09:00 committed by Nikolay Amiantov
parent 36b5fd8d4d
commit 28232c3746

View File

@ -73,8 +73,7 @@ stdenv.mkDerivation rec {
tar -xvzf *${suffix}.tar.gz tar -xvzf *${suffix}.tar.gz
${ lib.optionalString is-i686 '' ${ lib.optionalString is-i686 ''
tar -xvzf *_sa.*.tar.gz tar -xvzf *_sa[_.]*.tar.gz
tar -xvzf *_sa_debug.*.tar.gz
''} ''}
popd popd
@ -87,7 +86,7 @@ stdenv.mkDerivation rec {
dontStrip = true; dontStrip = true;
dontPatchELF = true; dontPatchELF = true;
outputs = [ "out" ] ++ lib.optionals is-i686 ["sa" "saDbg" ]; outputs = [ "out" ] ++ lib.optional (is-i686 && !debug) "sa" ++ lib.optional (is-i686 && debug) "saDbg";
installPhase = '' installPhase = ''
mkdir -p $out/lib/mozilla/plugins mkdir -p $out/lib/mozilla/plugins
@ -95,22 +94,25 @@ stdenv.mkDerivation rec {
patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so patchelf --set-rpath "$rpath" $out/lib/mozilla/plugins/libflashplayer.so
${ lib.optionalString is-i686 '' ${ lib.optionalString is-i686 ''
mkdir -p $sa/bin ${ lib.optionalString (!debug) ''
cp flashplayer $sa/bin/ mkdir -p $sa/bin
cp flashplayer $sa/bin/
patchelf \ patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$rpath" \ --set-rpath "$rpath" \
$sa/bin/flashplayer $sa/bin/flashplayer
''}
${ lib.optionalString debug ''
mkdir -p $saDbg/bin
cp flashplayerdebugger $saDbg/bin/
mkdir -p $saDbg/bin patchelf \
cp flashplayerdebugger $saDbg/bin/ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "$rpath" \
patchelf \ $saDbg/bin/flashplayerdebugger
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ ''}
--set-rpath "$rpath" \
$saDbg/bin/flashplayerdebugger
''} ''}
''; '';