mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-08 18:27:07 -08:00
dev-java/ant-core: removed old
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
DIST ant-1.10.7-gentoo.tar.bz2 6686 BLAKE2B 77e5850b68ab079f26722b5b2ff1afb29a35197afb79f80ae2f775855e2d8f3a478324b1175e9a73695b4e6a6798bf4458dc84d2f763a1d72c331505d31303ea SHA512 f5c5a2ea99a780413a71799d56e783f3ac861169bd7f29c3a85d039f61240abb91ed223eeb111c67a6a1328a6cf2203d7cbf93ad762e49bc11f9a948e7f2091c
|
||||
DIST ant-1.10.8-gentoo.tar.bz2 6674 BLAKE2B da52696eb20d74f6c3d36bd57c60927d9044b637ff9de175695d57596ae2e747db509cbde7ec862f9e99f2cee564803232e0edd0755f931dc070b150c4e38b21 SHA512 de14a55105888bc30921418c0e6ef5dac340d3d02bfab35ca7a62021505df94e71fc05eb864ffc276add5a2fce483338fe2cf02fcc04e693bb5b709c6b080490
|
||||
DIST apache-ant-1.10.7-src.tar.bz2 4530166 BLAKE2B 6998fffbda6a0adbe3434ef0013b3e669ec8f15a09d9a5917509733f3232a538e9be83758b9eacccd673522812a8d482e1fd526d5493634d9c08759f47bfc7a7 SHA512 5849e81aa037b9ba7f4e67057a0cde50301d183fc244673c7f11e34997b11d21c33306c07ab820bf60d454afa8ad5b159c3442427c8cb5403896f29ed179b10d
|
||||
DIST apache-ant-1.10.8-src.tar.bz2 4848256 BLAKE2B bd0668e5592c6d2e77233dcffbf2311f9b072f60e7a0c2d5b1a0a6567fc015e1fda46caf1c6c2a3a6730df561f87a8477e0df54a12eeab866cd8d4cb8b2d1f7e SHA512 15563c339298dc576ffb0fb59858bed5f6deabb519ad3f5237e465e6dffd5307bb86fc120f7d7893332936b9f767c47e522cdd1da809b599ceec0070dcb20338
|
||||
|
||||
@@ -1,110 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# Don't depend on itself.
|
||||
JAVA_ANT_DISABLE_ANT_CORE_DEP="true"
|
||||
|
||||
# Rewriting build.xml files for the testcases has no use at the moment.
|
||||
JAVA_PKG_BSFIX_ALL="no"
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit eutils java-pkg-2 java-ant-2 prefix
|
||||
|
||||
MY_P="apache-ant-${PV}"
|
||||
|
||||
DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files"
|
||||
HOMEPAGE="https://ant.apache.org/"
|
||||
SRC_URI="https://archive.apache.org/dist/ant/source/${MY_P}-src.tar.bz2
|
||||
https://dev.gentoo.org/~fordfrog/distfiles/ant-${PV}-gentoo.tar.bz2"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
CDEPEND=">=virtual/jdk-1.8:*"
|
||||
DEPEND="${CDEPEND}"
|
||||
RDEPEND="${CDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PV}"-cmdline-args.patch
|
||||
"${WORKDIR}/${PV}-build.patch"
|
||||
"${WORKDIR}/${PV}-launch.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eprefixify "${S}/src/script/ant"
|
||||
|
||||
# Fixes bug 556008.
|
||||
java-ant_xml-rewrite -f build.xml \
|
||||
-c -e javadoc \
|
||||
-a failonerror \
|
||||
-v "false"
|
||||
|
||||
# See bug #196080 for more details.
|
||||
java-ant_bsfix_one build.xml
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
# Remove JDK9+ stuff
|
||||
einfo "Removing JDK9+ classes (Jmod and Link)"
|
||||
rm "${S}"/src/main/org/apache/tools/ant/taskdefs/modules/{Jmod,Link}.java
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export ANT_HOME=""
|
||||
# Avoid error message that package ant-core was not found
|
||||
export ANT_TASKS="none"
|
||||
|
||||
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
|
||||
|
||||
CLASSPATH="$(java-config -t)" ./build.sh ${bsyscp} jars dist-internal \
|
||||
$(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 ../../${PN}/lib/${jar} /usr/share/ant/lib/${jar}
|
||||
done
|
||||
|
||||
dobin src/script/ant
|
||||
|
||||
dodir /usr/share/${PN}/bin
|
||||
for each in antRun antRun.pl runant.pl runant.py ; do
|
||||
dobin "${S}/src/script/${each}"
|
||||
dosym ../../../bin/${each} /usr/share/${PN}/bin/${each}
|
||||
done
|
||||
dosym ../${PN}/bin /usr/share/ant/bin
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r dist/etc
|
||||
dosym ../${PN}/etc /usr/share/ant/etc
|
||||
|
||||
echo "ANT_HOME=\"${EPREFIX}/usr/share/ant\"" > "${T}/20ant"
|
||||
doenvd "${T}/20ant"
|
||||
|
||||
dodoc NOTICE README WHATSNEW KEYS
|
||||
|
||||
if use doc; then
|
||||
dodoc -r manual/*
|
||||
java-pkg_dojavadoc --symlink manual/api build/javadocs
|
||||
fi
|
||||
|
||||
use source && java-pkg_dosrc src/main/*
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# Don't depend on itself.
|
||||
JAVA_ANT_DISABLE_ANT_CORE_DEP="true"
|
||||
|
||||
# Rewriting build.xml files for the testcases has no use at the moment.
|
||||
JAVA_PKG_BSFIX_ALL="no"
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
|
||||
inherit eutils java-pkg-2 java-ant-2 prefix
|
||||
|
||||
MY_P="apache-ant-${PV}"
|
||||
|
||||
DESCRIPTION="Java-based build tool similar to 'make' that uses XML configuration files"
|
||||
HOMEPAGE="https://ant.apache.org/"
|
||||
SRC_URI="https://archive.apache.org/dist/ant/source/${MY_P}-src.tar.bz2
|
||||
https://dev.gentoo.org/~fordfrog/distfiles/ant-${PV}-gentoo.tar.bz2"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
CDEPEND=">=virtual/jdk-1.8:*"
|
||||
DEPEND="${CDEPEND}"
|
||||
RDEPEND="${CDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
PATCHES=( "${WORKDIR}/${PV}-build.patch" "${WORKDIR}/${PV}-launch.patch" )
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eprefixify "${S}/src/script/ant"
|
||||
|
||||
# Fixes bug 556008.
|
||||
java-ant_xml-rewrite -f build.xml \
|
||||
-c -e javadoc \
|
||||
-a failonerror \
|
||||
-v "false"
|
||||
|
||||
# See bug #196080 for more details.
|
||||
java-ant_bsfix_one build.xml
|
||||
java-pkg-2_src_prepare
|
||||
|
||||
# Remove JDK9+ stuff
|
||||
einfo "Removing JDK9+ classes (Jmod and Link)"
|
||||
rm "${S}"/src/main/org/apache/tools/ant/taskdefs/modules/{Jmod,Link}.java
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export ANT_HOME=""
|
||||
# Avoid error message that package ant-core was not found
|
||||
export ANT_TASKS="none"
|
||||
|
||||
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
|
||||
|
||||
CLASSPATH="$(java-config -t)" ./build.sh ${bsyscp} jars dist-internal \
|
||||
$(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 ../../${PN}/lib/${jar} /usr/share/ant/lib/${jar}
|
||||
done
|
||||
|
||||
dobin src/script/ant
|
||||
|
||||
dodir /usr/share/${PN}/bin
|
||||
for each in antRun antRun.pl runant.pl runant.py ; do
|
||||
dobin "${S}/src/script/${each}"
|
||||
dosym ../../../bin/${each} /usr/share/${PN}/bin/${each}
|
||||
done
|
||||
dosym ../${PN}/bin /usr/share/ant/bin
|
||||
|
||||
insinto /usr/share/${PN}
|
||||
doins -r dist/etc
|
||||
dosym ../${PN}/etc /usr/share/ant/etc
|
||||
|
||||
echo "ANT_HOME=\"${EPREFIX}/usr/share/ant\"" > "${T}/20ant"
|
||||
doenvd "${T}/20ant"
|
||||
|
||||
dodoc NOTICE README WHATSNEW KEYS
|
||||
|
||||
if use doc; then
|
||||
dodoc -r manual/*
|
||||
java-pkg_dojavadoc --symlink manual/api build/javadocs
|
||||
fi
|
||||
|
||||
use source && java-pkg_dosrc src/main/*
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
From 729692d37a72c84998cfc65a6da6e078bbe0910a Mon Sep 17 00:00:00 2001
|
||||
From: sergiys <sergiys@amazon.com>
|
||||
Date: Wed, 23 Oct 2019 13:24:19 -0700
|
||||
Subject: [PATCH] Fix regression introduced by commit "Use commandline argument
|
||||
file for all options, but -J, for case javac"
|
||||
|
||||
---
|
||||
.../ant/taskdefs/compilers/JavacExternal.java | 35 +++++++++-------
|
||||
.../taskdefs/compilers/JavacExternalTest.java | 42 +++++++++++++++++++
|
||||
2 files changed, 62 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java
|
||||
index 9569c7fe8f..637e9bdf6c 100644
|
||||
--- a/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java
|
||||
+++ b/src/main/org/apache/tools/ant/taskdefs/compilers/JavacExternal.java
|
||||
@@ -66,7 +66,7 @@ public boolean execute() throws BuildException {
|
||||
int firstFileName;
|
||||
|
||||
if (assumeJava1_2Plus()) {
|
||||
- firstFileName = moveJOptionsToBeginning(commandLine);
|
||||
+ firstFileName = moveArgFileEligibleOptionsToEnd(commandLine);
|
||||
} else {
|
||||
firstFileName = -1;
|
||||
}
|
||||
@@ -77,31 +77,36 @@ public boolean execute() throws BuildException {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Moves all -J arguments to the beginning
|
||||
- * So that all command line arguments could be written to file, but -J
|
||||
+ * Moves all -J and @argfiles arguments to the beginning
|
||||
+ * So that all command line arguments could be written to file, but -J and @argfile
|
||||
* As per javac documentation:
|
||||
* you can specify one or more files that contain arguments to the javac command (except -J options)
|
||||
* @param commandLine command line to process
|
||||
- * @return int index of first non -J argument
|
||||
+ * @return int index of first argument that could be put into argfile
|
||||
*/
|
||||
- private int moveJOptionsToBeginning(String[] commandLine) {
|
||||
- int nonJArgumentIdx = 1; // 0 for javac executable
|
||||
- while(nonJArgumentIdx < commandLine.length && commandLine[nonJArgumentIdx].startsWith("-J")) {
|
||||
- nonJArgumentIdx++;
|
||||
+ private int moveArgFileEligibleOptionsToEnd(String[] commandLine) {
|
||||
+ int nonArgFileOptionIdx = 1; // 0 for javac executable
|
||||
+ while(nonArgFileOptionIdx < commandLine.length &&
|
||||
+ !isArgFileEligible(commandLine[nonArgFileOptionIdx])) {
|
||||
+ nonArgFileOptionIdx++;
|
||||
}
|
||||
|
||||
- for(int i = nonJArgumentIdx + 1; i < commandLine.length; i++) {
|
||||
- if (commandLine[i].startsWith("-J")) {
|
||||
- String jArgument = commandLine[i];
|
||||
- for(int j = i - 1; j >= nonJArgumentIdx; j--) {
|
||||
+ for(int i = nonArgFileOptionIdx + 1; i < commandLine.length; i++) {
|
||||
+ if (!isArgFileEligible(commandLine[i])) {
|
||||
+ String option = commandLine[i];
|
||||
+ for(int j = i - 1; j >= nonArgFileOptionIdx; j--) {
|
||||
commandLine[j + 1] = commandLine[j];
|
||||
}
|
||||
- commandLine[nonJArgumentIdx] = jArgument;
|
||||
- nonJArgumentIdx++;
|
||||
+ commandLine[nonArgFileOptionIdx] = option;
|
||||
+ nonArgFileOptionIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
- return nonJArgumentIdx;
|
||||
+ return nonArgFileOptionIdx;
|
||||
+ }
|
||||
+
|
||||
+ private static boolean isArgFileEligible(String option) {
|
||||
+ return !(option.startsWith("-J") || option.startsWith("@"));
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/JavacExternalTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/JavacExternalTest.java
|
||||
index 53aac6377c..a893fb49c6 100644
|
||||
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/JavacExternalTest.java
|
||||
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/JavacExternalTest.java
|
||||
@@ -28,6 +28,7 @@
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
+import java.util.stream.Stream;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
@@ -131,6 +132,47 @@ public void allJOptionsAreMovedToBeginning() throws Exception {
|
||||
}
|
||||
}
|
||||
|
||||
+ @Test
|
||||
+ public void argFileOptionIsMovedToBeginning() throws Exception {
|
||||
+ final File workDir = createWorkDir("testSMC");
|
||||
+ try {
|
||||
+ final File src = new File(workDir, "src");
|
||||
+ src.mkdir();
|
||||
+ createFile(src, "org/apache/ant/tests/J1.java");
|
||||
+ createFile(src, "org/apache/ant/tests/J2.java");
|
||||
+ final File modules = new File(workDir, "modules");
|
||||
+ modules.mkdir();
|
||||
+ final Project prj = new Project();
|
||||
+ prj.setBaseDir(workDir);
|
||||
+ final Javac javac = new Javac();
|
||||
+ javac.setProject(prj);
|
||||
+ final Commandline[] cmd = new Commandline[1];
|
||||
+ final TestJavacExternal impl = new TestJavacExternal();
|
||||
+ final Path srcPath = new Path(prj);
|
||||
+ srcPath.setLocation(src);
|
||||
+ javac.setSrcdir(srcPath);
|
||||
+ javac.createModulepath().setLocation(modules);
|
||||
+ javac.setSource("9");
|
||||
+ javac.setTarget("9");
|
||||
+ javac.setFork(true);
|
||||
+ javac.setMemoryInitialSize("80m");
|
||||
+ javac.setExecutable("javacExecutable");
|
||||
+ javac.add(impl);
|
||||
+ javac.createCompilerArg().setValue("-g");
|
||||
+ javac.createCompilerArg().setValue("@/home/my-compiler.args");
|
||||
+ javac.execute();
|
||||
+ assertEquals("javacExecutable", impl.getArgs()[0]);
|
||||
+ assertEquals("-J-Xms80m", impl.getArgs()[1]);
|
||||
+ assertEquals("@/home/my-compiler.args", impl.getArgs()[2]);
|
||||
+ assertTrue(Stream.of(impl.getArgs()).anyMatch(x -> x.equals("-g")));
|
||||
+ assertTrue(impl.getArgs()[impl.getArgs().length - 2].endsWith("J1.java"));
|
||||
+ assertTrue(impl.getArgs()[impl.getArgs().length - 1].endsWith("J2.java"));
|
||||
+ assertEquals(3, impl.getFirstFileName());
|
||||
+ } finally {
|
||||
+ delete(workDir);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
private File createWorkDir(String testName) {
|
||||
final File tmp = new File(System.getProperty("java.io.tmpdir")); //NOI18N
|
||||
final File destDir = new File(tmp, String.format("%s%s%d",
|
||||
Reference in New Issue
Block a user