[oe-commits] Robert Schuster : ant-native 1.7.1: New recipe (from Jalimo SVN).

git version control git at git.openembedded.org
Fri Sep 18 14:39:13 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 83be2434e283e53f545fb433b8a1373710d880c1
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=83be2434e283e53f545fb433b8a1373710d880c1

Author: Robert Schuster <robertschuster at fsfe.org>
Date:   Fri Sep 18 15:00:18 2009 +0200

ant-native 1.7.1: New recipe (from Jalimo SVN).

---

 recipes/ant/ant-native_1.7.1.bb |   64 +++++++++++++++++++++++++++++++++++++++
 recipes/ant/files/ant           |   10 ++++++
 2 files changed, 74 insertions(+), 0 deletions(-)

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..baf40e0
--- /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://ftp.riken.jp/net/apache/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 $*





More information about the Openembedded-commits mailing list