wxwidgets: restructure into one folder

It’s easier to manage these in one folder.

Affected folders from pkgs/development/libraries/:

- wxGTK-2.8
- wxGTK-2.9
- wxGTK-3.0
- wxmac

These will all go into pkgs/development/libraries/wxwidgets for now.
This commit is contained in:
Matthew Bauer
2017-04-23 15:15:46 -05:00
parent 77e6529953
commit 3cc4bfa7a3
5 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,70 @@
{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
, gstreamer, gst-plugins-base, GConf, libX11, cairo
, withMesa ? true, mesa_glu ? null, mesa_noglu ? null
, compat24 ? false, compat26 ? true, unicode ? true,
}:
assert withMesa -> mesa_glu != null && mesa_noglu != null;
with stdenv.lib;
stdenv.mkDerivation rec {
version = "2.8.12.1";
name = "wxGTK-${version}";
src = fetchurl {
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
sha256 = "1l1w4i113csv3bd5r8ybyj0qpxdq83lj6jrc5p7cc10mkwyiagqz";
};
buildInputs = [ gtk2 libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer gst-plugins-base GConf libX11 cairo ]
++ optional withMesa mesa_glu;
nativeBuildInputs = [ pkgconfig ];
hardeningDisable = [ "format" ];
configureFlags = [
"--enable-gtk2"
(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 "")
"--enable-mediactrl"
"--enable-graphics_ctx"
] ++ optional withMesa "--with-opengl";
# These variables are used by configure to find some dependencies.
SEARCH_INCLUDE =
"${libXinerama.dev}/include ${libSM.dev}/include ${libXxf86vm.dev}/include";
SEARCH_LIB =
"${libXinerama.out}/lib ${libSM.out}/lib ${libXxf86vm.out}/lib "
+ optionalString withMesa "${mesa_glu.out}/lib ${mesa_noglu.out}/lib ";
# Work around a bug in configure.
NIX_CFLAGS_COMPILE = [ "-DHAVE_X11_XLIB_H=1" "-lX11" "-lcairo" "-Wno-narrowing" ];
preConfigure = "
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
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;
gtk = gtk2;
};
enableParallelBuilding = true;
meta = {
platforms = stdenv.lib.platforms.linux;
};
}

View File

@@ -0,0 +1,72 @@
{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xf86vidmodeproto
, gstreamer, gst-plugins-base, GConf, setfile
, withMesa ? true, mesa_glu ? null, mesa_noglu ? null
, compat24 ? false, compat26 ? true, unicode ? true
, Carbon ? null, Cocoa ? null, Kernel ? null, QuickTime ? null, AGL ? null
}:
assert withMesa -> mesa_glu != null && mesa_noglu != null;
with stdenv.lib;
let
version = "2.9.4";
in
stdenv.mkDerivation {
name = "wxwidgets-${version}";
src = fetchurl {
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
sha256 = "04jda4bns7cmp7xy68qz112yg0lribpc6xs5k9gilfqcyhshqlvc";
};
buildInputs =
[ gtk2 libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer
gst-plugins-base GConf ]
++ optional withMesa mesa_glu
++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QuickTime ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = optional stdenv.isDarwin AGL;
configureFlags =
[ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
(if compat24 then "--enable-compat24" else "--disable-compat24")
(if compat26 then "--enable-compat26" else "--disable-compat26") ]
++ optional unicode "--enable-unicode"
++ optional withMesa "--with-opengl"
++ optionals stdenv.isDarwin
# allow building on 64-bit
[ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ];
SEARCH_LIB = "${mesa_glu.out}/lib ${mesa_noglu.out}/lib ";
preConfigure = "
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
substituteInPlace configure --replace /usr /no-such-path
" + optionalString stdenv.isDarwin ''
substituteInPlace configure --replace \
'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
substituteInPlace configure --replace \
"-framework System" \
-lSystem
'';
postInstall = "
(cd $out/include && ln -s wx-*/* .)
";
passthru = {
inherit compat24 compat26 unicode;
gtk = gtk2;
};
enableParallelBuilding = true;
meta = {
platforms = with stdenv.lib.platforms; darwin ++ linux;
};
}

View File

@@ -0,0 +1,83 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm
, xf86vidmodeproto , gstreamer, gst-plugins-base, GConf, setfile
, withMesa ? true, mesa_glu ? null, mesa_noglu ? null
, compat24 ? false, compat26 ? true, unicode ? true
, withWebKit ? false, webkitgtk2 ? null
, AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null
}:
assert withMesa -> mesa_glu != null && mesa_noglu != null;
assert withWebKit -> webkitgtk2 != null;
with stdenv.lib;
let
version = "3.0.2";
in
stdenv.mkDerivation {
name = "wxwidgets-${version}";
src = fetchurl {
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
sha256 = "0paq27brw4lv8kspxh9iklpa415mxi8zc117vbbbhfjgapf7js1l";
};
buildInputs =
[ gtk2 libXinerama libSM libXxf86vm xf86vidmodeproto gstreamer
gst-plugins-base GConf ]
++ optional withMesa mesa_glu
++ optional withWebKit webkitgtk2
++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = optional stdenv.isDarwin AGL;
patches = [ (fetchpatch {
url = "https://raw.githubusercontent.com/jessehager/MINGW-packages/af6ece963d8157dd3fbc710bcc190647c4924c63/mingw-w64-wxwidgets/wxWidgets-3.0.2-gcc6-abs.patch";
sha256 = "0100pg0z7i6cjyysf2k3330pmqmdaxgc9hz6kxnfvc31dynjcq3h";
}) ];
configureFlags =
[ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
(if compat24 then "--enable-compat24" else "--disable-compat24")
(if compat26 then "--enable-compat26" else "--disable-compat26") ]
++ optional unicode "--enable-unicode"
++ optional withMesa "--with-opengl"
++ optionals stdenv.isDarwin
# allow building on 64-bit
[ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ]
++ optionals withWebKit
["--enable-webview" "--enable-webview-webkit"];
SEARCH_LIB = "${mesa_glu.out}/lib ${mesa_noglu.out}/lib ";
preConfigure = "
substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE='
substituteInPlace configure --replace 'SEARCH_LIB=' 'DUMMY_SEARCH_LIB='
substituteInPlace configure --replace /usr /no-such-path
" + optionalString stdenv.isDarwin ''
substituteInPlace configure --replace \
'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
substituteInPlace configure --replace \
"-framework System" \
-lSystem
'';
postInstall = "
(cd $out/include && ln -s wx-*/* .)
";
passthru = {
inherit compat24 compat26 unicode;
gtk = gtk2;
};
enableParallelBuilding = true;
meta = {
platforms = with stdenv.lib.platforms; darwin ++ linux;
};
}

