Merge branch 'update-java7' of git://github.com/bennofs/nixpkgs
oraclejdk7: add missing dependencies
This commit is contained in:
commit
7939ca1e99
|
@ -6,6 +6,19 @@
|
||||||
, installjdk ? true
|
, installjdk ? true
|
||||||
, pluginSupport ? true
|
, pluginSupport ? true
|
||||||
, installjce ? false
|
, installjce ? false
|
||||||
|
, glib
|
||||||
|
, libxml2
|
||||||
|
, libav_0_8
|
||||||
|
, ffmpeg_0_6
|
||||||
|
, libxslt
|
||||||
|
, mesa_noglu
|
||||||
|
, freetype
|
||||||
|
, fontconfig
|
||||||
|
, gnome
|
||||||
|
, cairo
|
||||||
|
, alsaLib
|
||||||
|
, atk
|
||||||
|
, gdk_pixbuf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||||
|
@ -87,7 +100,7 @@ stdenv.mkDerivation rec {
|
||||||
# construct the rpath
|
# construct the rpath
|
||||||
rpath=
|
rpath=
|
||||||
for i in $libraries; do
|
for i in $libraries; do
|
||||||
rpath=$rpath''${rpath:+:}$i/lib
|
rpath=$rpath''${rpath:+:}$i/lib''${rpath:+:}$i/lib64
|
||||||
done
|
done
|
||||||
|
|
||||||
if test -z "$installjdk"; then
|
if test -z "$installjdk"; then
|
||||||
|
@ -102,6 +115,8 @@ stdenv.mkDerivation rec {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
|
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
|
||||||
|
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server
|
||||||
|
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt
|
||||||
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
|
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
|
||||||
|
|
||||||
# set all the dynamic linkers
|
# set all the dynamic linkers
|
||||||
|
@ -111,6 +126,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
|
||||||
|
|
||||||
|
# HACK: For some reason, appending atk to the global patchelf rpath paths causes:
|
||||||
|
# java: relocation error: java: symbol , version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
|
||||||
|
# Because only libglass.so needs atk, we put it only in it's rpath.
|
||||||
|
# This seems to work fine.
|
||||||
|
patchelf --set-rpath "$rpath:${atk}/lib" $out/jre/lib/${architecture}/libglass.so
|
||||||
|
|
||||||
if test -z "$pluginSupport"; then
|
if test -z "$pluginSupport"; then
|
||||||
rm -f $out/bin/javaws
|
rm -f $out/bin/javaws
|
||||||
if test -n "$installjdk"; then
|
if test -n "$installjdk"; then
|
||||||
|
@ -128,8 +149,8 @@ stdenv.mkDerivation rec {
|
||||||
* libXt is only needed on amd64
|
* libXt is only needed on amd64
|
||||||
*/
|
*/
|
||||||
libraries =
|
libraries =
|
||||||
[stdenv.gcc.libc] ++
|
[stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg_0_6 libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf] ++
|
||||||
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
|
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
|
||||||
|
|
||||||
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
|
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue