flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [05/19] git commit: [flex-falcon] [refs/heads/develop] - convert google_maps to use patches
Date Wed, 25 May 2016 18:25:12 GMT
convert google_maps to use patches


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/2a179ec8
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/2a179ec8
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/2a179ec8

Branch: refs/heads/develop
Commit: 2a179ec85bc28315edd5040e4d93b9a5bf40915c
Parents: 3df891f
Author: Alex Harui <aharui@apache.org>
Authored: Mon May 23 15:15:06 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue May 24 21:05:59 2016 -0700

----------------------------------------------------------------------
 compiler-jx/src/main/resources/downloads.xml    |   1 -
 externs/google_maps/build.xml                   |  30 ++++-
 .../src/main/patch/google_maps.patch            | 110 +++++++++++++++++++
 3 files changed, 139 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2a179ec8/compiler-jx/src/main/resources/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler-jx/src/main/resources/downloads.xml b/compiler-jx/src/main/resources/downloads.xml
index 54046be..6e908ee 100644
--- a/compiler-jx/src/main/resources/downloads.xml
+++ b/compiler-jx/src/main/resources/downloads.xml
@@ -248,7 +248,6 @@
     <get src="https://closureidl.googlecode.com/files/svg.js" dest="${FALCONJX_HOME}/../externs/js/target/downloads/svg.js"/>
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jquery-1.9.js"
dest="${FALCONJX_HOME}/../externs/jquery/target/downloads/jquery-1.9.js"/>
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jasmine-2.0.js"
dest="${FALCONJX_HOME}/../externs/jasmine/target/downloads/jasmine-2.0.js"/>
-    <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3_11.js"
dest="${FALCONJX_HOME}/../externs/google_maps/target/downloads/google_maps_api_v3_11.js"/>
     <!-- start node externs-->
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/assert.js"
dest="${basedir}/../externs/node/target/downloads/closure-compiler-master/contrib/nodejs/assert.js"/>
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/nodejs/buffer.js"
dest="${basedir}/../externs/node/target/downloads/closure-compiler-master/contrib/nodejs/buffer.js"/>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2a179ec8/externs/google_maps/build.xml
----------------------------------------------------------------------
diff --git a/externs/google_maps/build.xml b/externs/google_maps/build.xml
index 443b8af..5a07e95 100644
--- a/externs/google_maps/build.xml
+++ b/externs/google_maps/build.xml
@@ -25,12 +25,26 @@
     
     <target name="main" depends="preprocess, externc, postprocess, compc" />
     
+    <target name="preprocess" depends="download">
+        <exec executable="git" dir="${basedir}/../..">
+            <arg value="apply"/>
+            <arg value="${basedir}/src/main/patch/google_maps.patch"/>
+        </exec>
+    </target>
+    
     <!-- we need to insert a line near the beginning of the file to make the
          compiler happy. -->
-    <target name="preprocess">
+    <target name="make_patch" depends="download">
+        <mkdir dir="${basedir}/target/reference" />
+        <copy todir="${basedir}/target/reference" file="${basedir}/target/downloads/google_maps_api_v3_11.js"
/>
         <antcall target="preprocessfile" >
             <param name="file" value="google_maps_api_v3_11.js" />
         </antcall>
+        <antcall target="diff" />
+    </target>
+
+    <target name="download" >
+        <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3_11.js"
dest="${basedir}/target/downloads/google_maps_api_v3_11.js" />
     </target>
     
     <target name="preprocessfile" >
@@ -48,6 +62,20 @@ google.maps = {};]]></replacevalue>
         </replace>
     </target>
     