View File

@@ -0,0 +1,105 @@
{ stdenv, fetchurl, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib
# darwin only attributes
, derez, rez, setfile
, AGL, Cocoa, Kernel
}:
with stdenv.lib;
stdenv.mkDerivation rec {
version = "3.0.2";
name = "wxmac-${version}";
src = fetchurl {
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
sha256 = "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d";
};
patches =
[ # Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
# with abiguous overloads for clang-3.8 and gcc6.
(fetchpatch {
name = "patch-stc-abs.diff";
url = https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02.patch;
sha256 = "0w5whmfzm8waw62jmippming0zffa9064m5b3aw5nixph21rlcvq";
})
# Various fixes related to Yosemite. Revisit in next stable release.
# Please keep an eye on http://trac.wxwidgets.org/ticket/16329 as well
# Theoretically the above linked patch should still be needed, but it isn't.
# Try to find out why.
(fetchpatch {
name = "patch-yosemite.diff";
url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-yosemite.diff;
sha256 = "0ss66z2a79v976mvlrskyj1zmkyaz8hbwm98p29bscfvcx5845jb";
})
# Remove uncenessary <QuickTime/QuickTime.h> includes
# http://trac.wxwidgets.org/changeset/f6a2d1caef5c6d412c84aa900cb0d3990b350938/git-wxWidgets
(fetchpatch {
name = "patch-quicktime-removal.diff";
url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-quicktime-removal.diff;
sha256 = "0mzvdk8r70p9s1wj7qzdsqmdrlxlf2dalh9gqs8xjkqq2666yp0y";
})
# Patch for wxOSXPrintData, custom paper not applied
# http://trac.wxwidgets.org/ticket/16959
(fetchpatch {
name = "wxPaperCustomPatch.patch";
url = http://trac.wxwidgets.org/raw-attachment/ticket/16959/wxPaperCustomPatch.patch;
sha256 = "0xgscv86f8dhggn9n8bhlq9wlj3ydsicgy9v35sraxyma18cbjvl";
})
];
buildInputs = [
expat libiconv libjpeg libpng libtiff zlib
derez rez setfile
Cocoa Kernel
];
propagatedBuildInputs = [ AGL ];
postPatch = ''
substituteInPlace configure --replace "-framework System" -lSystem
'';
configureFlags = [
"wx_cv_std_libfullpath=/var/empty"
"--with-macosx-version-min=10.7"
"--enable-unicode"
"--with-osx_cocoa"
"--enable-std_string"
"--enable-display"
"--with-opengl"
"--with-libjpeg"
"--with-libtiff"
"--without-liblzma"
"--with-libpng"
"--with-zlib"
"--enable-dnd"
"--enable-clipboard"
"--enable-webkit"
"--enable-svg"
"--enable-graphics_ctx"
"--enable-controls"
"--enable-dataviewctrl"
"--with-expat"
"--disable-precomp-headers"
"--disable-mediactrl"
];
checkPhase = ''
./wx-config --libs
'';
NIX_CFLAGS_COMPILE = "-Wno-undef";
doCheck = true;
enableParallelBuilding = true;
meta = {
platforms = platforms.darwin;
maintainers = [ maintainers.lnl7 ];
};
}