Making wxGTK stay wxGTK even cross-built, so I remove the wxMSW code I added
to test the crossbuilding with wxGTK. I added a new windows-specific package: wxMSW. svn path=/nixpkgs/trunk/; revision=21634
This commit is contained in:
parent
4547dffb5d
commit
2c8783a48b
@ -30,21 +30,6 @@ stdenv.mkDerivation {
|
|||||||
"--with-opengl"
|
"--with-opengl"
|
||||||
];
|
];
|
||||||
|
|
||||||
# Cross build only tested for mingw32
|
|
||||||
# Additionally, this should not be called wxGTK anymore, if built for
|
|
||||||
# mingw32. But before placing this in a better place, it helps as a test for
|
|
||||||
# mingw32.
|
|
||||||
crossAttrs = assert stdenv.cross.libc == "msvcrt"; {
|
|
||||||
src = fetchurl {
|
|
||||||
url = mirror://sourceforge/wxwindows/wxWidgets-2.8.11.tar.gz;
|
|
||||||
sha256 = "0icxd21g18d42n1ygshkpw0jnflm03iqki6r623pb5hhd7fm2ksj";
|
|
||||||
};
|
|
||||||
buildInputs = [];
|
|
||||||
propagatedBuildInputs = [];
|
|
||||||
SEARCH_INCLUDE="";
|
|
||||||
SEARCH_LIB="";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This variable is used by configure to find some dependencies.
|
# This variable is used by configure to find some dependencies.
|
||||||
SEARCH_INCLUDE =
|
SEARCH_INCLUDE =
|
||||||
"${libXinerama}/include ${libSM}/include ${libXxf86vm}/include";
|
"${libXinerama}/include ${libSM}/include ${libXxf86vm}/include";
|
||||||
|
40
pkgs/os-specific/windows/wxMSW-2.8/default.nix
Normal file
40
pkgs/os-specific/windows/wxMSW-2.8/default.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{ stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true,
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert stdenv ? cross -> stdenv.cross.libc == "msvcrt";
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "wxMSW-2.8.11";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = mirror://sourceforge/wxwindows/wxWidgets-2.8.11.tar.gz;
|
||||||
|
sha256 = "0icxd21g18d42n1ygshkpw0jnflm03iqki6r623pb5hhd7fm2ksj";
|
||||||
|
};
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
(if compat24 then "--enable-compat24" else "--disable-compat24")
|
||||||
|
(if compat26 then "--enable-compat26" else "--disable-compat26")
|
||||||
|
"--disable-precomp-headers"
|
||||||
|
(if unicode then "--enable-unicode" else "")
|
||||||
|
"--with-opengl"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Cross build only tested for mingw32
|
||||||
|
checkCross = throw "This package can only be cross-built" false;
|
||||||
|
crossAttrs = {
|
||||||
|
checkCross = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
preConfigure = "
|
||||||
|
substituteInPlace configure --replace /usr /no-such-path
|
||||||
|
";
|
||||||
|
|
||||||
|
postBuild = "(cd contrib/src && make)";
|
||||||
|
|
||||||
|
postInstall = "
|
||||||
|
(cd contrib/src && make install)
|
||||||
|
(cd $out/include && ln -s wx-*/* .)
|
||||||
|
";
|
||||||
|
|
||||||
|
passthru = {inherit compat24 compat26 unicode;};
|
||||||
|
}
|
@ -2070,7 +2070,7 @@ let
|
|||||||
|
|
||||||
gccCrossStageStatic = let
|
gccCrossStageStatic = let
|
||||||
isMingw = (stdenv.cross.libc == "msvcrt");
|
isMingw = (stdenv.cross.libc == "msvcrt");
|
||||||
libcCross1 = if isMingw then mingw_headers1 else null;
|
libcCross1 = if isMingw then windows.mingw_headers1 else null;
|
||||||
in
|
in
|
||||||
wrapGCCCross {
|
wrapGCCCross {
|
||||||
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
|
gcc = forceBuildDrv (lib.addMetaAttrs { platforms = []; } (
|
||||||
@ -2088,7 +2088,7 @@ let
|
|||||||
# Only needed for mingw builds
|
# Only needed for mingw builds
|
||||||
gccCrossMingw2 = wrapGCCCross {
|
gccCrossMingw2 = wrapGCCCross {
|
||||||
gcc = gccCrossStageStatic.gcc;
|
gcc = gccCrossStageStatic.gcc;
|
||||||
libc = mingw_headers2;
|
libc = windows.mingw_headers2;
|
||||||
binutils = binutilsCross;
|
binutils = binutilsCross;
|
||||||
cross = assert crossSystem != null; crossSystem;
|
cross = assert crossSystem != null; crossSystem;
|
||||||
};
|
};
|
||||||
@ -3896,7 +3896,7 @@ let
|
|||||||
# We can choose:
|
# We can choose:
|
||||||
libcCrossChooser = name : if (name == "glibc") then glibcCross
|
libcCrossChooser = name : if (name == "glibc") then glibcCross
|
||||||
else if (name == "uclibc") then uclibcCross
|
else if (name == "uclibc") then uclibcCross
|
||||||
else if (name == "msvcrt") then mingw_headers3
|
else if (name == "msvcrt") then windows.mingw_headers3
|
||||||
else throw "Unknown libc";
|
else throw "Unknown libc";
|
||||||
|
|
||||||
libcCross = assert crossSystem != null; libcCrossChooser crossSystem.libc;
|
libcCross = assert crossSystem != null; libcCrossChooser crossSystem.libc;
|
||||||
@ -6703,6 +6703,7 @@ let
|
|||||||
inherit ncurses;
|
inherit ncurses;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
windows = rec {
|
||||||
w32api = makeOverridable (import ../os-specific/windows/w32api) {
|
w32api = makeOverridable (import ../os-specific/windows/w32api) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
@ -6738,6 +6739,11 @@ let
|
|||||||
paths = [ w32api mingw_runtime ];
|
paths = [ w32api mingw_runtime ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wxMSW = makeOverridable (import ../os-specific/windows/wxMSW-2.8) {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
wesnoth = import ../games/wesnoth {
|
wesnoth = import ../games/wesnoth {
|
||||||
inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_net SDL_ttf
|
inherit fetchurl stdenv SDL SDL_image SDL_mixer SDL_net SDL_ttf
|
||||||
gettext zlib boost freetype libpng pkgconfig;
|
gettext zlib boost freetype libpng pkgconfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user