flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [1/9] git commit: [flex-falcon] [refs/heads/develop] - JFlex 1.5 is BSD so no longer a pre-req
Date Wed, 16 Apr 2014 13:27:57 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop 285da92d7 -> 2263a876a


JFlex 1.5 is BSD so no longer a pre-req


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

Branch: refs/heads/develop
Commit: 6f979265f3d7be60b2c8f459734433a51e46ae7d
Parents: 285da92
Author: Alex Harui <aharui@apache.org>
Authored: Tue Apr 15 09:58:41 2014 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Apr 15 20:13:20 2014 -0700

----------------------------------------------------------------------
 README                 | 13 +------------
 compiler/build.xml     | 11 +++--------
 compiler/downloads.xml | 36 +++++++++++++++++++++++++++++++++++-
 3 files changed, 39 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6f979265/README
----------------------------------------------------------------------
diff --git a/README b/README
index 1009aad..5a88c1a 100644
--- a/README
+++ b/README
@@ -56,10 +56,6 @@ Building the Apache Flex Compiler
     Some of these have different licenses.  See the Software Dependencies section 
     for more information on the external software dependencies.
 
-    From Apache's perspective, the JFlex jar has an excluded license so they can 
-    not be bundled with the Apache Flex binaries.
-    It must be installed prior to building Apache Flex.
-
     Linux support is currently experimental and while it is possible to compile
     the SDK it has not been fully tested so you may run into issues.
 
@@ -86,8 +82,6 @@ Install Prerequisites
 
     Adobe Flash Player playerglobal swcs (*5)   PLAYERGLOBAL_HOME
 
-    JFlex jar (*6)                              JFLEX_JAR
-
     Apache Flex SDK or repository               FLEX_HOME
 
     ==================================================================================
@@ -172,12 +166,6 @@ Install Prerequisites
         These can be used with Apache Flex but not all have not been fully
         tested.
 
-    *6) The JFlex jar can be downloaded from:
-            http://jflex.de/download.html
-
-    Set JFLEX_JAR to the absolute path of JFlex.jar
-        e.g JFLEX_JAR=/path/to/jflex-1.4.3/lib/JFlex.jar
-
 
 Software Dependencies
 ---------------------
@@ -197,6 +185,7 @@ Software Dependencies
         commons-io - http://archive.apache.org/dist/commons/io/binaries/commons-io-2.0.1.tar.gz
         guava - http://search.maven.org/remotecontent?filepath=com/google/guava/guava/15.0/guava-15.0.jar
         jburg - http://downloads.sourceforge.net/project/jburg/jburg-1.10.1.tar.gz
+        jflex - http://jflex.de/jflex-1.5.1.tar.gz
         lzma - http://www.java2s.com/Code/JarDownload/lzma/lzma-9.20.jar.zip
 
 

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6f979265/compiler/build.xml
----------------------------------------------------------------------
diff --git a/compiler/build.xml b/compiler/build.xml
index 92651e9..6ead735 100644
--- a/compiler/build.xml
+++ b/compiler/build.xml
@@ -115,7 +115,7 @@
         <attribute name="skeleton" default="${compiler}/src/org/apache/flex/compiler/internal/parsing/as/skeleton.default"/>
         <attribute name="output"/>
         <sequential>
-            <java jar="${env.JFLEX_JAR}" fork="true">
+            <java jar="${compiler}/lib/JFlex.jar" fork="true">
                 <arg value="-d"/>
                 <arg value="@{output}"/>
                 <arg value="-q"/>
@@ -222,18 +222,12 @@
 
     -->
 	
-    <target name="checkenv" description="Checks environment variables">
-        <echo message="JFLEX_JAR is ${env.JFLEX_JAR}"/>
-        <available file="${env.JFLEX_JAR}" type="file" property="JFLEX_JAR.set"/>
-        <fail message="JFLEX_JAR must be set correctly." unless="JFLEX_JAR.set"/> 
  	
-	</target>
-	
     <target name="download" description="Downloads third-party JARs">
         <ant antfile="${compiler}/downloads.xml" dir="${compiler}"/>
     	<delete dir="${compiler}/in"/>
     </target>
 	
