Make jdk plugin support optional to avoid deps on gcc 3.3.6 everywhere.
svn path=/nixpkgs/trunk/; revision=8452
This commit is contained in:
parent
e0ad264f43
commit
9d9372cd58
@ -43,18 +43,20 @@ find $out -type f -perm +100 \
|
|||||||
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "$rpath" {} \;
|
--set-rpath "$rpath" {} \;
|
||||||
|
|
||||||
mv $out/bin/javaws $out/bin/javaws.bin
|
|
||||||
makeWrapper "$out/bin/javaws.bin" "$out/bin/javaws" \
|
|
||||||
--suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
|
|
||||||
|
|
||||||
|
|
||||||
function mozillaExtraLibPath() {
|
function mozillaExtraLibPath() {
|
||||||
p=$1
|
p=$1
|
||||||
|
|
||||||
if test -e "$p"; then
|
if test -e "$p"; then
|
||||||
echo "$libstdcpp5/lib" > $p/extra-library-path
|
echo "$libstdcpp5/lib" > $p/extra-library-path
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mozillaExtraLibPath "$out/jre/plugin/i386/ns7"
|
if test -z "$pluginSupport"; then
|
||||||
mozillaExtraLibPath "$out/plugin/i386/ns7"
|
rm $out/bin/javaws
|
||||||
|
else
|
||||||
|
mv $out/bin/javaws $out/bin/javaws.bin
|
||||||
|
makeWrapper "$out/bin/javaws.bin" "$out/bin/javaws" \
|
||||||
|
--suffix-each LD_LIBRARY_PATH ':' "$(addSuffix /lib $libPath)"
|
||||||
|
|
||||||
|
mozillaExtraLibPath "$out/jre/plugin/i386/ns7"
|
||||||
|
mozillaExtraLibPath "$out/plugin/i386/ns7"
|
||||||
|
fi
|
@ -4,13 +4,15 @@
|
|||||||
, unzip
|
, unzip
|
||||||
, xlibs ? null
|
, xlibs ? null
|
||||||
, installjdk ? true
|
, installjdk ? true
|
||||||
, libstdcpp5
|
, pluginSupport ? true
|
||||||
|
, libstdcpp5 ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||||
assert swingSupport -> xlibs != null;
|
assert swingSupport -> xlibs != null;
|
||||||
|
assert pluginSupport -> libstdcpp5 != null;
|
||||||
|
|
||||||
(stdenv.mkDerivation {
|
(stdenv.mkDerivation ({
|
||||||
name =
|
name =
|
||||||
if installjdk then "jdk-1.6.0" else "jre-1.6.0";
|
if installjdk then "jdk-1.6.0" else "jre-1.6.0";
|
||||||
|
|
||||||
@ -53,14 +55,21 @@ assert swingSupport -> xlibs != null;
|
|||||||
libraries =
|
libraries =
|
||||||
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []);
|
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi] else []);
|
||||||
|
|
||||||
|
inherit pluginSupport;
|
||||||
|
} // (
|
||||||
# necessary for javaws and mozilla plugin
|
# necessary for javaws and mozilla plugin
|
||||||
|
if pluginSupport then
|
||||||
|
{
|
||||||
makeWrapper = ../../../build-support/make-wrapper/make-wrapper.sh;
|
makeWrapper = ../../../build-support/make-wrapper/make-wrapper.sh;
|
||||||
libPath = [libstdcpp5];
|
libPath = [libstdcpp5];
|
||||||
inherit libstdcpp5;
|
inherit libstdcpp5;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
))
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
inherit swingSupport;
|
inherit swingSupport pluginSupport;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
|
@ -748,10 +748,12 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
jre = jdkdistro false;
|
jre = jdkdistro false true;
|
||||||
jdk = jdkdistro true;
|
jdk = jdkdistro true true;
|
||||||
|
|
||||||
jdkdistro = installjdk :
|
jdkNoPlugin = jdkdistro true false;
|
||||||
|
|
||||||
|
jdkdistro = installjdk : pluginSupport:
|
||||||
if stdenv.isDarwin then
|
if stdenv.isDarwin then
|
||||||
"/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
|
"/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user