From b31f1885fab139fb3dde9f04304406402650eb83 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Tue, 6 Mar 2012 19:35:48 +0100
Subject: Update and cleanup cpptasks build & archive.

Including Edwin Vane's work in commit d51d2aaad01d1c8188193a7913c6ef0fc38ea798
---
 ...-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b | Bin 7810 -> 0 bytes
 make/lib/archive/cpptasks-1.0b5-darwin-patch.diff  |  70 -----
 make/lib/archive/cpptasks-1.0b5.zip                | Bin 2221439 -> 0 bytes
 ...c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz | Bin 7743 -> 0 bytes
 ...-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b | Bin 363963 -> 0 bytes
 ...r-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 | Bin 345356 -> 0 bytes
 .../cpptasks/cpptasks-1.0b5-accumulated.patch      | 301 +++++++++++++++++++++
 .../archive/cpptasks/cpptasks-1.0b5-darwin.patch   |  70 +++++
 .../cpptasks/cpptasks-1.0b5-gcclinker.patch        |  17 ++
 .../archive/cpptasks/cpptasks-1.0b5.patches.txt    |   6 +
 make/lib/archive/cpptasks/cpptasks-1.0b5.zip       | Bin 0 -> 2221439 bytes
 ...c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz | Bin 0 -> 7743 bytes
 12 files changed, 394 insertions(+), 70 deletions(-)
 delete mode 100644 make/lib/archive/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b
 delete mode 100644 make/lib/archive/cpptasks-1.0b5-darwin-patch.diff
 delete mode 100644 make/lib/archive/cpptasks-1.0b5.zip
 delete mode 100644 make/lib/archive/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz
 delete mode 100644 make/lib/archive/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b
 delete mode 100755 make/lib/archive/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689
 create mode 100644 make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch
 create mode 100644 make/lib/archive/cpptasks/cpptasks-1.0b5-darwin.patch
 create mode 100644 make/lib/archive/cpptasks/cpptasks-1.0b5-gcclinker.patch
 create mode 100644 make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt
 create mode 100644 make/lib/archive/cpptasks/cpptasks-1.0b5.zip
 create mode 100644 make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz

(limited to 'make/lib/archive')

