diff --git a/.gitignore b/.gitignore index c79c486..daa0ee8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ java_cup_v10k.tar.gz java_cup-0.11a.tar.bz2 +/java_cup-0.11b.tar.bz2 diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index ba43a7d..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -CUP Parser Generator Copyright Notice, License, and Disclaimer -Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both the copyright notice and this permission notice and warranty -disclaimer appear in supporting documentation, and that the names of the -authors or their employers not be used in advertising or publicity -pertaining to distribution of the software without specific, written -prior permission. - -The authors and their employers disclaim all warranties with regard to -this software, including all implied warranties of merchantability and -fitness. In no event shall the authors or their employers be liable for -any special, indirect or consequential damages or any damages whatsoever -resulting from loss of use, data or profits, whether in an action of -contract, negligence or other tortious action, arising out of or in -connection with the use or performance of this software. diff --git a/java_cup-0.11a-manifest.patch b/java_cup-0.11a-manifest.patch deleted file mode 100644 index bf0dbcd..0000000 --- a/java_cup-0.11a-manifest.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 447c8beb89190adc2c51c533e93ad26f8eaf34d9 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 4 Dec 2010 10:27:15 -0500 -Subject: [PATCH] Remove class path from jar manifest - ---- - build.xml | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/build.xml b/build.xml -index 06170de..06e2a7d 100644 ---- a/build.xml -+++ b/build.xml -@@ -62,7 +62,6 @@ - - - -- - - - --- -1.7.3.1 - diff --git a/java_cup-build.patch b/java_cup-build.patch index bd1435d..4fcfdbd 100644 --- a/java_cup-build.patch +++ b/java_cup-build.patch @@ -1,22 +1,40 @@ ---- build.xml.sav 2006-03-28 14:34:52.000000000 +0300 -+++ build.xml 2010-01-08 12:50:20.346608627 +0200 -@@ -76,4 +76,19 @@ - - +--- build.xml~ 2014-06-12 17:23:24.000000000 +0200 ++++ build.xml 2015-06-23 10:30:57.374976304 +0200 +@@ -17,18 +17,6 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ + + +@@ -78,7 +66,6 @@ + + + +- + + + +@@ -143,4 +130,10 @@ + + + ++ ++ ++ ++ ++ ++ diff --git a/java_cup-pom.xml b/java_cup-pom.xml index 66b1d9a..c196b8f 100644 --- a/java_cup-pom.xml +++ b/java_cup-pom.xml @@ -6,5 +6,5 @@ java_cup jar Java CUP - 0.11a + 0.11b diff --git a/java_cup.spec b/java_cup.spec index 7114c96..ba3f71f 100644 --- a/java_cup.spec +++ b/java_cup.spec @@ -1,71 +1,35 @@ -# Copyright (c) 2000-2005, JPackage Project -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the JPackage Project nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -%define pkg_version 11a -%define section free +%define pkg_version 11b %define with_bootstrap 0 Name: java_cup -Version: 0.11a -Release: 20%{?dist} +Version: 0.11b +Release: 1%{?dist} Epoch: 1 -Summary: Java source interpreter +Summary: LALR parser generator for Java License: MIT -URL: http://www.cs.princeton.edu/%7Eappel/modern/java/CUP/ -#svn export -r 21 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11a -#tar cjf java_cup-0.11a.tar.bz2 java_cup-0.11a/ -Source0: java_cup-0.11a.tar.bz2 +URL: http://www2.cs.tum.edu/projects/cup/ +BuildArch: noarch + +# svn export -r 65 https://www2.in.tum.de/repos/cup/develop/ java_cup-0.11b +# tar cjf java_cup-0.11b.tar.bz2 java_cup-0.11b/ +Source0: java_cup-%{version}.tar.bz2 Source1: java_cup-pom.xml # Add OSGi manifests Source2: %{name}-MANIFEST.MF Source4: %{name}-runtime-MANIFEST.MF -# Taken from http://www2.cs.tum.edu/projects/cup/ -Source3: LICENSE.txt -Patch0: %{name}-build.patch -Patch1: java_cup-0.11a-manifest.patch -# Patch from eclipe-pdt to get around generated actions methods exceeding the 65535 bytes limit: -# http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/tree/plugins/org.eclipse.php.core.parser/javacup10k_split_do_action_method.diff -Patch2: javacup10k_split_do_action_method.diff +Patch0: %{name}-build.patch -BuildRequires: ant -BuildRequires: java-devel -BuildRequires: jpackage-utils >= 0:1.5 -BuildRequires: jflex +BuildRequires: ant +BuildRequires: java-devel +BuildRequires: jpackage-utils >= 0:1.5 +BuildRequires: jflex %if ! %{with_bootstrap} -BuildRequires: java_cup >= 1:0.11a +BuildRequires: java_cup >= 1:0.11a %endif -BuildRequires: zip +BuildRequires: zip -Requires: java-headless -BuildArch: noarch +Requires: java-headless %description @@ -86,22 +50,17 @@ Documentation for java_cup. %prep %setup -q %patch0 -b .build -%patch1 -p1 -b .manifest -pushd src -%patch2 -p1 -b .orig -popd cp %{SOURCE1} pom.xml -cp %{SOURCE3} . # remove all binary files find -name "*.class" -delete %if ! %{with_bootstrap} # remove prebuilt JFlex -rm -rf java_cup-0.11a/bin/JFlex.jar +rm -rf java_cup-%{version}/bin/JFlex.jar # remove prebuilt java_cup, if not bootstrapping -rm -rf java_cup-0.11a/bin/java-cup-11.jar +rm -rf java_cup-%{version}/bin/java-cup-11.jar %endif %build @@ -109,7 +68,7 @@ rm -rf java_cup-0.11a/bin/java-cup-11.jar export CLASSPATH=$(build-classpath java_cup java_cup-runtime jflex) %endif -ant +ant -Dcupversion=20150326 -Dsvnversion=65 find -name parser.cup -delete ant javadoc @@ -140,17 +99,20 @@ cp -pr dist/javadoc/* %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %doc changelog.txt %{_javadir}/* -%license LICENSE.txt +%license licence.txt %files manual %doc manual.html -%license LICENSE.txt +%license licence.txt %files javadoc -%license LICENSE.txt +%license licence.txt %{_javadocdir}/%{name} %changelog +* Tue Jun 23 2015 Mikolaj Izdebski - 1:0.11b-1 +- Update to upstream version 0.11b + * Wed Jun 17 2015 Fedora Release Engineering - 1:0.11a-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/javacup10k_split_do_action_method.diff b/javacup10k_split_do_action_method.diff deleted file mode 100644 index 971c00e..0000000 --- a/javacup10k_split_do_action_method.diff +++ /dev/null @@ -1,74 +0,0 @@ -# This patch splits the main do_action() method in order to solve the JVM memory limitation problem -# ---- java_cup_v10k.old/java_cup/emit.java 1999-07-24 15:51:33.000000000 +0300 -+++ java_cup_v10k/java_cup/emit.java 2009-01-21 11:12:13.000000000 +0200 -@@ -340,7 +340,7 @@ - out.println(" this.parser = parser;"); - out.println(" }"); - -- /* action method head */ -+ /* main action method head */ - out.println(); - out.println(" /** Method with the actual generated action code. */"); - out.println(" public final java_cup.runtime.Symbol " + -@@ -352,6 +352,38 @@ - out.println(" throws java.lang.Exception"); - out.println(" {"); - -+ /* split action code into several methods because of the JVM limitation of method size to 64KB */ -+ final int splitBase = 100; -+ for (int splitIdx = 0; splitIdx < production.number(); splitIdx += splitBase) { -+ if (splitIdx > 0) { -+ out.print(" else "); -+ } -+ if (splitIdx + splitBase < production.number()) { -+ out.println(" if (" + pre("act_num") + " < " + (splitIdx + splitBase) + ") {"); -+ } else { -+ out.println(" {"); -+ } -+ out.println(" return " + pre("do_action") + ((splitIdx + splitBase) / splitBase) + "("); -+ out.println(" " + pre("act_num, ") + pre("parser,") + pre("stack,") + pre("top") + ");"); -+ out.println(" }"); -+ } -+ out.println(" }"); -+ out.println(); -+ -+ for (int splitIdx = 0; splitIdx < production.number(); splitIdx += splitBase) { -+ -+ /* splitted action method head */ -+ out.println(); -+ out.println(" /** Method with the actual generated action code. */"); -+ out.println(" public final java_cup.runtime.Symbol " + -+ pre("do_action") + ((splitIdx + splitBase)/splitBase) + "("); -+ out.println(" int " + pre("act_num,")); -+ out.println(" java_cup.runtime.lr_parser " + pre("parser,")); -+ out.println(" java.util.Stack " + pre("stack,")); -+ out.println(" int " + pre("top)")); -+ out.println(" throws java.lang.Exception"); -+ out.println(" {"); -+ - /* declaration of result symbol */ - /* New declaration!! now return Symbol - 6/13/96 frankf */ -@@ -365,9 +397,9 @@ - out.println(" {"); - - /* emit action code for each production as a separate case */ -- for (Enumeration p = production.all(); p.hasMoreElements(); ) -- { -- prod = (production)p.nextElement(); -+ -+ for (int prodIdx = splitIdx; prodIdx < production.number() && prodIdx < splitIdx + splitBase; ++prodIdx) { -+ prod = (production)production.find(prodIdx); - - /* case label */ - out.println(" /*. . . . . . . . . . . . . . . . . . . .*/"); -@@ -471,6 +503,8 @@ - /* end of method */ - out.println(" }"); - -+ } -+ - /* end of class */ - out.println("}"); - out.println(); diff --git a/sources b/sources index d1fa271..e882a35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -686765898d356a6d3e780d83b3236f39 java_cup-0.11a.tar.bz2 +738656753ed84fb25c9cbe29ab9f05fc java_cup-0.11b.tar.bz2