+    <target name="diff" >
+        <delete dir="${basedir}/src/main/patch" />
+        <mkdir dir="${basedir}/src/main/patch" />
+        <exec executable="git" output="${basedir}/src/main/patch/google_maps.patch" >
+            <arg value="diff"/>
+            <arg value="--no-index"/>
+            <arg value="--"/>
+            <arg value="${basedir}/target/reference"/>
+            <arg value="${basedir}/target/downloads"/>
+        </exec>
+        <replace file="${basedir}/src/main/patch/google_maps.patch" token="target/reference"
value="target/downloads" />
+        <replace file="${basedir}/src/main/patch/google_maps.patch" token="${basedir}/target/downloads"
value="/externs/google_Maps/target/downloads" />
+    </target>
+
     <target name="externc" >
         <java jar="${basedir}/../../compiler-jx/lib/externc.jar" fork="true"
             failonerror="false">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/2a179ec8/externs/google_maps/src/main/patch/google_maps.patch
----------------------------------------------------------------------
diff --git a/externs/google_maps/src/main/patch/google_maps.patch b/externs/google_maps/src/main/patch/google_maps.patch
new file mode 100644
index 0000000..3662743
--- /dev/null
+++ b/externs/google_maps/src/main/patch/google_maps.patch
@@ -0,0 +1,110 @@
+diff --git a/externs/google_Maps/target/downloads/google_maps_api_v3_11.js b/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
+index ac91685..5dbb628 100644
+--- a/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
++++ b/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
+@@ -20,6 +20,11 @@
+  * @externs
+  */
+ 
++
++/** @const */
++var google = {};
++
++/** @const */
+ google.maps = {};
+ 
+ /**
+@@ -4181,7 +4186,7 @@ google.maps.ZoomControlStyle = {
+   SMALL: 3
+ };
+ 
+-// Namespace
++/** @const */
+ google.maps.adsense = {};
+ 
+ /**
+@@ -4386,7 +4391,7 @@ google.maps.adsense.AdUnitOptions.prototype.titleColor;
+  */
+ google.maps.adsense.AdUnitOptions.prototype.urlColor;
+ 
+-// Namespace
++/** @const */
+ google.maps.drawing = {};
+ 
+ /**
+@@ -4517,7 +4522,7 @@ google.maps.drawing.OverlayType = {
+   RECTANGLE: ''
+ };
+ 
+-// Namespace
++/** @const */
+ google.maps.event = {};
+ 
+ /**
+@@ -4581,10 +4586,10 @@ google.maps.event.removeListener = function(listener) {};
+  */
+ google.maps.event.trigger = function(instance, eventName, var_args) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry = {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.encoding = {};
+ 
+ /**
+@@ -4599,7 +4604,7 @@ google.maps.geometry.encoding.decodePath = function(encodedPath) {};
+  */
+ google.maps.geometry.encoding.encodePath = function(path) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.poly = {};
+ 
+ /**
+@@ -4617,7 +4622,7 @@ google.maps.geometry.poly.containsLocation = function(point, polygon)
{};
+  */
+ google.maps.geometry.poly.isLocationOnEdge = function(point, poly, opt_tolerance) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.spherical = {};
+ 
+ /**
+@@ -4682,7 +4687,7 @@ google.maps.geometry.spherical.computeSignedArea = function(loop, opt_radius)
{}
+  */
+ google.maps.geometry.spherical.interpolate = function(from, to, fraction) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.panoramio = {};
+ 
+ /**
+@@ -4819,7 +4824,7 @@ google.maps.panoramio.PanoramioMouseEvent.prototype.latLng;
+  */
+ google.maps.panoramio.PanoramioMouseEvent.prototype.pixelOffset;
+ 
+-// Namespace
++/** @const */
+ google.maps.places = {};
+ 
+ /**
+@@ -5486,7 +5491,7 @@ google.maps.places.TextSearchRequest.prototype.radius;
+  */
+ google.maps.places.TextSearchRequest.prototype.types;
+ 
+-// Namespace
++/** @const */
+ google.maps.visualization = {};
+ 
+ /**
+@@ -5910,7 +5915,7 @@ google.maps.visualization.WeightedLocation.prototype.location;
+  */
+ google.maps.visualization.WeightedLocation.prototype.weight;
+ 
+-// Namespace
++/** @const */
+ google.maps.weather = {};
+ 
+ /**


Mime
View raw message