summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2008-11-09 00:19:14 +0000
committerVlastimil Babka <caster@gentoo.org>2008-11-09 00:19:14 +0000
commit1fdae7b0925e9e546c750b223328c70eb49151c8 (patch)
tree35adbb19d50018d8f0ffc3fa67248b9a276b7833 /dev-java/ant-core
parentUnset ANT_RESPECT_JAVA_HOME introduced to fix bug #151884. (diff)
downloadhistorical-1fdae7b0925e9e546c750b223328c70eb49151c8.tar.gz
historical-1fdae7b0925e9e546c750b223328c70eb49151c8.tar.bz2
historical-1fdae7b0925e9e546c750b223328c70eb49151c8.zip
Revbump to respect JAVA_HOME setting if ANT_RESPECT_JAVA_HOME is set, bug #151884.
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.27-gentoo-r1-perfctr x86_64
Diffstat (limited to 'dev-java/ant-core')
-rw-r--r--dev-java/ant-core/ChangeLog9
-rw-r--r--dev-java/ant-core/Manifest4
-rw-r--r--dev-java/ant-core/ant-core-1.7.1-r2.ebuild102
-rw-r--r--dev-java/ant-core/files/1.7.1-ant-r1204
4 files changed, 317 insertions, 2 deletions
diff --git a/dev-java/ant-core/ChangeLog b/dev-java/ant-core/ChangeLog
index 5a1aa624a5c2..eddf9c1de607 100644
--- a/dev-java/ant-core/ChangeLog
+++ b/dev-java/ant-core/ChangeLog
@@ -1,11 +1,18 @@
# ChangeLog for dev-java/ant-core
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ChangeLog,v 1.85 2008/07/16 21:25:23 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ChangeLog,v 1.86 2008/11/09 00:19:14 caster Exp $
# Ant-core blocks lower/older versions of ant-tasks,
# since it will not run when there is a version mismatch betwean the 2 packages
# Please unemerge ant-tasks when updating ant-core.
+*ant-core-1.7.1-r2 (09 Nov 2008)
+
+ 09 Nov 2008; Vlastimil Babka <caster@gentoo.org> +files/1.7.1-ant-r1,
+ +ant-core-1.7.1-r2.ebuild:
+ Revbump to respect JAVA_HOME setting if ANT_RESPECT_JAVA_HOME is set, bug
+ #151884.
+
16 Jul 2008; Vlastimil Babka <caster@gentoo.org> ant-core-1.7.1-r1.ebuild:
Rewrite build.xml for 1.4 bytecode. Fixes bug #196080.
diff --git a/dev-java/ant-core/Manifest b/dev-java/ant-core/Manifest
index e093fa0cc05d..98c2d4a5191f 100644
--- a/dev-java/ant-core/Manifest
+++ b/dev-java/ant-core/Manifest
@@ -1,5 +1,6 @@
AUX 1.7.0-ant 5996 RMD160 d523fc2f9cef31e77980de4d367265e205856a0e SHA1 356bc5bfe466969d292b3b6fae4b3f4d97239945 SHA256 d90dac639da2564d16b11f02dad6327bce40082ca00d671c77826a4cda6a1537
AUX 1.7.1-ant 5996 RMD160 131664c910a23f3ee4136fb60733eef699e0b6aa SHA1 0adeb2f78824eac0c5bca84446f4853f2be1f42e SHA256 3a162dfb297eadaa30feed4b130819b5acd50aec00417a9129d1e856cf844bfb
+AUX 1.7.1-ant-r1 6239 RMD160 f942c93807c332ad348a3e7d4c234940f3e02c5a SHA1 5b1c278727f06a0a7f5a17cf33b832890f388e0e SHA256 b356287d56db9c72e39ccb9785bfaf8db06b67a601c939db7f48014428ccea4d
AUX ant-core-1.7.0-services.patch 792 RMD160 d9d5e69860428301f3e27475835781938f1abb14 SHA1 c7502fa3e1481a68d3b8533d4673fce5831fd225 SHA256 fa45cd934948dd3b2df5cd56fba3be54eb54d8476b9a2bc3289fd2fe28a1f357
DIST ant-1.7.0-gentoo.tar.bz2 11720 RMD160 51d24f2c0c98195ed6ef1852045201a567a5d9ea SHA1 41acb8398a5ac9713dec30d6305b5abc6c014fff SHA256 7b1e0c63bec193c010c3fcca7a3524e2e35cc4ca56b86e4571737ac1e169e35c
DIST ant-1.7.1-gentoo.tar.bz2 11836 RMD160 9194996b5b04113d2a6542221890e1ef3f7953d0 SHA1 ef848268ec2b7ecd9aca2f8a3d6705ec8386a621 SHA256 4bacd711cc4981272b8377335dafcb8841dd1fac177c0c349f3faf78b0354fe5
@@ -9,5 +10,6 @@ EBUILD ant-core-1.7.0-r1.ebuild 2587 RMD160 948138f4244d6eeab41d8d0c6960498f01e1
EBUILD ant-core-1.7.0-r2.ebuild 2647 RMD160 91738c8636b2c3f78792eac2f2837fc7308df125 SHA1 70e7a762443c0056ebffe884cc5d222fb5f3dd44 SHA256 b87ca01ec3f9255ca6bbe19471919b32ee73fb2d9f139e39a126eb42bccaedc9
EBUILD ant-core-1.7.0.ebuild 2552 RMD160 418c8d927107524c849e1d0ff12861448ef77309 SHA1 2f8509ec164c3d70d9bd5482dbdc2c7038ea9f24 SHA256 607185bb6d56d749d32b38dc740db00f498bafe04656127a582d329304995e4a
EBUILD ant-core-1.7.1-r1.ebuild 2784 RMD160 27a9ffe314536c812577b73312178df543ec0a9f SHA1 5076398f0441cfd93ef00a105037954c06f1212b SHA256 8633fd7d974677e923b062e23a36fab61a7d30acdbaf7783dd13b51279da3319
-MISC ChangeLog 26182 RMD160 dca721aa0359ba64b1b3b4c30d17c4433a5446b8 SHA1 a68820d945f13f9549d8ffedbb7ce45ea83ebd3f SHA256 7a48c6ec1839c9cd56cd92dddecc20b76972b6b37a15517777d76be8829d34f1
+EBUILD ant-core-1.7.1-r2.ebuild 2787 RMD160 63bfca31436af61c61613c58e1d27ec003676f79 SHA1 90dc1f8beb755f950bef0f7b6361b897aa8d63b5 SHA256 3ab4497bae0c875387516d16ea9c7403e22c6be4d8591b936d1ed03f4c7232ec
+MISC ChangeLog 26405 RMD160 8d103df6d136a8bb3949f0391415be89c58e8f20 SHA1 33306fa879bea842d904b28cf361694d87f4995a SHA256 6b55a478d59083a96042cbc87fe81daf900d708d1b70fffa77ddd394f4179e64
MISC metadata.xml 158 RMD160 493079b5fb71d66863beea1b023901c90ba81be5 SHA1 77cd509a8b3c377b9a24480b48a5d5481b7874f1 SHA256 ea882ceccfd160b16cf7e79de423bdcc12b3fa000f124491a6df36f5783894fb
diff --git a/dev-java/ant-core/ant-core-1.7.1-r2.ebuild b/dev-java/ant-core/ant-core-1.7.1-r2.ebuild
new file mode 100644
index 000000000000..8f742ea1388a
--- /dev/null
+++ b/dev-java/ant-core/ant-core-1.7.1-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/ant-core-1.7.1-r2.ebuild,v 1.1 2008/11/09 00:19:14 caster Exp $
+
+# don't depend on itself
+JAVA_ANT_DISABLE_ANT_CORE_DEP=true
+# rewriting build.xml files for the testcases has no reason atm
+JAVA_PKG_BSFIX_ALL=no
+JAVA_PKG_IUSE="doc source"
+inherit java-pkg-2 java-ant-2
+
+MY_P="apache-ant-${PV}"
+
+DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files."
+HOMEPAGE="http://ant.apache.org/"
+SRC_URI="mirror://apache/ant/source/${MY_P}-src.tar.bz2
+ mirror://gentoo/ant-${PV}-gentoo.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=">=virtual/jdk-1.4
+ !dev-java/ant-tasks
+ !dev-java/ant-optional"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # remove bundled xerces
+ rm -v lib/*.jar || die
+
+ # use our split-ant build.xml
+ mv -f "${WORKDIR}/build.xml" . || die
+
+ # bug #196080
+ java-ant_bsfix_one build.xml
+}
+
+src_compile() {
+ export ANT_HOME=""
+
+ local bsyscp
+
+ # this ensures that when building ant with bootstrapped ant,
+ # only the source is used for resolving references, and not
+ # the classes in bootstrapped ant
+ # but jikes in kaffe has issues with this...
+ if ! java-pkg_current-vm-matches kaffe; then
+ bsyscp="-Dbuild.sysclasspath=ignore"
+ fi
+
+ ./build.sh ${bsyscp} jars-core internal_dist $(use_doc javadocs) \
+ || die "build failed"
+}
+
+src_install() {
+ dodir /usr/share/ant/lib
+ for jar in ant.jar ant-bootstrap.jar ant-launcher.jar ; do
+ java-pkg_dojar build/lib/${jar}
+ dosym /usr/share/${PN}/lib/${jar} /usr/share/ant/lib/${jar}
+ done
+
+ newbin "${FILESDIR}/${PV}-ant-r1" ant || die "failed to install wrapper"
+ dodir /usr/share/${PN}/bin
+ for each in antRun runant.pl runant.py complete-ant-cmd.pl ; do
+ dobin "${S}/src/script/${each}"
+ dosym /usr/bin/${each} /usr/share/${PN}/bin/${each}
+ done
+ dosym /usr/share/${PN}/bin /usr/share/ant/bin
+
+ insinto /usr/share/${PN}
+ doins -r dist/etc
+ dosym /usr/share/${PN}/etc /usr/share/ant/etc
+
+ echo "ANT_HOME=\"/usr/share/ant\"" > "${T}/20ant"
+ doenvd "${T}/20ant" || die "failed to install env.d file"
+
+ dodoc README WHATSNEW KEYS
+
+ if use doc; then
+ dohtml welcome.html
+ dohtml -r docs/*
+ java-pkg_dojavadoc --symlink manual/api build/javadocs
+ fi
+
+ use source && java-pkg_dosrc src/main/*
+}
+
+pkg_postinst() {
+ elog "The way of packaging ant in Gentoo has changed significantly since"
+ elog "the 1.7.0 version, For more information, please see:"
+ elog "http://www.gentoo.org/proj/en/java/ant-guide.xml"
+ elog
+ elog "Since 1.7.1, the ant-tasks meta-ebuild has been removed and its USE"
+ elog "flags have been moved to dev-java/ant."
+}
diff --git a/dev-java/ant-core/files/1.7.1-ant-r1 b/dev-java/ant-core/files/1.7.1-ant-r1
new file mode 100644
index 000000000000..1b20e5fa96bb
--- /dev/null
+++ b/dev-java/ant-core/files/1.7.1-ant-r1
@@ -0,0 +1,204 @@
+#! /bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Edited for Gentoo Linux
+# $Header: /var/cvsroot/gentoo-x86/dev-java/ant-core/files/1.7.1-ant-r1,v 1.1 2008/11/09 00:19:14 caster Exp $
+
+# Extract launch and ant arguments, (see details below).
+ant_exec_args=
+no_config=false
+use_jikes_default=false
+ant_exec_debug=false
+show_help=false
+for arg in "$@" ; do
+ if [ "$arg" = "--noconfig" ] ; then
+ no_config=true
+ elif [ "$arg" = "--usejikes" ] ; then
+ use_jikes_default=true
+ elif [ "$arg" = "--execdebug" ] ; then
+ ant_exec_debug=true
+ elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then
+ show_help=true
+ ant_exec_args="$ant_exec_args -h"
+ else
+ if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then
+ show_help=true
+ fi
+ ant_exec_args="$ant_exec_args \"$arg\""
+ fi
+done
+
+# Source/default ant configuration
+if $no_config ; then
+ rpm_mode=false
+ usejikes=$use_jikes_default
+else
+ # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+ if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
+ if [ -f "/etc/ant.conf" ] ; then
+ . /etc/ant.conf
+ fi
+ fi
+
+ # load user ant configuration
+ if [ -f "$HOME/.ant/ant.conf" ] ; then
+ . $HOME/.ant/ant.conf
+ fi
+ if [ -f "$HOME/.antrc" ] ; then
+ . "$HOME/.antrc"
+ fi
+
+ # provide default configuration values
+ if [ -z "$rpm_mode" ] ; then
+ rpm_mode=false
+ fi
+ if [ -z "$usejikes" ] ; then
+ usejikes=$use_jikes_default
+ fi
+fi
+
+export WANT_JAVA_CONFIG=2
+
+# Always get JAVA_HOME from java-config, unless ANT_RESPECT_JAVA_HOME is set
+# Use GENTOO_VM to change which VM is used instead.
+if [[ -z "${ANT_RESPECT_JAVA_HOME}" || -z "${JAVA_HOME}" ]]; then
+ export JAVA_HOME="$(java-config -g JAVA_HOME)"
+fi
+
+if [ -z $JAVA_HOME ] ; then
+ echo 'Error: No JDK found!'
+ echo "Try using java-config script to set your JDK"
+ echo "Remember that you need a JDK not a JRE"
+ exit 1
+fi
+
+ANT_HOME=/usr/share/ant-core
+
+# set ANT_LIB location
+ANT_LIB="${ANT_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ JAVACMD="$JAVA_HOME/bin/java"
+ else
+ JAVACMD=`which java 2> /dev/null `
+ if [ -z "$JAVACMD" ] ; then
+ JAVACMD=java
+ fi
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly."
+ echo " We cannot execute $JAVACMD"
+ exit 1
+fi
+
+if [ -z "$LOCALCLASSPATH" ] ; then
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
+else
+ LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
+fi
+
+# if ANT_TASKS is not set, default to "all"
+ANT_TASKS="${ANT_TASKS:-all}"
+
+# if ANT_TASKS is set to "all", get the tasks list from /usr/share/ant/tasks/
+if [[ "${ANT_TASKS}" == "all" ]]; then
+ ANT_TASKS=""
+ # but only if it exists
+ if [[ -d /usr/share/ant/tasks ]]; then
+ ANT_TASKS="${ANT_TASKS} "/usr/share/ant/tasks/*
+ fi
+ if [[ -d /usr/share/ant/tasks-1.7.1 ]]; then
+ ANT_TASKS="${ANT_TASKS} "/usr/share/ant/tasks-1.7.1/*
+ fi
+# if set to "none", make ANT_TASKS empty list
+elif [[ "${ANT_TASKS}" == "none" ]]; then
+ ANT_TASKS=""
+fi
+# otherwise ANT_TASKS defines explicit task list
+
+# construct the tasks list separated with commas to pass to java-config
+TASKS_LIST=""
+for task in $ANT_TASKS; do
+ TASKS_LIST="${TASKS_LIST},$(basename $task)"
+done
+TASKS_LIST=${TASKS_LIST#,}
+
+# get the classpath for optional tasks and their dependency .jar files
+if [[ -n "${TASKS_LIST}" ]] ; then
+ ANT_TASKS_CLASSPATH="-lib \"$(java-config -dp ${TASKS_LIST})\""
+ ANT_TASKS_LIBPATH="-Djava.library.path=\"$(java-config -di ${TASKS_LIST})\""
+else
+ ANT_TASKS_CLASSPATH=""
+ ANT_TASKS_LIBPATH=""
+fi
+
+# determine where to get tools.jar from
+if [[ -n "${ANT_RESPECT_JAVA_HOME}" ]]; then
+ TOOLS_JAR="${JAVA_HOME}/lib/tools.jar"
+else
+ TOOLS_JAR="$(java-config --tools)"
+fi
+
+if [[ -n "${TOOLS_JAR}" ]] ; then
+ LOCALCLASSPATH="$LOCALCLASSPATH:${TOOLS_JAR}"
+else
+ echo "Warning: Unable to determine tools.jar location."
+ echo " If build fails because sun.* classes could not be found,"
+ echo " Make sure you are using a JDK, not JRE as your user/system VM."
+ echo " and that you have java-config version 2.0.30 or above installed."
+fi
+
+# Allow Jikes support (off by default)
+if $usejikes; then
+ ANT_OPTS="$ANT_OPTS -Dbuild.compiler=jikes"
+fi
+
+# Show script help if requested
+if $show_help ; then
+ echo $0 '[script options] [options] [target [target2 [target3] ..]]'
+ echo 'Script Options:'
+ echo ' --help, --h print this message and ant help'
+ echo ' --noconfig suppress sourcing of /etc/ant.conf,'
+ echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
+ echo ' configuration files'
+ echo ' --usejikes enable use of jikes by default, unless'
+ echo ' set explicitly in configuration files'
+ echo ' --execdebug print ant exec line generated by this'
+ echo ' launch script'
+ echo ' '
+fi
+
+# Execute ant using eval/exec to preserve spaces in paths,
+# java options, and ant args
+ant_sys_opts=
+
+if [ -n "$JIKESPATH" ]; then
+ ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
+fi
+
+ant_exec_command="exec \"${JAVACMD}\" ${ANT_OPTS} -classpath \"${LOCALCLASSPATH}\" \
+ -Dant.home=\"${ANT_HOME}\" -Dant.library.dir=\"${ANT_LIB}\" ${ant_sys_opts} \
+ ${ANT_TASKS_LIBPATH} org.apache.tools.ant.launch.Launcher \
+ ${ANT_TASKS_CLASSPATH} ${ANT_ARGS} -cp \"${CLASSPATH}\" ${ant_exec_args}"
+
+if $ant_exec_debug ; then
+ echo $ant_exec_command
+fi
+eval $ant_exec_command