about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-06-14 21:42:07 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-06-14 21:42:07 +0000
commitfaba06ce549950a2fe20bd152263a2eedd0e2d34 (patch)
treefaf1a47b95f0e4d760662d34831ca8317f361874
parent7219a09001291ef236ad8ac02713096bec0d0c08 (diff)
downloadnixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar.gz
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar.bz2
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar.lz
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar.xz
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.tar.zst
nixlib-faba06ce549950a2fe20bd152263a2eedd0e2d34.zip
* firefox-wrapper: plugins no longer have to declare additional
  LD_LIBRARY_PATH elements, since they can use patchelf --rpath if
  necessary.
* Flashplayer / JRE: do just that.
* JRE: libstdcpp5 no longer seems to be necessary for the plugin.

svn path=/nixpkgs/trunk/; revision=12094
-rw-r--r--pkgs/applications/networking/browsers/firefox-wrapper/builder.sh7
-rw-r--r--pkgs/applications/networking/browsers/firefox-wrapper/default.nix13
-rw-r--r--pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-9/builder.sh10
-rw-r--r--pkgs/applications/video/RealPlayer/builder.sh2
-rw-r--r--pkgs/development/compilers/jdk/default.nix2
-rw-r--r--pkgs/development/compilers/jdk/dlj-bundle-builder.sh14
-rw-r--r--pkgs/development/compilers/jdk/jdk6-linux.nix24
-rw-r--r--pkgs/top-level/all-packages.nix3
8 files changed, 23 insertions, 52 deletions
diff --git a/pkgs/applications/networking/browsers/firefox-wrapper/builder.sh b/pkgs/applications/networking/browsers/firefox-wrapper/builder.sh
deleted file mode 100644
index 4e2f1c5e8f13..000000000000
--- a/pkgs/applications/networking/browsers/firefox-wrapper/builder.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-source $stdenv/setup
-source $makeWrapper
-
-makeWrapper "$firefox/bin/firefox" "$out/bin/firefox$nameSuffix" \
-    --suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
-    --suffix-contents LD_LIBRARY_PATH ':' "$(filterExisting $(addSuffix /extra-library-path $plugins))" \
-    --suffix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))"
diff --git a/pkgs/applications/networking/browsers/firefox-wrapper/default.nix b/pkgs/applications/networking/browsers/firefox-wrapper/default.nix
index 0b1756f21f23..69052d1e89a9 100644
--- a/pkgs/applications/networking/browsers/firefox-wrapper/default.nix
+++ b/pkgs/applications/networking/browsers/firefox-wrapper/default.nix
@@ -1,14 +1,15 @@
-args: with args;
+{stdenv, firefox, nameSuffix ? "", makeWrapper, plugins}:
 
 stdenv.mkDerivation {
   name = firefox.name + "-with-plugins";
 
-  builder = ./builder.sh;
-  makeWrapper = ../../../../build-support/make-wrapper/make-wrapper.sh;
+  buildInputs = [makeWrapper];
 
-  inherit firefox;
-
-  nameSuffix = (if args ? nameSuffix then args.nameSuffix else "");
+  buildCommand = ''
+    makeWrapper "${firefox}/bin/firefox" "$out/bin/firefox${nameSuffix}" \
+        --suffix-each MOZ_PLUGIN_PATH ':' "$plugins" \
+        --suffix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))"
+  '';
 
   # Let each plugin tell us (through its `mozillaPlugin') attribute
   # where to find the plugin in its tree.
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-9/builder.sh b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-9/builder.sh
index 78788a358b00..eeb7e7ecbee0 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-9/builder.sh
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-9/builder.sh
@@ -2,11 +2,13 @@ source $stdenv/setup
 
 buildPhase=true
 
