# HG changeset patch # User Matthew Sheets # Date 1249300143 0 # Node ID 14b75f02548a18425bdd3cca225586add3cbd7fd # Parent 8ad0e260264949886d78972000cca93ff815bc62 Add: ecj (3.5) diff -r 8ad0e2602649 -r 14b75f02548a ecj/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ecj/receipt Mon Aug 03 11:49:03 2009 +0000 @@ -0,0 +1,41 @@ +# SliTaz package receipt. + +PACKAGE="ecj" +VERSION="3.5" +CATEGORY="development" +SHORT_DESC="The Eclipse standalone batch Java compiler and Ant compiler adapter." +MAINTAINER="rcx@zoominternet.net" +DEPENDS="jre" +BUILD_DEPENDS="" +TARBALL="$PACKAGE-$VERSION.jar" +WEB_SITE="http://www.eclipse.org/jdt/core/" +# 3.4.2: WGET_URL="http://download.eclipse.org/eclipse/downloads/drops/R-$VERSION-200902111700/$TARBALL" +# 3.5: +WGET_URL="http://download.eclipse.org/eclipse/downloads/drops/R-$VERSION-200906111540/$TARBALL" +PROVIDE="jdk" + +# Rules to configure and make the package. +compile_rules() +{ + # Please see the link below for a feature request addressing jar untar errors + # http://labs.slitaz.org/issues/show/133 + echo " ** IGNORING ANY UNTAR ERRORS - UNTAR NOT NEEDED **" + + # Build the ecj shell script to use the current version + mkdir -p $src/_pkg/usr/bin && + echo "#!/bin/sh" > $src/_pkg/usr/bin/ecj && + echo "ECJ_VERSION=$VERSION" >> $src/_pkg/usr/bin/ecj && + cat stuff/ecj.sh.part >> $src/_pkg/usr/bin/ecj && + chmod +x $src/_pkg/usr/bin/ecj && + + mkdir -p $src/_pkg/usr/share/java && + cp -a $SOURCES_REPOSITORY/$TARBALL $src/_pkg/usr/share/java && + echo " ** BUILD SUCCEEDED **" +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs + cp -a $_pkg/usr $fs +} diff -r 8ad0e2602649 -r 14b75f02548a ecj/stuff/ecj.sh.part --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ecj/stuff/ecj.sh.part Mon Aug 03 11:49:03 2009 +0000 @@ -0,0 +1,23 @@ + +if [ -n "$ECJ_VERSION" ] ; then + ECJ_JAR="ecj-$ECJ_VERSION.jar" +else + ECJ_JAR="ecj.jar" +fi + +if [ -z "$JAVA" ] ; then + if [ -n "$(which java)" ] ; then + JAVA=java + elif [ -n "$(which jamvm)" ] ; then + JAVA=jamvm + elif [ -n "$(which gij)" ] ; then + JAVA=gij + elif [ -n "$(which kaffe)" ] ; then + JAVA=kaffe + else + echo "Java interpreter not found" + exit 1 + fi +fi + +$JAVA -cp /usr/share/java/$ECJ_JAR org.eclipse.jdt.internal.compiler.batch.Main "$@"