Skip to content

Commit

Permalink
Opera updated - works now on x64-linux as well
Browse files Browse the repository at this point in the history
svn path=/nixpkgs/trunk/; revision=9805
  • Loading branch information
MarcWeber committed Nov 28, 2007
1 parent 7939dcd commit 0250bd7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
11 changes: 5 additions & 6 deletions pkgs/applications/networking/browsers/opera/builder.sh
Expand Up @@ -7,6 +7,7 @@ buildPhase() {

installPhase=installPhase
installPhase() {
sed -i 's=/bin/pwd=pwd=' opera install.sh
# 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
Expand All @@ -16,20 +17,18 @@ installPhase() {
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:$gcc/lib"
rpath="$rpath:$libstdcpp5/lib$suf"

for i in $out/lib/opera/*/opera $out/lib/opera/plugins/opera*; do
for i in $out/lib/opera/*/opera $out/lib/opera/*/operaplugin{wrapper,cleaner}; do
patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" \
"$i"
done

# opera seems to need libnpp.so in the same path ?
# (search the opera help for libnpp..
cp $out/lib/opera/plugins/libnpp.so $out/lib/opera/9*
}

genericBuild
24 changes: 16 additions & 8 deletions pkgs/applications/networking/browsers/opera/default.nix
@@ -1,7 +1,6 @@
{ stdenv, fetchurl, qt, zlib, libX11, libXext, libSM, libICE, libstdcpp5
{ stdenv, fetchurl, qt, zlib, libX11, libXext, libSM, libICE, libstdcpp5, glibc
, motif ? null, libXt ? null}:

assert stdenv.system == "i686-linux";
assert motif != null -> libXt != null;

# !!! Add Xinerama and Xrandr dependencies? Or should those be in Qt?
Expand All @@ -12,13 +11,22 @@ stdenv.mkDerivation rec {
version = "9.24-20071015.5";
name = "opera-${version}";

inherit libstdcpp5;

builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.task.gda.pl/pub/opera/linux/924/final/en/i386/shared/opera-9.24-20071015.5-shared-qt.i386-en.tar.bz2;
sha256 = "1frhnrp63k4lz29a8z9c99h383xrsrby432xp20hxrylh0zypzb5";
};
src = if (stdenv.system == "i686-linux") then
fetchurl {
url = ftp://ftp.task.gda.pl/pub/opera/linux/950b/final/en/i386/shared/opera-9.50b-20071024.5-shared-qt.i386-en.tar.bz2;
sha256 = "0vv1q86is9x6vw8fx92wrnvlyn4x29zgk9zjn66rcx37n6grqqah";
} else if (stdenv.system == "x86_64-linux") then
fetchurl {
url = ftp://ftp.task.gda.pl/pub/opera/linux/950b/final/en/x86_64/opera-9.50-20071024.2-shared-qt.x86_64-1643.tar.bz2;
sha256 = "1gv1r18ar3vz1l24nf8qixjlba1yb5d3xvg3by41i4dy0vlznqn6";
} else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)";

# operapluginwrapper seems to require libXt ?
# Adding it makes startup faster and omits error messages (on x68)
libPath =
[qt motif zlib libX11 libXext libSM libICE libstdcpp5]
++ (if motif != null then [motif libXt ] else []);
[glibc qt motif zlib libX11 libXt libXext libSM libICE libstdcpp5]
++ (if motif != null then [motif ] else []);
}
7 changes: 4 additions & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -4057,11 +4057,12 @@ rec {
};

opera = import ../applications/networking/browsers/opera {
inherit fetchurl stdenv zlib;
inherit fetchurl zlib glibc;
stdenv = overrideGCC stdenv gcc40;
inherit (xlibs) libX11 libSM libICE libXt libXext;
qt = qt3;
#motif = lesstif;
libstdcpp5 = gcc33.gcc;
#33motif = lesstif;
libstdcpp5 = (if (stdenv.system == "i686-linux") then gcc33 /* stdc++ 3.8 is used */ else gcc).gcc;
};

pan = import ../applications/networking/newsreaders/pan {
Expand Down

0 comments on commit 0250bd7

Please sign in to comment.