qt 4.8: Don't use stdenv.cross
This commit is contained in:
parent
aac32fe2d1
commit
f16ee76ca8
@ -1,4 +1,5 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, substituteAll
|
{ stdenv, fetchurl, fetchpatch, substituteAll
|
||||||
|
, hostPlatform
|
||||||
, libXrender, libXinerama, libXcursor, libXmu, libXv, libXext
|
, libXrender, libXinerama, libXcursor, libXmu, libXv, libXext
|
||||||
, libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng
|
, libXfixes, libXrandr, libSM, freetype, fontconfig, zlib, libjpeg, libpng
|
||||||
, libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig
|
, libmng, which, mesaSupported, mesa, mesa_glu, openssl, dbus, cups, pkgconfig
|
||||||
@ -182,9 +183,7 @@ stdenv.mkDerivation rec {
|
|||||||
rm -rf $out/tests
|
rm -rf $out/tests
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossAttrs = let
|
crossAttrs = {
|
||||||
isMingw = stdenv.cross.libc == "msvcrt";
|
|
||||||
in {
|
|
||||||
# I've not tried any case other than i686-pc-mingw32.
|
# I've not tried any case other than i686-pc-mingw32.
|
||||||
# -nomake tools: it fails linking some asian language symbols
|
# -nomake tools: it fails linking some asian language symbols
|
||||||
# -no-svg: it fails to build on mingw64
|
# -no-svg: it fails to build on mingw64
|
||||||
@ -194,14 +193,14 @@ stdenv.mkDerivation rec {
|
|||||||
-no-svg
|
-no-svg
|
||||||
-make qmake -make libs -nomake tools
|
-make qmake -make libs -nomake tools
|
||||||
-nomake demos -nomake examples -nomake docs
|
-nomake demos -nomake examples -nomake docs
|
||||||
'' + optionalString isMingw " -xplatform win32-g++-4.6";
|
'' + optionalString hostPlatform.isMinGW " -xplatform win32-g++-4.6";
|
||||||
patches = [];
|
patches = [];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -i -e 's/ g++/ ${stdenv.cross.config}-g++/' \
|
sed -i -e 's/ g++/ ${stdenv.cc.prefix}g++/' \
|
||||||
-e 's/ gcc/ ${stdenv.cross.config}-gcc/' \
|
-e 's/ gcc/ ${stdenv.cc.prefix}gcc/' \
|
||||||
-e 's/ ar/ ${stdenv.cross.config}-ar/' \
|
-e 's/ ar/ ${stdenv.cc.prefix}ar/' \
|
||||||
-e 's/ strip/ ${stdenv.cross.config}-strip/' \
|
-e 's/ strip/ ${stdenv.cc.prefix}strip/' \
|
||||||
-e 's/ windres/ ${stdenv.cross.config}-windres/' \
|
-e 's/ windres/ ${stdenv.cc.prefix}windres/' \
|
||||||
mkspecs/win32-g++/qmake.conf
|
mkspecs/win32-g++/qmake.conf
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -211,7 +210,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
configurePlatforms = [];
|
configurePlatforms = [];
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
} // optionalAttrs isMingw {
|
} // optionalAttrs hostPlatform.isMinGW {
|
||||||
propagatedBuildInputs = [ ];
|
propagatedBuildInputs = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user