-	<target name="setup" depends="checkenv, download" description="Does prelimary build setup">
+	<target name="setup" depends="download" description="Does prelimary build setup">
 	</target>
 
     <!--
@@ -771,6 +765,7 @@
     -->
 	
 	<target name="bin-legacy">
+		<mkdir dir="${sdk}/bin-legacy" />
         <copy todir="${sdk}/bin-legacy" includeEmptyDirs="false">
             <fileset dir="${sdk.branch}/bin">
                 <include name="**/*"/>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/6f979265/compiler/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler/downloads.xml b/compiler/downloads.xml
index 3938b2a..9e5021d 100644
--- a/compiler/downloads.xml
+++ b/compiler/downloads.xml
@@ -46,6 +46,7 @@
     <property name="commons-cli.name" value="commons-cli-1.2"/>
     <property name="commons-io.name" value="commons-io-2.0.1"/>	
     <property name="guava.name" value="guava-15.0"/>
+    <property name="jflex.name" value="jflex-1.5.1"/>
     <property name="jburg.name" value="jburg-1.10.1"/>
     <property name="lzma.name" value="lzma-sdk-9.2"/>
     
@@ -59,7 +60,7 @@
         they are each downloaded only if they don't already exist. 
     -->
     
-	<target name="main" depends="prepare, antlr-jar, commons-jars, guava-jar, jburg-jar,
lzma-jar" 
+	<target name="main" depends="prepare, antlr-jar, commons-jars, guava-jar, jflex-jar,
jburg-jar, lzma-jar" 
 		description="Downloads all the required thirdparty JARs"/>
 
     <target name="prepare" >
@@ -79,6 +80,7 @@
                 <include name="commons-cli*/**"/>
                 <include name="commons-io*/**"/>
                 <include name="guava*/**"/>
+                <include name="jflex*/**"/>
                 <include name="jburg*/**"/>
                 <include name="lzma*/**"/>
             </fileset>
@@ -333,6 +335,38 @@
         <get src="http://www.apache.org/licenses/LICENSE-2.0" dest="${lib.dir}/guava-LICENSE.txt"/>
     </target>
 
+    <!--
+	    jflex
+	-->
+	
+    <target name="jflex-jar-check" description="Checks if jflex.jar has been downloaded.">
+        <available file="${lib.dir}/jflex.jar" property="jflex.jar.exists"/>
+    </target>
+    
+    <target name="jflex-jar" depends="jflex-jar-check" unless="jflex.jar.exists" 
+        description="Downloads and copies jflex.jar to the lib directory.">
+        <echo file="${basedir}/jflex.properties">jflex.echo=${INFO_DOWNLOADING_FILE_FROM}</echo>
+        <replace file="${basedir}/jflex.properties" token="{0}" value="${jflex.name}.tar.gz"
/>
+        <replace file="${basedir}/jflex.properties" token="{1}" value="http://jflex.de"
/>
+        <property file="${basedir}/jflex.properties" />
+        <delete file="${basedir}/jflex.properties" />
+        <echo>${cli.echo}</echo>
+        <antcall target="download-zip">
+          <param name="srcUrl" value="http://jflex.de"/>
+          <param name="zipFile" value="${jflex.name}.tar.gz"/>
+          <param name="md5" value="a05956c9ac8bacdc2b8d07fb2cb331ce"/>
+          <param name="srcJarPath" value="${jflex.name}/lib/${jflex.name}.jar"/>
+          <param name="destJarFile" value="${lib.dir}/JFlex.jar"/>
+        </antcall>
+        <copy todir="${lib.dir}">
+            <fileset dir="${download.dir}/temp/${jflex.name}">
+                <include name="LICENSE.txt"/>
+            </fileset>            
+            <globmapper from="*" to="JFlex-*"/>
+        </copy>
+        <delete dir="${download.dir}/temp/${jflex.name}"/>
+    </target>
+
 	<!--
         jburg - for codegen of certain java source files
     -->


Mime
View raw message