manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1403270 - in /manifoldcf/trunk: build.xml common-build.xml
Date Mon, 29 Oct 2012 12:37:24 GMT
Author: kwright
Date: Mon Oct 29 12:37:24 2012
New Revision: 1403270

URL: http://svn.apache.org/viewvc?rev=1403270&view=rev
Log:
Put in code to run normal patch if svn 1.7 is not available.  Part of CONNECTORS-560.

Modified:
    manifoldcf/trunk/build.xml
    manifoldcf/trunk/common-build.xml

Modified: manifoldcf/trunk/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1403270&r1=1403269&r2=1403270&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Mon Oct 29 12:37:24 2012
@@ -3035,13 +3035,13 @@ Use Apache Forrest version forrest-0.9-d
             <param name="dir-name" value="commons-httpclient"/>
         </antcall>
         <!-- Apply cumulative post-3.1 fixes patch -->
-        <antcall target="patch-source-via-svn">
+        <antcall target="patch-source">
             <param name="root-dir" value="build/download"/>
             <param name="diff-file" value="../../upstream-diffs/commons-httpclient-3.1.cumulative.patch"/>
             <param name="dir-name" value="commons-httpclient"/>
         </antcall>
         <!-- Apply mcf-specific features and fixes patch -->
-        <antcall target="patch-source-via-svn">
+        <antcall target="patch-source">
             <param name="root-dir" value="build/download"/>
             <param name="diff-file" value="../../upstream-diffs/commons-httpclient-3.1.mcf.patch"/>
             <param name="dir-name" value="commons-httpclient"/>
@@ -3134,7 +3134,7 @@ Use Apache Forrest version forrest-0.9-d
             <param name="dir-name" value="xerces2-j"/>
         </antcall>
         <!-- Apply mcf-specific features and fixes patch -->
-        <antcall target="patch-source-via-svn">
+        <antcall target="patch-source">
             <param name="root-dir" value="build/download"/>
             <param name="diff-file" value="../../upstream-diffs/xerces2-j-2.9.1.mcf.patch"/>
             <param name="dir-name" value="xerces2-j"/>

Modified: manifoldcf/trunk/common-build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/common-build.xml?rev=1403270&r1=1403269&r2=1403270&view=diff
==============================================================================
--- manifoldcf/trunk/common-build.xml (original)
+++ manifoldcf/trunk/common-build.xml Mon Oct 29 12:37:24 2012
@@ -51,8 +51,17 @@
         </condition>
     </target>
 
+    <target name="calculate-patch-available" depends="calculate-svn-patch-available" unless="svn-version-ok">
+        <condition property="patch-ok">
+            <os family="unix"/>
+        </condition>
+    </target>
+    
     <target name="check-svn-patch-available" depends="calculate-svn-patch-available" unless="svn-version-ok">
-        <echo message="You need svn version 1.7 or higher."/>
+        <echo message="You need svn version 1.7 or higher - attempting patch instead."/>
+    </target>
+    
+    <target name="check-patch-available" depends="calculate-patch-available" unless="patch-ok">
     </target>
     
     <target name="patch-source-via-svn" depends="check-svn-patch-available" if="svn-version-ok">
@@ -64,6 +73,15 @@
         </exec>
     </target>
     
+    <target name="patch-source-via-patch" depends="check-patch-available" if="patch-ok">
+        <mkdir dir="${root-dir}"/>
+        <exec dir="${root-dir}/${dir-name}" executable="patch" input="../${diff-file}"
failifexecutionfails="true" failonerror="true">
+              <arg value="-p0" />
+        </exec>
+    </target>
+    
+    <target name="patch-source" depends="patch-source-via-svn,patch-source-via-patch"/>
+    
     <target name="build-via-ant">
         <exec osfamily="windows" dir="${root-dir}" executable="cmd" failifexecutionfails="true"
failonerror="true">
             <arg value="/c"/>



Mime
View raw message