Prelim. support for JDK on PowerPC using IBM's SDK
svn path=/nixpkgs/trunk/; revision=6405
This commit is contained in:
parent
e3e3031d69
commit
6bae4d7e4e
@ -1,7 +1,8 @@
|
|||||||
args:
|
args:
|
||||||
|
|
||||||
if args.stdenv.system == "i686-linux"
|
if args.stdenv.system == "i686-linux" then
|
||||||
then
|
(import ./jdk5-sun-linux.nix) args
|
||||||
(import ./jdk5-sun-linux.nix) args
|
else if args.stdenv.system == "powerpc-linux" then
|
||||||
else
|
(import ./jdk5-ibm-powerpc-linux.nix) args
|
||||||
false
|
else
|
||||||
|
false
|
||||||
|
39
pkgs/development/compilers/jdk/ibm-builder.sh
Normal file
39
pkgs/development/compilers/jdk/ibm-builder.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
if ! test -e "$pathname"; then
|
||||||
|
echo ""
|
||||||
|
echo "SORRY!"
|
||||||
|
echo "You should download \`$(basename $pathname)' from IBM and place it in $(dirname $pathname)."
|
||||||
|
echo "Blame IBM, not us."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
actual=$(md5sum -b $pathname | cut -c1-32)
|
||||||
|
if test "$actual" != "$md5"; then
|
||||||
|
echo "hash is $actual, expected $md5"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tar zxf $pathname || true
|
||||||
|
|
||||||
|
ensureDir $out
|
||||||
|
mv $dirname/* $out/
|
||||||
|
|
||||||
|
# Remove crap in the root directory.
|
||||||
|
for file in $out/*
|
||||||
|
do
|
||||||
|
if test -f $file ; then
|
||||||
|
rm $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Set the dynamic linker.
|
||||||
|
rpath=
|
||||||
|
for i in $libraries; do
|
||||||
|
rpath=$rpath${rpath:+:}$i/lib
|
||||||
|
done
|
||||||
|
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
|
||||||
|
find $out -type f -perm +100 \
|
||||||
|
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
|
||||||
|
--set-rpath "$rpath" {} \;
|
17
pkgs/development/compilers/jdk/jdk5-ibm-powerpc-linux.nix
Normal file
17
pkgs/development/compilers/jdk/jdk5-ibm-powerpc-linux.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ swingSupport ? true
|
||||||
|
, stdenv, fetchurl, unzip, libX11 ? null, libXext ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert stdenv.system == "powerpc-linux";
|
||||||
|
|
||||||
|
assert swingSupport -> libX11 != null && libXext != null;
|
||||||
|
|
||||||
|
(stdenv.mkDerivation {
|
||||||
|
name = "jdk-1.5.0";
|
||||||
|
builder = ./ibm-builder.sh;
|
||||||
|
dirname = "ibm-java2-ppc-50";
|
||||||
|
pathname = "/tmp/ibm-java2-sdk-50-linux-ppc.tgz";
|
||||||
|
md5 = "6bed4ae0b24d3eea2914f2f6dcc0ceb4";
|
||||||
|
libraries =
|
||||||
|
(if swingSupport then [libX11 libXext] else []);
|
||||||
|
} // {inherit swingSupport;})
|
Loading…
x
Reference in New Issue
Block a user