diff --git a/make/lib/archive/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b b/make/lib/archive/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b
deleted file mode 100644
index c31779e..0000000
Binary files a/make/lib/archive/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b and /dev/null differ
diff --git a/make/lib/archive/cpptasks-1.0b5-darwin-patch.diff b/make/lib/archive/cpptasks-1.0b5-darwin-patch.diff
deleted file mode 100644
index 8af11be..0000000
--- a/make/lib/archive/cpptasks-1.0b5-darwin-patch.diff
+++ /dev/null
@@ -1,70 +0,0 @@
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2012-01-09 14:40:36.277639850 +0100
-@@ -59,7 +59,7 @@
-                 args.addElement("-bundle");
-             } else {
-                 if (linkType.isSharedLibrary()) {
--                    args.addElement("-prebind");
-+                    // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though)
-                     args.addElement("-dynamiclib");
-                 }
-             }
-diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
---- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2012-01-09 15:25:12.994904288 +0100
-@@ -17,6 +17,8 @@
- package net.sf.antcontrib.cpptasks.gcc;
- import java.io.File;
- import java.util.Vector;
-+import java.util.HashSet;
-+import java.util.Arrays;
- 
- import net.sf.antcontrib.cpptasks.CUtil;
- import net.sf.antcontrib.cpptasks.compiler.LinkType;
-@@ -33,9 +35,10 @@
-     private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
-             ".lib", ".dll", ".so", ".sl"};
-     private static String[] linkerOptions = new String[]{"-bundle",
--            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
-+            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
-             "-static", "-shared", "-symbolic", "-Xlinker",
-             "--export-all-symbols", "-static-libgcc",};
-+    private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
-     private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
-             discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
-                     discardFiles, "lib", ".so", true, null));
-@@ -97,12 +100,13 @@
-                     break;
-                 default :
-                     boolean known = false;
--                    for (int i = 0; i < linkerOptions.length; i++) {
--                        if (linkerOptions[i].equals(arg)) {
--                            known = true;
--                            break;
--                        }
-+                    HashSet allLinkerOptions = new HashSet();
-+                    allLinkerOptions.addAll(Arrays.asList(linkerOptions));
-+                    if (isDarwin()) {
-+                        allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
-                     }
-+                    known = allLinkerOptions.contains(arg);
-+
-                     if (!known) {
-                         buf.setLength(0);
-                         buf.append("-Wl,");
-diff -Nur cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
---- cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
-+++ cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2012-01-09 15:29:42.379687367 +0100
-@@ -73,9 +73,8 @@
-         pluginOutType.setValue("shared");
-         pluginType.setOutputType(pluginOutType);
-         linker.addImpliedArgs(false, pluginType, args);
--        assertEquals(2, args.size());
--        assertEquals("-prebind", args.elementAt(0));
--        assertEquals("-dynamiclib", args.elementAt(1));
-+        assertEquals(1, args.size());
-+        assertEquals("-dynamiclib", args.elementAt(0));
-     }
-     /**
-      * Checks for proper arguments for plugin generation on Darwin
diff --git a/make/lib/archive/cpptasks-1.0b5.zip b/make/lib/archive/cpptasks-1.0b5.zip
deleted file mode 100644
index 21f8c07..0000000
Binary files a/make/lib/archive/cpptasks-1.0b5.zip and /dev/null differ
diff --git a/make/lib/archive/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz b/make/lib/archive/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz
deleted file mode 100644
index 22f1cde..0000000
Binary files a/make/lib/archive/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz and /dev/null differ
diff --git a/make/lib/archive/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b b/make/lib/archive/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b
deleted file mode 100644
index dec6c13..0000000
Binary files a/make/lib/archive/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b and /dev/null differ
diff --git a/make/lib/archive/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 b/make/lib/archive/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689
deleted file mode 100755
index 005691c..0000000
Binary files a/make/lib/archive/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 and /dev/null differ
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch b/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch
new file mode 100644
index 0000000..65ec9ae
--- /dev/null
+++ b/make/lib/archive/cpptasks/cpptasks-1.0b5-accumulated.patch
@@ -0,0 +1,301 @@
+diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
+--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2012-03-06 11:23:42.403976192 +0100
+@@ -59,7 +59,7 @@
+                 args.addElement("-bundle");
+             } else {
+                 if (linkType.isSharedLibrary()) {
+-                    args.addElement("-prebind");
++                    // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though)
+                     args.addElement("-dynamiclib");
+                 }
+             }
+diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
+--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2012-03-06 19:17:27.588492284 +0100
+@@ -17,6 +17,8 @@
+ package net.sf.antcontrib.cpptasks.gcc;
+ import java.io.File;
+ import java.util.Vector;
++import java.util.HashSet;
++import java.util.Arrays;
+ 
+ import net.sf.antcontrib.cpptasks.CUtil;
+ import net.sf.antcontrib.cpptasks.compiler.LinkType;
+@@ -32,10 +34,11 @@
+             ".dll", ".so", ".sl"};
+     private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+             ".lib", ".dll", ".so", ".sl"};
+-    private static String[] linkerOptions = new String[]{"-bundle",
+-            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
++    private static String[] linkerOptions = new String[] {"-bundle",
++            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
+             "-static", "-shared", "-symbolic", "-Xlinker",
+-            "--export-all-symbols", "-static-libgcc",};
++            "--export-all-symbols", "-static-libgcc"};
++    private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
+     private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
+             discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
+                     discardFiles, "lib", ".so", true, null));
+@@ -78,6 +81,9 @@
+      */
+     public String decorateLinkerOption(StringBuffer buf, String arg) {
+         String decoratedArg = arg;
++        if (arg.startsWith("--sysroot")) {
++          return arg;
++        }
+         if (arg.length() > 1 && arg.charAt(0) == '-') {
+             switch (arg.charAt(1)) {
+                 //
+@@ -97,12 +103,13 @@
+                     break;
+                 default :
+                     boolean known = false;
+-                    for (int i = 0; i < linkerOptions.length; i++) {
+-                        if (linkerOptions[i].equals(arg)) {
+-                            known = true;
+-                            break;
+-                        }
++                    HashSet allLinkerOptions = new HashSet();
++                    allLinkerOptions.addAll(Arrays.asList(linkerOptions));
++                    if (isDarwin()) {
++                        allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
+                     }
++                    known = allLinkerOptions.contains(arg);
++
+                     if (!known) {
+                         buf.setLength(0);
+                         buf.append("-Wl,");
+diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java.orig cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java.orig
+--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java.orig	1970-01-01 01:00:00.000000000 +0100
++++ cpptasks-1.0b5-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java.orig	2012-03-06 11:23:42.403976192 +0100
+@@ -0,0 +1,214 @@
++/*
++ * 
++ * Copyright 2002-2004 The Ant-Contrib project
++ *
++ *  Licensed 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.
++ */
++package net.sf.antcontrib.cpptasks.gcc;
++import java.io.File;
++import java.util.Vector;
++import java.util.HashSet;
++import java.util.Arrays;
++
++import net.sf.antcontrib.cpptasks.CUtil;
++import net.sf.antcontrib.cpptasks.compiler.LinkType;
++import net.sf.antcontrib.cpptasks.compiler.Linker;
++/**
++ * Adapter for the GCC linker
++ * 
++ * @author Adam Murdoch
++ */
++public class GccLinker extends AbstractLdLinker {
++    private static final String[] discardFiles = new String[0];
++    private static final String[] objFiles = new String[]{".o", ".a", ".lib",
++            ".dll", ".so", ".sl"};
++    private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
++            ".lib", ".dll", ".so", ".sl"};
++    private static String[] linkerOptions = new String[]{"-bundle",
++            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
++            "-static", "-shared", "-symbolic", "-Xlinker",
++            "--export-all-symbols", "-static-libgcc",};
++    private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
++    private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
++            discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
++                    discardFiles, "lib", ".so", true, null));
++    private static final GccLinker instance = new GccLinker("gcc", objFiles,
++            discardFiles, "", "", false, null);
++    private static final GccLinker machBundleLinker = new GccLinker("gcc",
++            objFiles, discardFiles, "lib", ".bundle", false, null);
++    private static final GccLinker machDllLinker = new GccLinker("gcc",
++            objFiles, discardFiles, "lib", ".dylib", false, null);
++    public static GccLinker getInstance() {
++        return instance;
++    }
++    private File[] libDirs;
++    protected GccLinker(String command, String[] extensions,
++            String[] ignoredExtensions, String outputPrefix,
++            String outputSuffix, boolean isLibtool, GccLinker libtoolLinker) {
++        super(command, "-dumpversion", extensions, ignoredExtensions,
++                outputPrefix, outputSuffix, isLibtool, libtoolLinker);
++    }
++    protected void addImpliedArgs(boolean debug, LinkType linkType, Vector args) {
++        super.addImpliedArgs(debug, linkType, args);
++        if (getIdentifier().indexOf("mingw") >= 0) {
++            if (linkType.isSubsystemConsole()) {
++                args.addElement("-mconsole");
++            }
++            if (linkType.isSubsystemGUI()) {
++                args.addElement("-mwindows");
++            }
++        }
++    }
++    /**
++     * Allows drived linker to decorate linker option. Override by GccLinker to
++     * prepend a "-Wl," to pass option to through gcc to linker.
++     * 
++     * @param buf
++     *            buffer that may be used and abused in the decoration process,
++     *            must not be null.
++     * @param arg
++     *            linker argument
++     */
++    public String decorateLinkerOption(StringBuffer buf, String arg) {
++        String decoratedArg = arg;
++        if (arg.length() > 1 && arg.charAt(0) == '-') {
++            switch (arg.charAt(1)) {
++                //
++                //   passed automatically by GCC
++                //
++                case 'g' :
++                case 'f' :
++                case 'F' :
++                /* Darwin */
++                case 'm' :
++                case 'O' :
++                case 'W' :
++                case 'l' :
++                case 'L' :
++                case 'u' :
++                case 'v' :
++                    break;
++                default :
++                    boolean known = false;
++                    HashSet allLinkerOptions = new HashSet();
++                    allLinkerOptions.addAll(Arrays.asList(linkerOptions));
++                    if (isDarwin()) {
++                        allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
++                    }
++                    known = allLinkerOptions.contains(arg);
++
++                    if (!known) {
++                        buf.setLength(0);
++                        buf.append("-Wl,");
++                        buf.append(arg);
++                        decoratedArg = buf.toString();
++                    }
++                    break;
++            }
++        }
++        return decoratedArg;
++    }
++    /**
++     * Returns library path.
++     *  
++     */
++    public File[] getLibraryPath() {
++        if (libDirs == null) {
++            //
++            //   construct gcc lib path from machine and version
++            //
++            StringBuffer buf = new StringBuffer("/lib/gcc-lib/");
++            buf.append(GccProcessor.getMachine());
++            buf.append('/');
++            buf.append(GccProcessor.getVersion());
++            //
++            //   build default path from gcc and system /lib and /lib/w32api
++            //
++            String[] impliedLibPath = new String[]{buf.toString(),
++                    "/lib/w32api", "/lib"};
++            //
++            //     read gcc specs file for other library paths
++            //
++            String[] specs = GccProcessor.getSpecs();
++            String[][] libpaths = GccProcessor.parseSpecs(specs, "*link:",
++                    new String[]{"%q"});
++            String[] libpath;
++            if (libpaths[0].length > 0) {
++                libpath = new String[libpaths[0].length + 3];
++                int i = 0;
++                for (; i < libpaths[0].length; i++) {
++                    libpath[i] = libpaths[0][i];
++                }
++                libpath[i++] = buf.toString();
++                libpath[i++] = "/lib/w32api";
++                libpath[i++] = "/lib";
++            } else {
++                //
++                //   if a failure to find any matches then
++                //      use some default values for lib path entries
++                libpath = new String[]{"/usr/local/lib/mingw",
++                        "/usr/local/lib", "/usr/lib/w32api", "/usr/lib/mingw",
++                        "/usr/lib", buf.toString(), "/lib/w32api", "/lib"};
++            }
++            for (int i = 0; i < libpath.length; i++) {
++                if (libpath[i].indexOf("mingw") >= 0) {
++                    libpath[i] = null;
++                }
++            }
++            //
++            //   if cygwin then
++            //     we have to prepend location of gcc32
++            //       and .. to start of absolute filenames to
++            //       have something that will exist in the
++            //       windows filesystem
++            if (GccProcessor.isCygwin()) {
++                GccProcessor.convertCygwinFilenames(libpath);
++            }
++            //
++            //  check that remaining entries are actual directories
++            //
++            int count = CUtil.checkDirectoryArray(libpath);
++            //
++            //   populate return array with remaining entries
++            //
++            libDirs = new File[count];
++            int index = 0;
++            for (int i = 0; i < libpath.length; i++) {
++                if (libpath[i] != null) {
++                    libDirs[index++] = new File(libpath[i]);
++                }
++            }
++        }
++        return libDirs;
++    }
++    public Linker getLinker(LinkType type) {
++        if (type.isStaticLibrary()) {
++            return GccLibrarian.getInstance();
++        }
++        if (type.isPluginModule()) {
++            if (isDarwin()) {
++                return machBundleLinker;
++            } else {
++                return dllLinker;
++            }
++        }
++        if (type.isSharedLibrary()) {
++            if (isDarwin()) {
++                return machDllLinker;
++            } else {
++                return dllLinker;
++            }
++        }
++        return instance;
++    }
++}
+diff -Nur cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java cpptasks-1.0b5-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
+--- cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2012-03-06 11:23:42.571974125 +0100
+@@ -73,9 +73,8 @@
+         pluginOutType.setValue("shared");
+         pluginType.setOutputType(pluginOutType);
+         linker.addImpliedArgs(false, pluginType, args);
+-        assertEquals(2, args.size());
+-        assertEquals("-prebind", args.elementAt(0));
+-        assertEquals("-dynamiclib", args.elementAt(1));
++        assertEquals(1, args.size());
++        assertEquals("-dynamiclib", args.elementAt(0));
+     }
+     /**
+      * Checks for proper arguments for plugin generation on Darwin
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5-darwin.patch b/make/lib/archive/cpptasks/cpptasks-1.0b5-darwin.patch
new file mode 100644
index 0000000..8af11be
--- /dev/null
+++ b/make/lib/archive/cpptasks/cpptasks-1.0b5-darwin.patch
@@ -0,0 +1,70 @@
+diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
+--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java	2012-01-09 14:40:36.277639850 +0100
+@@ -59,7 +59,7 @@
+                 args.addElement("-bundle");
+             } else {
+                 if (linkType.isSharedLibrary()) {
+-                    args.addElement("-prebind");
++                    // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though)
+                     args.addElement("-dynamiclib");
+                 }
+             }
+diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
+--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-osx-patched/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	2012-01-09 15:25:12.994904288 +0100
+@@ -17,6 +17,8 @@
+ package net.sf.antcontrib.cpptasks.gcc;
+ import java.io.File;
+ import java.util.Vector;
++import java.util.HashSet;
++import java.util.Arrays;
+ 
+ import net.sf.antcontrib.cpptasks.CUtil;
+ import net.sf.antcontrib.cpptasks.compiler.LinkType;
+@@ -33,9 +35,10 @@
+     private static final String[] libtoolObjFiles = new String[]{".fo", ".a",
+             ".lib", ".dll", ".so", ".sl"};
+     private static String[] linkerOptions = new String[]{"-bundle",
+-            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s",
++            "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-noprebind", "-s",
+             "-static", "-shared", "-symbolic", "-Xlinker",
+             "--export-all-symbols", "-static-libgcc",};
++    private static String[] darwinLinkerOptions = new String[]{"-arch", "-weak_framework", "-lazy_framework", "-weak_library" };
+     private static final GccLinker dllLinker = new GccLinker("gcc", objFiles,
+             discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles,
+                     discardFiles, "lib", ".so", true, null));
+@@ -97,12 +100,13 @@
+                     break;
+                 default :
+                     boolean known = false;
+-                    for (int i = 0; i < linkerOptions.length; i++) {
+-                        if (linkerOptions[i].equals(arg)) {
+-                            known = true;
+-                            break;
+-                        }
++                    HashSet allLinkerOptions = new HashSet();
++                    allLinkerOptions.addAll(Arrays.asList(linkerOptions));
++                    if (isDarwin()) {
++                        allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions));
+                     }
++                    known = allLinkerOptions.contains(arg);
++
+                     if (!known) {
+                         buf.setLength(0);
+                         buf.append("-Wl,");
+diff -Nur cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java
+--- cpptasks-1.0b5/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2008-04-02 19:26:44.000000000 +0200
++++ cpptasks-1.0b5-osx-patched/src/test/java/net/sf/antcontrib/cpptasks/gcc/TestAbstractLdLinker.java	2012-01-09 15:29:42.379687367 +0100
+@@ -73,9 +73,8 @@
+         pluginOutType.setValue("shared");
+         pluginType.setOutputType(pluginOutType);
+         linker.addImpliedArgs(false, pluginType, args);
+-        assertEquals(2, args.size());
+-        assertEquals("-prebind", args.elementAt(0));
+-        assertEquals("-dynamiclib", args.elementAt(1));
++        assertEquals(1, args.size());
++        assertEquals("-dynamiclib", args.elementAt(0));
+     }
+     /**
+      * Checks for proper arguments for plugin generation on Darwin
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5-gcclinker.patch b/make/lib/archive/cpptasks/cpptasks-1.0b5-gcclinker.patch
new file mode 100644
index 0000000..0eb4c76
--- /dev/null
+++ b/make/lib/archive/cpptasks/cpptasks-1.0b5-gcclinker.patch
@@ -0,0 +1,17 @@
+Index: src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
+===================================================================
+--- src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	(revision 177)
++++ src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java	(working copy)
+@@ -78,6 +78,12 @@
+      */
+     public String decorateLinkerOption(StringBuffer buf, String arg) {
+         String decoratedArg = arg;
++        if (arg.startsWith("--sysroot")) {
++          return arg;
++        }
++        if (arg.startsWith("-nostdlib")) {
++          return arg;
++        }
+         if (arg.length() > 1 && arg.charAt(0) == '-') {
+             switch (arg.charAt(1)) {
+                 //
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt b/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt
new file mode 100644
index 0000000..bd496c1
--- /dev/null
+++ b/make/lib/archive/cpptasks/cpptasks-1.0b5.patches.txt
@@ -0,0 +1,6 @@
+cpptasks-1.0b5-accumulated.patch - The accumulated patch, you only need to apply this one!
+
+The single original patches:
+
+cpptasks-1.0b5-darwin.patch      - Make OSX/Darwin work (linker options etc)
+cpptasks-1.0b5-gcclinker.patch   - Make crosscompilation work (--sysroot .. etc)
diff --git a/make/lib/archive/cpptasks/cpptasks-1.0b5.zip b/make/lib/archive/cpptasks/cpptasks-1.0b5.zip
new file mode 100644
index 0000000..21f8c07
Binary files /dev/null and b/make/lib/archive/cpptasks/cpptasks-1.0b5.zip differ
diff --git a/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz b/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz
new file mode 100644
index 0000000..22f1cde
Binary files /dev/null and b/make/lib/archive/cpptasks/obsolete/cpptasks-patch-suncc-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz differ
-- 
cgit v1.2.3