Backport r32353 from stdenv-udpates

* Get rid of Qt 4.6.  It doesn't compile with GCC 4.6.  There was only
  one application still using it (Caneda), but upgrading it allowed it
  to build with Qt 4.7.

Eelco, could you please fix the date in caneda version?

svn path=/nixpkgs/trunk/; revision=32359
This commit is contained in:
Yury G. Kudryashov 2012-02-17 17:40:58 +00:00
parent 615f0423e8
commit e446dee4c3
4 changed files with 8 additions and 124 deletions

View file

@ -1,10 +1,11 @@
{stdenv, fetchgit, qt4, cmake, libxml2, libxslt}:
let
srcComponents = fetchgit {
url = git://git.tuxfamily.org/gitroot/caneda/components.git;
rev = "9ff20b6ad1b8f639441123f195337121f3b02404";
sha256 = "32f12e72eaadca7b8e409ee12c55fbbdbf43dfa9bc9675ac8458da6393ef3cad";
url = git://caneda.git.sourceforge.net/gitroot/caneda/components;
rev = "34cd36b620e0dfc57ba2d2b6168734ea9a2cfa9a";
sha256 = "840f07921eecbf10e38e44e5c61c716295a16c98fbb75016d9a44e7dfee40e59";
};
in
@ -13,9 +14,9 @@ stdenv.mkDerivation rec {
name = "caneda-git-2010-10-24";
src = fetchgit {
url = git://git.tuxfamily.org/gitroot/caneda/caneda.git;
rev = "62fc0d8e248705ea51269dce8f291ff69924728e";
sha256 = "8fa928b7dbd235eff3d938c5a1212ee360c6a90aab7b396eea2f5fe68aba7ab0";
url = git://caneda.git.sourceforge.net/gitroot/caneda/caneda;
rev = "fff9e2f7988fe5d062548cafeda1e5cd660769d1";
sha256 = "dfbcac97f5a1b41ad9a63392394f37fb294cbf78c576673c9bc4a5370957b2c8";
};
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];

View file

@ -1,101 +0,0 @@
{ stdenv, fetchurl
, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu
, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig
, zlib, libjpeg, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib
, mysql, postgresql
, perl, coreutils, libXi, sqlite, alsaLib
, buildDemos ? false, buildExamples ? false, useDocs ? true}:
stdenv.mkDerivation rec {
name = "qt-4.6.3";
src = fetchurl {
url = ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.3.tar.gz;
sha256 = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768";
};
preConfigure = ''
export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH"
configureFlags+="
-docdir $out/share/doc/${name}
-plugindir $out/lib/qt4/plugins
-examplesdir $out/share/doc/${name}/examples
-demosdir $out/share/doc/${name}/demos
-datadir $out/share/qt4
"
'';
propagatedBuildInputs = [
alsaLib
sqlite
libXft
libXrender
libXrandr
libXi
randrproto
xextproto
libXinerama
xineramaproto
libXcursor
zlib
libjpeg
mysql
postgresql
libpng
which
mesa
libXmu
openssl
dbus.libs
cups
pkgconfig
libXext
freetype
fontconfig
inputproto
fixesproto
libXfixes
glib
libtiff
];
buildInputs = [ perl ];
# libQtNetwork will call libQtCore for it to dlopen openssl.
NIX_LDFLAGS = "-rpath ${openssl}/lib";
# Don't shrink the rpath, to keep ${openssl} in it.
dontPatchELF = 1;
prefixKey = "-prefix ";
configureFlags = ''
-v -no-separate-debug-info -release
-system-zlib -system-libpng -system-libjpeg -fast
-qt-gif -confirm-license -opensource
-opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql -system-sqlite
-qdbus -cups -glib -xfixes -dbus-linked
-fontconfig -I${freetype}/include/freetype2
-exceptions -xmlpatterns
${if buildDemos == true then "" else "-nomake demos"}
${if buildExamples == true then "" else "-nomake examples"}
${if useDocs then "" else "-nomake docs"}
'';
patchPhase = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf
'';
postInstall = if useDocs then "rm -rf $out/share/doc/${name}/{html,src}" else "";
enableParallelBuilding = true;
meta = {
homepage = http://qt.nokia.com/products;
description = "A cross-platform application framework for C++";
license = "GPL/LGPL";
maintainers = with stdenv.lib.maintainers; [ sander urkud ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,9 +0,0 @@
export QTDIR=@out@
if [ -n "$includeAllQtDirs" ]; then
# This helps for g++, but not for moc. And no qt4 package should expect
# having all qt4 header files dirs into -I.
for d in @out@/include/*; do
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d"
done
fi

View file

@ -4538,10 +4538,6 @@ let
qt4 = pkgs.kde4.qt4;
qt46 = callPackage ../development/libraries/qt-4.x/4.6 {
inherit (gnome) glib;
};
qt47 = callPackage ../development/libraries/qt-4.x/4.7 {
inherit (pkgs.gnome) glib;
};
@ -8442,10 +8438,7 @@ let
### SCIENCE / ELECTRONICS
caneda = callPackage ../applications/science/electronics/caneda {
# At the time of writing, it fails to build with qt47
qt4 = qt46;
};
caneda = callPackage ../applications/science/electronics/caneda { };
gtkwave = callPackage ../applications/science/electronics/gtkwave { };