3
0
Fork 0
forked from mirrors/nixpkgs

ECJ: Merge the 2 expressions.

svn path=/nixpkgs/trunk/; revision=17354
This commit is contained in:
Ludovic Courtès 2009-09-22 14:40:54 +00:00
parent a4af741f8d
commit 03043bce33
4 changed files with 55 additions and 86 deletions

View file

@ -1,48 +0,0 @@
{ fetchurl, stdenv, unzip, ant }:
let
version = "3.5";
date = "200906111540";
in
stdenv.mkDerivation rec {
name = "ecj-${version}";
src = fetchurl {
url = "http://eclipse.ialto.org/eclipse/downloads/drops/R-${version}-${date}/ecjsrc-${version}.zip";
sha256 = "0f5xfi0458w31dr4pkvrjh1f9h2hbn7ssq9gnnma6gznj45jvy7k";
};
buildInputs = [ unzip ant ];
unpackPhase = ''
mkdir "${name}"
cd "${name}"
unzip "$src"
'';
# Use whatever compiler Ant knows.
buildPhase = "ant build";
installPhase = ''
mkdir -pv "$out/lib/java"
cp -v *.jar "$out/lib/java"
'';
meta = {
description = "The Eclipse Compiler for Java (ECJ)";
longDescription = ''
ECJ is an incremental Java compiler. Implemented as an Eclipse
builder, it is based on technology evolved from VisualAge for Java
compiler. In particular, it allows users to run and debug code which
still contains unresolved errors.
'';
homepage = http://www.eclipse.org/jdt/core/index.php;
# http://www.eclipse.org/legal/epl-v10.html (free software, copyleft)
license = "EPLv1.0";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
}

View file

@ -1,21 +0,0 @@
source $stdenv/setup
unzip $src
cd jdtcoresrc
ant -f compilejdtcorewithjavac.xml
mkdir -p $out/share/ecj
mv ecj.jar $out/share/ecj
mkdir -p $out/bin
cat >> $out/bin/ecj <<EOF
#! /bin/sh
export JAVA_HOME=$jre
export LANG="en_US"
$jre/bin/java -cp $out/share/ecj/ecj.jar org.eclipse.jdt.internal.compiler.batch.Main \$@
EOF
chmod u+x $out/bin/ecj

View file

@ -1,13 +1,56 @@
{stdenv, fetchurl, unzip, ant, jre}:
{ stdenv, fetchurl, unzip, ant, gcj }:
stdenv.mkDerivation {
name = "ecj-3.1";
builder = ./builder.sh;
src = fetchurl {
url = ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/R-3.1-200506271435/eclipse-sourceBuild-srcIncluded-3.1.zip;
md5 = "19ad65d52005da5eaa1d3687b3a50de2";
};
let
version = "3.5";
date = "200906111540";
in
stdenv.mkDerivation rec {
name = "ecj-${version}";
inherit jre;
buildInputs = [unzip ant jre];
}
src = fetchurl {
url = "http://eclipse.ialto.org/eclipse/downloads/drops/R-${version}-${date}/ecjsrc-${version}.zip";
sha256 = "0f5xfi0458w31dr4pkvrjh1f9h2hbn7ssq9gnnma6gznj45jvy7k";
};
buildInputs = [ unzip ant gcj ];
unpackPhase = ''
mkdir "${name}"
cd "${name}"
unzip "$src"
'';
# Use whatever compiler Ant knows.
buildPhase = "ant build";
installPhase = ''
mkdir -pv "$out/lib/java"
cp -v *.jar "$out/lib/java"
mkdir -pv "$out/bin"
cat > "$out/bin/ecj" <<EOF
#! /bin/sh
exec "$(type -P gij)" --cp "$out/lib/java/ecj.jar" org.eclipse.jdt.internal.compiler.batch.Main \$@
EOF
chmod u+x "$out/bin/ecj"
'';
meta = {
description = "The Eclipse Compiler for Java (ECJ)";
longDescription = ''
ECJ is an incremental Java compiler. Implemented as an Eclipse
builder, it is based on technology evolved from VisualAge for Java
compiler. In particular, it allows users to run and debug code which
still contains unresolved errors.
'';
homepage = http://www.eclipse.org/jdt/core/index.php;
# http://www.eclipse.org/legal/epl-v10.html (free software, copyleft)
license = "EPLv1.0";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
}

View file

@ -654,11 +654,6 @@ let
inherit fetchurl stdenv cdrkit m4;
};
# FIXME: Remove/merge with `ecj'.
ecjNew = import ../development/compilers/ecj {
inherit fetchurl stdenv unzip ant;
};
enblendenfuse = import ../tools/graphics/enblend-enfuse {
inherit fetchurl stdenv libtiff libpng lcms libxmi boost;
};
@ -2397,7 +2392,7 @@ let
};
ecj = import ../development/eclipse/ecj {
inherit fetchurl stdenv unzip jre ant;
inherit fetchurl stdenv unzip ant gcj;
};
jdtsdk = import ../development/eclipse/jdt-sdk {