summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Stelling <blubb@gentoo.org>2006-02-05 11:05:30 +0000
committerSimon Stelling <blubb@gentoo.org>2006-02-05 11:05:30 +0000
commita7a153d30401c16f050110e6d30a904918a4e067 (patch)
tree53f54a0ea04304ab55179dfae906b69c1ad79670 /dev-java/ant-core/files
parentfix config (diff)
downloadhistorical-a7a153d30401c16f050110e6d30a904918a4e067.tar.gz
historical-a7a153d30401c16f050110e6d30a904918a4e067.tar.bz2
historical-a7a153d30401c16f050110e6d30a904918a4e067.zip
no need to gzip smallish patches
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'dev-java/ant-core/files')
-rw-r--r--dev-java/ant-core/files/build.sh-exit-fix.patch11
-rw-r--r--dev-java/ant-core/files/build.sh-exit-fix.patch.gzbin256 -> 0 bytes
-rw-r--r--dev-java/ant-core/files/rpmbuild.patch95
-rw-r--r--dev-java/ant-core/files/rpmbuild.patch.gzbin1164 -> 0 bytes
4 files changed, 106 insertions, 0 deletions
diff --git a/dev-java/ant-core/files/build.sh-exit-fix.patch b/dev-java/ant-core/files/build.sh-exit-fix.patch
new file mode 100644
index 000000000000..53170617f98a
--- /dev/null
+++ b/dev-java/ant-core/files/build.sh-exit-fix.patch
@@ -0,0 +1,11 @@
+--- build.sh.orig 2003-04-16 11:28:29.000000000 +0200
++++ build.sh 2003-07-02 16:10:06.000000000 +0200
+@@ -18,7 +18,7 @@
+
+ if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
+ echo Bootstrap FAILED
+- exit
++ exit 1
+ fi
+
+ LOCALCLASSPATH=lib/xercesImpl.jar:lib/xml-apis.jar:bootstrap/lib/ant.jar
diff --git a/dev-java/ant-core/files/build.sh-exit-fix.patch.gz b/dev-java/ant-core/files/build.sh-exit-fix.patch.gz
deleted file mode 100644
index 541f796dd7ef..000000000000
--- a/dev-java/ant-core/files/build.sh-exit-fix.patch.gz
+++ /dev/null
Binary files differ
diff --git a/dev-java/ant-core/files/rpmbuild.patch b/dev-java/ant-core/files/rpmbuild.patch
new file mode 100644
index 000000000000..5dfbb740923a
--- /dev/null
+++ b/dev-java/ant-core/files/rpmbuild.patch
@@ -0,0 +1,95 @@
+--- src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java 2003-10-13 02:19:42.000000000 +0000
++++ src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java 2003-10-13 02:24:16.000000000 +0000
+@@ -59,6 +59,8 @@
+ import java.io.BufferedOutputStream;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
++import java.util.Enumeration;
++import java.util.Vector;
+ import org.apache.tools.ant.Task;
+ import org.apache.tools.ant.BuildException;
+ import org.apache.tools.ant.Project;
+@@ -67,7 +69,9 @@
+ import org.apache.tools.ant.taskdefs.LogOutputStream;
+ import org.apache.tools.ant.taskdefs.PumpStreamHandler;
+ import org.apache.tools.ant.taskdefs.Execute;
++import org.apache.tools.ant.taskdefs.condition.Os;
+ import org.apache.tools.ant.types.Commandline;
++import org.apache.tools.ant.types.Path;
+
+ /**
+ * Invokes the rpm tool to build a Linux installation file.
+@@ -91,6 +95,12 @@
+ private String command = "-bb";
+
+ /**
++ * The executable to use for building the packages.
++ * @since Ant 1.6
++ */
++ private String rpmBuildCommand = null;
++
++ /**
+ * clean BUILD directory
+ */
+ private boolean cleanBuildDir = false;
+@@ -119,6 +129,9 @@
+
+ Commandline toExecute = new Commandline();
+
+- toExecute.setExecutable("rpm");
++ toExecute.setExecutable(rpmBuildCommand == null
++ ? guessRpmBuildCommand()
++ : rpmBuildCommand);
++
+ if (topDir != null) {
+ toExecute.createArgument().setValue("--define");
+@@ -260,4 +273,49 @@
+ public void setError(File error) {
+ this.error = error;
+ }
++
++ /**
++ * The executable to run when building; optional.
++ * The default is <code>rpmbuild</code>.
++ *
++ * @since Ant 1.6
++ * @param c the rpm build executable
++ */
++ public void setRpmBuildCommand(String c) {
++ this.rpmBuildCommand = c;
++ }
++
++ /**
++ * Checks whether <code>rpmbuild</code> is on the PATH and returns
++ * the absolute path to it - falls back to <code>rpm</code>
++ * otherwise.
++ *
++ * @since 1.6
++ */
++ protected String guessRpmBuildCommand() {
++ Vector env = Execute.getProcEnvironment();
++ String path = null;
++ for (Enumeration enum = env.elements(); enum.hasMoreElements();) {
++ String var = (String) enum.nextElement();
++ if (var.startsWith("PATH=") || var.startsWith("Path=")) {
++ path = var.substring(6 /* "PATH=".length() + 1 */);
++ break;
++ }
++ }
++
++ if (path != null) {
++ Path p = new Path(getProject(), path);
++ String[] pElements = p.list();
++ for (int i = 0; i < pElements.length; i++) {
++ File f = new File(pElements[i],
++ "rpmbuild"
++ + (Os.isFamily("dos") ? ".exe" : ""));
++ if (f.canRead()) {
++ return f.getAbsolutePath();
++ }
++ }
++ }
++
++ return "rpm";
++ }
+ }
diff --git a/dev-java/ant-core/files/rpmbuild.patch.gz b/dev-java/ant-core/files/rpmbuild.patch.gz
deleted file mode 100644
index 0a86f9559513..000000000000
--- a/dev-java/ant-core/files/rpmbuild.patch.gz
+++ /dev/null
Binary files differ