2011-08-01 03:10:16 +02:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
2011-08-01 03:10:28 +02:00
|
|
|
, zip
|
2011-08-01 03:10:16 +02:00
|
|
|
, procps
|
|
|
|
, coreutils
|
|
|
|
, alsaLib
|
|
|
|
, ant
|
2011-08-01 03:11:09 +02:00
|
|
|
, freetype
|
2011-08-01 03:11:40 +02:00
|
|
|
, cups
|
2011-08-01 03:12:19 +02:00
|
|
|
, which
|
2011-08-01 03:12:28 +02:00
|
|
|
, jdk
|
2011-08-01 03:14:49 +02:00
|
|
|
, nettools
|
2011-08-01 03:16:10 +02:00
|
|
|
, libX11
|
2011-08-01 03:16:19 +02:00
|
|
|
, libXt
|
2011-08-01 03:16:27 +02:00
|
|
|
, libXext
|
2011-08-01 03:16:35 +02:00
|
|
|
, libXrender
|
2011-08-01 03:16:42 +02:00
|
|
|
, libXtst
|
2011-08-01 03:16:50 +02:00
|
|
|
, libXi
|
2011-08-01 03:17:16 +02:00
|
|
|
, cpio
|
2011-08-01 20:48:01 +02:00
|
|
|
, jreOnly ? false
|
2011-08-01 03:10:16 +02:00
|
|
|
}:
|
2011-07-28 20:53:12 +02:00
|
|
|
|
2011-08-01 03:08:58 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2011-08-01 20:48:10 +02:00
|
|
|
name = "openj${if jreOnly then "re" else "dk"}-7b127";
|
2011-07-28 20:53:12 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-08-01 03:07:58 +02:00
|
|
|
url = http://www.java.net/download/openjdk/jdk7/promoted/b147/openjdk-7-fcs-src-b147-27_jun_2011.zip;
|
|
|
|
sha256 = "1qhwlz9y5qmwmja4qnxg6sn3pgsg1i11fb9j41w8l26acyhk34rs";
|
2011-07-28 20:53:12 +02:00
|
|
|
};
|
|
|
|
|
2011-08-11 03:12:46 +02:00
|
|
|
jaxws_src_name = "jdk7-jaxws2_2_4-b03-2011_05_27.zip";
|
|
|
|
|
|
|
|
jaxws_src = fetchurl {
|
|
|
|
url = "http://download.java.net/glassfish/components/jax-ws/openjdk/jdk7/${jaxws_src_name}";
|
|
|
|
sha256 = "1mpzgr9lnbf2p3x45npcniy47kbzi3hyqqbd4w3j63sxnxcp5bh5";
|
|
|
|
};
|
|
|
|
|
|
|
|
jaxp_src_name = "jaxp145_01.zip";
|
|
|
|
|
|
|
|
jaxp_src = fetchurl {
|
|
|
|
url = "http://download.java.net/jaxp/1.4.5/${jaxp_src_name}";
|
|
|
|
sha256 = "1js8m1a6lcn95byplmjjs1lja1maisyl6lgfjy1jx3lqi1hlr4n5";
|
|
|
|
};
|
|
|
|
|
2011-08-11 03:12:55 +02:00
|
|
|
jaf_src_name = "jdk7-jaf-2010_08_19.zip";
|
|
|
|
|
|
|
|
jaf_src = fetchurl {
|
|
|
|
url = "http://java.net/downloads/jax-ws/JDK7/${jaf_src_name}";
|
|
|
|
sha256 = "17n0i5cgvfsd6ric70h3n7hr8aqnzd216gaq3603wrxlvggzxbp6";
|
|
|
|
};
|
|
|
|
|
2011-08-11 04:29:10 +02:00
|
|
|
outputs = [ "out" ] ++ stdenv.lib.optionals (! jreOnly) [ "jre" ];
|
|
|
|
|
2011-08-01 03:16:35 +02:00
|
|
|
buildInputs = [
|
|
|
|
unzip
|
|
|
|
procps
|
|
|
|
ant
|
|
|
|
which
|
|
|
|
zip
|
2011-08-01 03:17:16 +02:00
|
|
|
cpio
|
2011-08-01 03:16:35 +02:00
|
|
|
nettools
|
|
|
|
alsaLib
|
|
|
|
libX11
|
|
|
|
libXt
|
|
|
|
libXext
|
|
|
|
libXrender
|
2011-08-01 03:16:42 +02:00
|
|
|
libXtst
|
2011-08-01 03:16:50 +02:00
|
|
|
libXi
|
2011-08-01 04:59:22 +02:00
|
|
|
];
|
2011-08-01 03:08:15 +02:00
|
|
|
|
2011-08-01 03:13:36 +02:00
|
|
|
postUnpack = ''
|
2011-08-11 03:12:46 +02:00
|
|
|
ensureDir drops
|
|
|
|
cp ${jaxp_src} drops/${jaxp_src_name}
|
|
|
|
cp ${jaxws_src} drops/${jaxws_src_name}
|
2011-08-11 03:12:55 +02:00
|
|
|
cp ${jaf_src} drops/${jaf_src_name}
|
2011-08-11 03:12:46 +02:00
|
|
|
export DROPS_PATH=$(pwd)/drops
|
|
|
|
|
2011-08-01 03:15:45 +02:00
|
|
|
sed -i -e "s@/usr/bin/test@${coreutils}/bin/test@" \
|
|
|
|
-e "s@/bin/ls@${coreutils}/bin/ls@" \
|
2011-08-01 03:13:44 +02:00
|
|
|
openjdk/hotspot/make/linux/makefiles/sa.make
|
2011-08-01 03:15:37 +02:00
|
|
|
|
|
|
|
sed -i "s@/bin/echo -e@${coreutils}/bin/echo -e@" \
|
2011-08-01 03:15:53 +02:00
|
|
|
openjdk/{jdk,corba}/make/common/shared/Defs-utils.gmk
|
2011-08-01 03:16:59 +02:00
|
|
|
|
|
|
|
sed -i "s@<Xrender.h>@<X11/extensions/Xrender.h>@" \
|
|
|
|
openjdk/jdk/src/solaris/native/sun/java2d/x11/XRSurfaceData.c
|
2011-08-01 03:13:36 +02:00
|
|
|
'';
|
|
|
|
|
2011-08-11 03:13:04 +02:00
|
|
|
patches = [
|
|
|
|
./cppflags-include-fix.patch
|
|
|
|
./printf-fix.patch
|
|
|
|
./linux-version-check-fix.patch
|
|
|
|
];
|
2011-08-01 03:17:08 +02:00
|
|
|
|
2011-08-01 03:15:29 +02:00
|
|
|
makeFlags = [
|
|
|
|
"SORT=${coreutils}/bin/sort"
|
|
|
|
"ALSA_INCLUDE=${alsaLib}/include/alsa/version.h"
|
|
|
|
"FREETYPE_HEADERS_PATH=${freetype}/include"
|
|
|
|
"FREETYPE_LIB_PATH=${freetype}/lib"
|
|
|
|
"MILESTONE=release"
|
2011-08-11 03:13:12 +02:00
|
|
|
"BUILD_NUMBER=b127"
|
2011-08-01 03:15:29 +02:00
|
|
|
"CUPS_HEADERS_PATH=${cups}/include"
|
|
|
|
"USRBIN_PATH="
|
|
|
|
"COMPILER_PATH="
|
|
|
|
"DEVTOOLS_PATH="
|
|
|
|
"UNIXCOMMAND_PATH="
|
|
|
|
"BOOTDIR=${jdk}"
|
2011-08-11 03:12:46 +02:00
|
|
|
"DROPS_DIR=$(DROPS_PATH)"
|
2011-08-01 03:15:29 +02:00
|
|
|
];
|
2011-08-01 03:08:58 +02:00
|
|
|
|
2011-08-01 03:08:23 +02:00
|
|
|
configurePhase = ''
|
2011-08-01 03:15:29 +02:00
|
|
|
make $makeFlags sanity
|
2011-08-01 03:08:23 +02:00
|
|
|
'';
|
2011-08-01 03:17:33 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir $out
|
2011-08-01 20:48:01 +02:00
|
|
|
cp -av build/*/j2${if jreOnly then "re" else "sdk"}-image/* $out
|
2011-08-11 04:29:10 +02:00
|
|
|
'' + (if jreOnly then "" else ''
|
2011-08-11 15:27:43 +02:00
|
|
|
if [ -z $jre ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2011-08-11 04:29:10 +02:00
|
|
|
ensureDir $jre
|
|
|
|
cp -av build/*/j2re-image/* $jre
|
|
|
|
'');
|
2011-08-01 03:17:42 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://openjdk.java.net/;
|
|
|
|
|
|
|
|
license = "GPLv2";
|
|
|
|
|
|
|
|
description = "The open-source Java Development Kit";
|
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
2011-08-11 03:12:37 +02:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2011-08-01 03:17:42 +02:00
|
|
|
};
|
2011-07-28 20:53:12 +02:00
|
|
|
}
|
2011-08-01 03:08:32 +02:00
|
|
|
|