-installCommand=myInstall
-myInstall() {
-    mkdir -p $out/lib/mozilla/plugins
+dontStrip=1
+dontPatchELF=1
+
+installPhase() {
+    ensureDir $out/lib/mozilla/plugins
     cp -p libflashplayer.so $out/lib/mozilla/plugins
-    echo "$zlib/lib:$alsaLib/lib" > $out/lib/mozilla/plugins/extra-library-path
+    patchelf --set-rpath "$zlib/lib:$alsaLib/lib" $out/lib/mozilla/plugins/libflashplayer.so
 }
 
 genericBuild
diff --git a/pkgs/applications/video/RealPlayer/builder.sh b/pkgs/applications/video/RealPlayer/builder.sh
index 298054916317..6a0276d01e4c 100644
--- a/pkgs/applications/video/RealPlayer/builder.sh
+++ b/pkgs/applications/video/RealPlayer/builder.sh
@@ -16,5 +16,5 @@ makeWrapper "$out/real/realplay.bin" "$out/bin/realplay" \
     --set HELIX_LIBS "$out/real" \
     --suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
 
-echo "$libstdcpp5/lib" > $out/real/mozilla/extra-library-path
+#echo "$libstdcpp5/lib" > $out/real/mozilla/extra-library-path # !!! must be updated, use patchelf --rpath
 echo "$out/bin" > $out/real/mozilla/extra-bin-path
diff --git a/pkgs/development/compilers/jdk/default.nix b/pkgs/development/compilers/jdk/default.nix
index c27ce4d16408..6738c8366b4b 100644
--- a/pkgs/development/compilers/jdk/default.nix
+++ b/pkgs/development/compilers/jdk/default.nix
@@ -3,7 +3,7 @@ args:
 if args.stdenv.system == "i686-linux" || args.stdenv.system == "x86_64-linux" then
   (import ./jdk6-linux.nix) args
 else if args.stdenv.system == "powerpc-linux" then
-  (import ./jdk5-ibm-powerpc-linux.nix) (removeAttrs args ["libstdcpp5" "pluginSupport" "xlibs" "installjdk"])
+  (import ./jdk5-ibm-powerpc-linux.nix) (removeAttrs args ["pluginSupport" "xlibs" "installjdk"])
 else
   abort "the JDK is not supported on this platform"
 
diff --git a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
index e0e31e7a75ba..c08a5237f515 100644
--- a/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
+++ b/pkgs/development/compilers/jdk/dlj-bundle-builder.sh
@@ -44,20 +44,10 @@ find $out -type f -perm +100 \
     -exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
     --set-rpath "$rpath" {} \;
 
-function mozillaExtraLibPath() {
-  p=$1
-  if test -e "$p"; then
-    echo "$libstdcpp5/lib" > $p/extra-library-path
-  fi
-}
+find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
 
 if test -z "$pluginSupport"; then
-  rm -f $out/bin/javaws
-else
-  wrapProgram "$out/bin/javaws" \
-    --suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
-
-  mozillaExtraLibPath "$jrePath/plugin/i386/ns7"
+    rm -f $out/bin/javaws
 fi
 
 # Workaround for assertions in xlib, see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373.
diff --git a/pkgs/development/compilers/jdk/jdk6-linux.nix b/pkgs/development/compilers/jdk/jdk6-linux.nix
index 4c1bd88c3665..5dadafe6c370 100644
--- a/pkgs/development/compilers/jdk/jdk6-linux.nix
+++ b/pkgs/development/compilers/jdk/jdk6-linux.nix
@@ -6,14 +6,12 @@
 , xlibs ? null
 , installjdk ? true
 , pluginSupport ? true
-, libstdcpp5 ? null
 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
 assert swingSupport -> xlibs != null;
-assert pluginSupport -> libstdcpp5 != null;
 
-(stdenv.mkDerivation ({
+stdenv.mkDerivation ({
   name =
     if installjdk then "jdk-1.6.0_6" else "jre-1.6.0_6";
 
@@ -61,22 +59,10 @@ assert pluginSupport -> libstdcpp5 != null;
     [stdenv.gcc.libc] ++
     (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
 
-  inherit pluginSupport;
-} // (
-  # necessary for javaws and mozilla plugin
-  if pluginSupport then
-    {
-      libPath = [libstdcpp5];
-      inherit libstdcpp5;
-    }
-  else
-    {}  
-))
-//
-  {
-    inherit swingSupport pluginSupport;
-  }
-// 
+  inherit swingSupport pluginSupport;
+  inherit (xlibs) libX11;
+
+} // 
   /**
    * The mozilla plugin is not available in the amd64 distribution (?)
    */
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index b5c0a3872d19..6069f0d9d8d4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1614,7 +1614,6 @@ let pkgs = rec {
     assert supportsJDK;
     (if pluginSupport then appendToName "plugin" else x: x) (import ../development/compilers/jdk {
       inherit fetchurl stdenv unzip installjdk xlibs pluginSupport makeWrapper;
-      libstdcpp5 = gcc33.gcc;
     });
 
   jikes = import ../development/compilers/jikes {
@@ -6544,7 +6543,7 @@ let pkgs = rec {
   };
 
   wrapFirefox = firefox: nameSuffix: import ../applications/networking/browsers/firefox-wrapper {
-    inherit stdenv firefox nameSuffix;
+    inherit stdenv firefox nameSuffix makeWrapper;
     plugins =
       let enableAdobeFlash = getConfig [ "firefox" "enableAdobeFlash" ] false
             && system == "i686-linux";