* Some cleanup of the Opera expression. It doesn't need the libstdcpp

from GCC 3.3 anymore, GCC 4.x is fine.  So we can use the regular Qt
  3 build.  Also, there don't seem to be any references to Motif
  anymore.

svn path=/nixpkgs/trunk/; revision=16932
This commit is contained in:
Eelco Dolstra 2009-09-02 13:24:08 +00:00
parent f560f49faa
commit c26262e72e
3 changed files with 26 additions and 50 deletions

View file

@ -5,38 +5,27 @@ buildPhase() {
}
installPhase() {
set -x
sed -i 's=/bin/pwd=pwd=' install.sh
substituteInPlace install.sh --replace /bin/pwd pwd
# Note: the "no" is because the install scripts asks whether we
# want to install icons in some system-wide directories.
echo no | ./install.sh --prefix=$out
rpath=/no-such-path
for i in $libPath; do
rpath="$rpath:$i/lib"
done
[ -z ${system##*64*} ] && suf=64
# !!! ugh, should fix this eventually; just make a normal gcc dependency
gcc=$(cat $NIX_GCC/nix-support/orig-gcc)
rpath="$rpath:$libstdcpp5/lib$suf"
for i in $out/lib/opera/*/opera $out/lib/opera/*/operaplugincleaner $out/lib/opera/*/operapluginwrapper-native; do
[ -h "$i" ] && i=$(readline "$i")
for i in $out/lib/opera/*/opera $out/lib/opera/*/operaplugincleaner $out/lib/opera/*/operapluginwrapper; do
echo "$i <<<<<<<<<<<<"
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" \
--set-rpath "$libPath" \
"$i"
done
# substitute pwd as late as possible so that the md5 checkusm check of opera passes
sed -i 's=/bin/pwd=pwd=' $out/bin/opera
# Substitute pwd as late as possible so that the md5 checksum check of opera passes.
substituteInPlace $out/bin/opera --replace /bin/pwd pwd
ensureDir $out/share/applications
cp $desktopItem/share/applications/* $out/share/applications
}
genericBuild

View file

@ -1,37 +1,33 @@
{ stdenv, fetchurl, qt, zlib, libX11, libXext, libSM, libICE, libstdcpp5, glibc
, motif ? null, libXt ? null
{ stdenv, fetchurl, qt, zlib, libX11, libXext, libSM, libICE, libXt, glibc
, makeDesktopItem
}:
assert motif != null -> libXt != null;
# !!! Add Xinerama and Xrandr dependencies? Or should those be in Qt?
# Hm, does Opera 9.x still use Motif for anything?
assert stdenv.isLinux;
stdenv.mkDerivation rec {
version = "10.0";
name = "opera-${version}";
inherit libstdcpp5;
name = "opera-10.00";
builder = ./builder.sh;
src = if (stdenv.system == "i686-linux") then
src =
if stdenv.system == "i686-linux" then
fetchurl {
url = http://mirror.liteserver.nl/pub/opera/linux/1000/final/en/i386/shared/opera-10.00.gcc4-shared-qt3.i386.tar.gz ;
url = "http://mirror.liteserver.nl/pub/opera/linux/1000/final/en/i386/shared/${name}.gcc4-shared-qt3.i386.tar.gz";
sha256 = "1l87rxdzq2mb92jbwj4gg79j177yzyfbkqb52gcdwicw8jcmhsad";
} else if (stdenv.system == "x86_64-linux") then
}
else if stdenv.system == "x86_64-linux" then
fetchurl {
url = http://mirror.liteserver.nl/pub/opera/linux/1000/final/en/x86_64/opera-10.00.gcc4-shared-qt3.x86_64.tar.gz ;
url = "http://mirror.liteserver.nl/pub/opera/linux/1000/final/en/x86_64/${name}.gcc4-shared-qt3.x86_64.tar.gz";
sha256 = "0w9a56j3jz0bjdj98k6n4xmrjnkvlxm32cfvh2c0f5pvgwcr642i";
} else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)";
}
else throw "Opera is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
dontStrip = 1;
# operapluginwrapper seems to require libXt ?
# Adding it makes startup faster and omits error messages (on x68)
libPath =
[glibc qt motif zlib libX11 libXt libXext libSM libICE libstdcpp5]
++ (if motif != null then [motif ] else []);
# `operapluginwrapper' requires libXt. Adding it makes startup faster
# and omits error messages (on x86).
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.gcc glibc qt zlib libX11 libXt libXext libSM libICE ];
desktopItem = makeDesktopItem {
name = "Opera";
@ -43,8 +39,8 @@ stdenv.mkDerivation rec {
categories = "Application;Network;";
};
meta = {
homepage = http://www.opera.com;
description = "The Opera web browser";
};
}

View file

@ -4003,12 +4003,6 @@ let
mysqlSupport = getConfig ["qt" "mysql"] false;
};
qt3gcc33 = qt3.override {
stdenv = overrideGCC stdenv gcc33;
openglSupport = false;
mysqlSupport = false;
};
qt3mysql = qt3.override {
mysqlSupport = true;
};
@ -6918,11 +6912,8 @@ let
opera = import ../applications/networking/browsers/opera {
inherit fetchurl zlib glibc stdenv makeDesktopItem;
# stdenv = overrideGCC stdenv gcc40;
inherit (xlibs) libX11 libSM libICE libXt libXext;
#33motif = lesstif;
qt = if (stdenv.system == "i686-linux") then qt3gcc33 else qt3;
libstdcpp5 = (if (stdenv.system == "i686-linux") then gcc33 /* stdc++ 3.8 is used */ else gcc42).gcc;
qt = qt3;
};
pan = import ../applications/networking/newsreaders/pan {