aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Heinold <h.heinold@tarent.de>2010-07-12 14:08:46 +0200
committerHenning Heinold <h.heinold@tarent.de>2010-07-26 15:34:20 +0200
commit63fe962867e2017d18a333d7306ba64ef6a62dee (patch)
treee30c344cc9ec30bf5d28f340cc489a8ea29afbac
parent547609d8446451104796ff77d6e2e95adb606c3f (diff)
downloadopenembedded-63fe962867e2017d18a333d7306ba64ef6a62dee.zip
openembedded-63fe962867e2017d18a333d7306ba64ef6a62dee.tar.gz
openembedded-63fe962867e2017d18a333d7306ba64ef6a62dee.tar.bz2
ant: backport from openembedded-dev
Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
-rw-r--r--conf/checksums.ini4
-rw-r--r--recipes/ant/ant-native_1.7.1.bb64
-rwxr-xr-xrecipes/ant/files/ant10
3 files changed, 78 insertions, 0 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini
index 909ade7..2c18f2e 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -1622,6 +1622,10 @@ sha256=4dc49a7260ef90a6dc6611b7e96b9f047d507589736d4a2ad6efbe3edfc6fba6
md5=2a44ff60456cf67bb83771cfcedb8e33
sha256=1a2fceea38f04e6fea0c0cb8ad7312dc948004af4d9308b5e630d299d89dfb38
+[http://archive.apache.org/dist/ant/source/apache-ant-1.7.1-src.tar.gz]
+md5=2a44ff60456cf67bb83771cfcedb8e33
+sha256=1a2fceea38f04e6fea0c0cb8ad7312dc948004af4d9308b5e630d299d89dfb38
+
[http://archive.apache.org/dist/logging/log4j/1.2.15/apache-log4j-1.2.15.tar.gz]
md5=10f04abe4d68d5a89e8eb167e4e45e1a
sha256=f5d9f6aa78b9156ae2de2a32d0f26507d2e73db4993d501db2e79f0bd803ab31
diff --git a/recipes/ant/ant-native_1.7.1.bb b/recipes/ant/ant-native_1.7.1.bb
new file mode 100644
index 0000000..68201d3
--- /dev/null
+++ b/recipes/ant/ant-native_1.7.1.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "Another Neat Tool - build system for Java"
+LICENSE = "AL2.0"
+
+AUTHOR = "Apache Software Foundation"
+HOMEPAGE = "http://ant.apache.org"
+
+SRC_URI = "\
+ http://archive.apache.org/dist/ant/source/apache-ant-${PV}-src.tar.gz \
+ file://ant \
+ "
+
+S = "${WORKDIR}/apache-ant-${PV}"
+
+inherit java-library java-native
+
+DEPENDS = "\
+ fastjar-native \
+ jsch-native bsf-native xalan-j-native xerces-j-native \
+ xml-commons-resolver1.1-native gnumail-native gnujaf-native \
+ bcel-native regexp-native log4j1.2-native antlr-native oro-native \
+ junit-native jdepend-native commons-net-native commons-logging-native \
+ "
+
+do_removecruft() {
+ # Removes thing that need proprietary Jar files or are otherwise problematic
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/image
+ rm -rf ${S}/src/main/org/apache/tools/ant/types/optional/image
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/ejb
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/scm
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/starteam
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
+}
+
+addtask removecruft before do_patch after do_unpack
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s jsch bsf xalan2 xercesImpl resolver gnumail gnujaf bcel regexp log4j1.2 antlr oro junit jdepend commons-net commons-logging
+ cp=build:$cp
+
+ find src/main -name "*.java" > java_files
+
+ javac -sourcepath src/main -cp $cp -d build @java_files
+
+ mkdir -p build/org/apache/tools/ant/types/conditions
+
+ cp -r src/resources/org build/
+ (cd src/main && find . \( -name "*.properties" -or -name "*.xml" -or -name "*.mf" \) -exec cp {} ../../build/{} \;)
+
+ echo "VERSION=${PV}" > build/org/apache/tools/ant/version.txt
+ echo "DATE=`date -R`" >> build/org/apache/tools/ant/version.txt
+
+ fastjar -C build -c -f ${JARFILENAME} .
+
+ oe_makeclasspath cp -s ecj-bootstrap jsch bsf xalan2 xercesImpl resolver gnumail gnujaf bcel regexp log4j1.2 antlr oro junit jdepend commons-net commons-logging
+ cp=${STAGING_DATADIR_JAVA_NATIVE}/ant.jar:${STAGING_DATADIR}/classpath/tools.zip:$cp
+ sed -i -e"s|@JAR_FILE@|$cp|" ${WORKDIR}/ant
+}
+
+do_stage_append() {
+ install -d ${bindir}
+ install -m 0755 ${WORKDIR}/ant ${bindir}
+}
diff --git a/recipes/ant/files/ant b/recipes/ant/files/ant
new file mode 100755
index 0000000..bb282a9
--- /dev/null
+++ b/recipes/ant/files/ant
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export CLASSPATH
+CLASSPATH=$CLASSPATH:@JAR_FILE@
+
+if [ ! $JAVA ];then
+ JAVA=java
+fi
+
+$JAVA org.apache.tools.ant.launch.Launcher $*