[derby] 44/53: Build with JavaCC 4 instead of 5

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Thu Nov 24 13:58:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository derby.

commit cf013c38e479839796ede647303575aa236b9268
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Nov 18 15:53:17 2016 +0100

    Build with JavaCC 4 instead of 5
---
 debian/changelog                      |  1 +
 debian/control                        |  2 +-
 debian/patches/javacc5.diff           | 93 -----------------------------------
 debian/patches/series                 |  1 -
 debian/patches/work_with_newer_javacc | 11 -----
 debian/rules                          |  4 +-
 6 files changed, 4 insertions(+), 108 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d68406d..e258308 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 derby (10.10.2.0-3) UNRELEASED; urgency=medium
 
+  * Build with JavaCC 4 instead of 5
   * Moved the package to Git
 
  -- Emmanuel Bourg <ebourg at apache.org>  Fri, 18 Nov 2016 10:44:05 +0100
diff --git a/debian/control b/debian/control
index 8c5da49..18b4bfe 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Tim Booth <tbooth at ceh.ac.uk>, Emmanuel Bourg <ebourg at apache.org>
 Build-Depends: ant (>= 1.7),
                debhelper (>= 9),
                default-jdk,
-               javacc (>= 5.0-5),
+               javacc4,
                junit,
                liboro-java,
                libservlet3.1-java,
diff --git a/debian/patches/javacc5.diff b/debian/patches/javacc5.diff
deleted file mode 100644
index 2ca3095..0000000
--- a/debian/patches/javacc5.diff
+++ /dev/null
@@ -1,93 +0,0 @@
-Patch from upstream - https://issues.apache.org/jira/secure/attachment/12473505/javacc5.diff
---- a/java/tools/org/apache/derby/impl/tools/ij/ij.jj
-+++ b/java/tools/org/apache/derby/impl/tools/ij/ij.jj
-@@ -28,6 +28,7 @@
- 	UNICODE_INPUT = true;
- 	IGNORE_CASE = true;
- 	CACHE_TOKENS = true;
-+	JDK_VERSION = "1.4";
- }
- 
- PARSER_BEGIN(ij)
---- a/java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj
-+++ b/java/tools/org/apache/derby/impl/tools/ij/mtGrammar.jj
-@@ -27,6 +27,7 @@
- 	IGNORE_CASE = true;
- 	CACHE_TOKENS = true;
- 	LOOKAHEAD = 1;
-+	JDK_VERSION = "1.4";
- }
- 
- PARSER_BEGIN(mtGrammar)
---- /dev/null
-+++ b/java/engine/org/apache/derby/impl/sql/compile/TokenBase.java
-@@ -0,0 +1,35 @@
-+/*
-+
-+Derby - Class org.apache.derby.impl.sql.compile.Token
-+
-+Licensed to the Apache Software Foundation (ASF) under one or more
-+contributor license agreements.  See the NOTICE file distributed with
-+this work for additional information regarding copyright ownership.
-+The ASF licenses this file to you 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 org.apache.derby.impl.sql.compile;
-+
-+/**
-+ * Base class for the Token class generated by JavaCC.
-+ */
-+abstract class TokenBase {
-+    /**
-+     * beginOffset and endOffset are useful for siphoning substrings out of
-+     * the Statement so that we can recompile the substrings at upgrade time.
-+     * For instance, VIEW definitions and the Restrictions on Published Tables
-+     * need to be recompiled at upgrade time.
-+     */
-+    int beginOffset, endOffset;
-+}
---- a/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
-+++ b/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
-@@ -11,6 +11,8 @@
- 	COMMON_TOKEN_ACTION = true;
- 	CACHE_TOKENS = true;
- 	UNICODE_INPUT = true;
-+	JDK_VERSION = "1.4";
-+	TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase";
- }
- 
- PARSER_BEGIN(SQLParser)
---- a/java/engine/org/apache/derby/impl/sql/build.xml
-+++ b/java/engine/org/apache/derby/impl/sql/build.xml
-@@ -57,11 +57,10 @@
-       Token.java
-       TokenMgrError.java
- 
--      3 of those files are checked into the codeline:
-+      2 of those files are checked into the codeline:
- 
-       CharStream.java
-       ParseException.java
--      Token.java
- 
-       We don't want generated code to clash with the checked-in versions. So
-       we delete the conflicting classes here.
-@@ -70,7 +69,6 @@
-       <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
-         <include name="CharStream.java"/>
-         <include name="ParseException.java"/>
--        <include name="Token.java"/>
-       </fileset>
-     </delete>
- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 96d37c1..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-javacc5.diff
diff --git a/debian/patches/work_with_newer_javacc b/debian/patches/work_with_newer_javacc
deleted file mode 100644
index aaa78ce..0000000
--- a/debian/patches/work_with_newer_javacc
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/java/engine/org/apache/derby/impl/sql/compile/Token.java
-+++ b/java/engine/org/apache/derby/impl/sql/compile/Token.java
-@@ -98,7 +98,7 @@
-    * to the following switch statement. Then you can cast matchedToken
-    * variable to the appropriate type and use it in your lexical actions.
-    */
--  public static final Token newToken(int ofKind)
-+  public static final Token newToken(int ofKind, String curTokenImage)
-   {
-      switch(ofKind)
-      {
diff --git a/debian/rules b/debian/rules
index d245c8f..4d8f6a2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -19,12 +19,12 @@ override_dh_auto_clean:
 	# Other bits
 	rm -f *.log
 	cd java/demo/toursdb/ ; rm -rf *generated* ToursDB_schema.sql loadTables.sql
-	rm -f java/engine/org/apache/derby/impl/sql/compile/Token.java
 	
 override_dh_auto_build:
 	#Put .jar files in place
+	mkdir -p tools/java
 	cat /usr/share/java/oro.jar > tools/java/jakarta-oro-2.0.8.jar
-	cat /usr/share/java/javacc.jar > tools/java/javacc.jar
+	cat /usr/share/java/javacc4.jar > tools/java/javacc.jar
 	cat /usr/share/java/junit.jar > tools/java/junit.jar
 	
 	ant buildsource buildjars binscripts javadoc

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/derby.git



More information about the pkg-java-commits mailing list