forked from pool/java-cup
This commit is contained in:
commit
d9410d35b9
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
develop.tar.bz2
Normal file
3
develop.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9a54e59544618844fd5209d40b7832b4623753fd1432bd60bd73cac347d27e69
|
||||||
|
size 285904
|
15
java-cup-bootstrap.changes
Normal file
15
java-cup-bootstrap.changes
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 11 16:33:27 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Fixed bnc#501635: Added a lincense file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 5 09:01:11 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Build using gcj (for proper bootstrap of openjdk)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 29 10:27:07 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Initial packaging of java-cup-bootstrap 0.11 in SUSE (from jpp5)
|
||||||
|
|
195
java-cup-bootstrap.spec
Normal file
195
java-cup-bootstrap.spec
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
#
|
||||||
|
# spec file for package java-cup-bootstrap (Version 0.11)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
||||||
|
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
||||||
|
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
||||||
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
||||||
|
##### WARNING: please do not edit this auto generated spec file. Use the java-cup.spec! #####
|
||||||
|
%define with_bootstrap 1
|
||||||
|
%bcond_with bootstrap
|
||||||
|
%define section free
|
||||||
|
%define cvs_version 11a
|
||||||
|
%define real_name java-cup
|
||||||
|
|
||||||
|
Name: java-cup-bootstrap
|
||||||
|
# This line is not a comment, please do not remove it!
|
||||||
|
#%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name})
|
||||||
|
Version: 0.11
|
||||||
|
Release: 2
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
License: Other uncritical OpenSource License
|
||||||
|
Url: http://www2.cs.tum.edu/projects/cup/
|
||||||
|
# https://www2.in.tum.de/WebSVN/dl.php?repname=CUP&path=/develop/&rev=0&isdir=1
|
||||||
|
Source0: develop.tar.bz2
|
||||||
|
Source1: java-cup.script
|
||||||
|
Source2: java-cup-generated-files.tar.bz2
|
||||||
|
# From http://www2.cs.tum.edu/projects/cup/
|
||||||
|
Source3: java-cup.license
|
||||||
|
Patch0: java-cup-javadoc.patch
|
||||||
|
Patch1: java-cup-no-classpath-in-manifest.patch
|
||||||
|
Patch2: java-cup-no-cup-no-jflex.patch
|
||||||
|
Patch3: java-cup-classpath.patch
|
||||||
|
# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
|
||||||
|
Patch4: java-cup-lr_parser-constructor.patch
|
||||||
|
BuildRequires: ant
|
||||||
|
%if %without bootstrap
|
||||||
|
BuildRequires: java-cup-bootstrap
|
||||||
|
BuildRequires: jflex
|
||||||
|
%endif
|
||||||
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
||||||
|
Obsoletes: java_cup < %{version}-%{release}
|
||||||
|
Provides: java_cup = %{version}-%{release}
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
|
%description
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non
|
||||||
|
|
||||||
|
* terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%if %without bootstrap
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
License: Other uncritical OpenSource License
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non
|
||||||
|
|
||||||
|
* terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%package manual
|
||||||
|
License: Other uncritical OpenSource License
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
|
%description manual
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non
|
||||||
|
|
||||||
|
* terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n develop
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%if %with bootstrap
|
||||||
|
%setup -q -T -D -a 2 -n develop
|
||||||
|
%patch2 -p1
|
||||||
|
%else
|
||||||
|
%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs %{__rm}
|
||||||
|
%patch3 -p1
|
||||||
|
%endif
|
||||||
|
%patch4 -p1
|
||||||
|
%{__perl} -pi -e 's/1\.2/1.5/g' build.xml
|
||||||
|
%{__mkdir_p} classes dist
|
||||||
|
cp %{SOURCE3} license.txt
|
||||||
|
|
||||||
|
%build
|
||||||
|
%if %with bootstrap
|
||||||
|
export CLASSPATH=
|
||||||
|
%else
|
||||||
|
export CLASSPATH=$(build-classpath java-cup jflex)
|
||||||
|
%endif
|
||||||
|
export OPT_JAR_LIST=:
|
||||||
|
%ant
|
||||||
|
%if %without bootstrap
|
||||||
|
%ant javadoc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
# jar
|
||||||
|
%{__mkdir_p} %{buildroot}%{_javadir}
|
||||||
|
%{__cp} -a dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
|
||||||
|
%{__cp} -a dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
|
||||||
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)
|
||||||
|
# compatibility symlinks
|
||||||
|
(cd %{buildroot}%{_javadir} && %{__ln_s} %{real_name}.jar java_cup.jar && %{__ln_s} %{real_name}-runtime.jar java_cup-runtime.jar)
|
||||||
|
%if %without bootstrap
|
||||||
|
# javadoc
|
||||||
|
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
%{__cp} -a dist/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
(cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
|
||||||
|
%endif
|
||||||
|
%{__mkdir_p} %{buildroot}%{_bindir}
|
||||||
|
%{__install} -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%doc changelog.txt license.txt
|
||||||
|
%attr(0755,root,root) %{_bindir}/%{real_name}
|
||||||
|
%{_javadir}/*
|
||||||
|
%if %without bootstrap
|
||||||
|
|
||||||
|
%files manual
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%doc manual.html
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%{_javadocdir}/%{name}-%{version}
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon May 11 2009 mvyskocil@suse.cz
|
||||||
|
- Fixed bnc#501635: Added a lincense file
|
||||||
|
* Tue May 05 2009 mvyskocil@suse.cz
|
||||||
|
- Build using gcj (for proper bootstrap of openjdk)
|
||||||
|
* Wed Apr 29 2009 mvyskocil@suse.cz
|
||||||
|
- Initial packaging of java-cup-bootstrap 0.11 in SUSE (from jpp5)
|
13
java-cup-classpath.patch
Normal file
13
java-cup-classpath.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- develop/build.xml.orig 2006-09-09 06:16:46.000000000 +0200
|
||||||
|
+++ develop/build.xml 2006-09-09 06:20:38.000000000 +0200
|
||||||
|
@@ -40,8 +40,8 @@
|
||||||
|
<delete dir="${dist}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
- <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="${bin}/java-cup-11.jar" />
|
||||||
|
- <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="${bin}/JFlex.jar" />
|
||||||
|
+ <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="/usr/share/java/java_cup.jar" />
|
||||||
|
+ <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="/usr/share/java/jflex.jar" />
|
||||||
|
|
||||||
|
<target name="cup" depends="init">
|
||||||
|
<cup srcfile="${cup}/parser.cup" interface="on" destdir="${java}" parser="parser" symbols="sym" quiet="false" nonterms="true"/>
|
3
java-cup-generated-files.tar.bz2
Normal file
3
java-cup-generated-files.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d5c01e033aede7be297485de7d10b1c923f6f1268d4c679d8939285a03027dde
|
||||||
|
size 16878
|
16
java-cup-javadoc.patch
Normal file
16
java-cup-javadoc.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- develop/build.xml.orig 2006-09-09 06:16:46.000000000 +0200
|
||||||
|
+++ develop/build.xml 2006-09-09 06:18:30.000000000 +0200
|
||||||
|
@@ -74,6 +74,13 @@
|
||||||
|
<arg value="-interface" />
|
||||||
|
<arg value="${cup}/parser.cup" />
|
||||||
|
</java>
|
||||||
|
+ </target>
|
||||||
|
|
||||||
|
+ <target name="javadoc" >
|
||||||
|
+ <mkdir dir="${dist}/javadoc"/>
|
||||||
|
+ <javadoc destdir="${dist}/javadoc" author="true" version="true" use="true" windowtitle="java_cup API">
|
||||||
|
+ <fileset dir="${src}" defaultexcludes="yes">
|
||||||
|
+ </fileset>
|
||||||
|
+ </javadoc>
|
||||||
|
</target>
|
||||||
|
</project>
|
18
java-cup-lr_parser-constructor.patch
Normal file
18
java-cup-lr_parser-constructor.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- develop/src/java_cup/runtime/lr_parser.java 2006-03-28 14:34:53.000000000 +0300
|
||||||
|
+++ develop/src/java_cup/runtime/lr_parser.java.f 2007-06-23 11:01:53.000000000 +0300
|
||||||
|
@@ -121,6 +121,7 @@
|
||||||
|
* Simple constructor.
|
||||||
|
*/
|
||||||
|
public lr_parser() {
|
||||||
|
+ symbolFactory = new DefaultSymbolFactory();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -133,7 +134,6 @@
|
||||||
|
* Constructor that sets the default scanner and a SymbolFactory
|
||||||
|
*/
|
||||||
|
public lr_parser(Scanner s, SymbolFactory symfac) {
|
||||||
|
- this(); // in case default constructor someday does something
|
||||||
|
symbolFactory = symfac;
|
||||||
|
setScanner(s);
|
||||||
|
}
|
10
java-cup-no-classpath-in-manifest.patch
Normal file
10
java-cup-no-classpath-in-manifest.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- develop/build.xml.orig 2006-09-09 06:43:37.000000000 +0200
|
||||||
|
+++ develop/build.xml 2006-09-09 06:45:08.000000000 +0200
|
||||||
|
@@ -62,7 +62,6 @@
|
||||||
|
<jar jarfile="${dist}/java-cup-11a.jar" basedir="${classes}">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Main-Class" value="java_cup/Main" />
|
||||||
|
- <attribute name="Class-Path" value="java-cup-11a-runtime.jar" />
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
<jar jarfile="${dist}/java-cup-11a-runtime.jar" basedir="${classes}" includes="java_cup/runtime/*">
|
22
java-cup-no-cup-no-jflex.patch
Normal file
22
java-cup-no-cup-no-jflex.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- develop/build.xml.orig 2006-09-09 06:43:37.000000000 +0200
|
||||||
|
+++ develop/build.xml 2006-09-09 06:44:10.000000000 +0200
|
||||||
|
@@ -40,18 +40,7 @@
|
||||||
|
<delete dir="${dist}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
- <taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="${bin}/java-cup-11.jar" />
|
||||||
|
- <taskdef name="jflex" classname="JFlex.anttask.JFlexTask" classpath="${bin}/JFlex.jar" />
|
||||||
|
-
|
||||||
|
- <target name="cup" depends="init">
|
||||||
|
- <cup srcfile="${cup}/parser.cup" interface="on" destdir="${java}" parser="parser" symbols="sym" quiet="false" nonterms="true"/>
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
- <target name="jflex" depends="cup">
|
||||||
|
- <jflex file="${flex}/Lexer.jflex" destdir="${java}" />
|
||||||
|
- </target>
|
||||||
|
-
|
||||||
|
- <target name="compile" depends="jflex">
|
||||||
|
+ <target name="compile">
|
||||||
|
<copy todir="${java}"><fileset dir="${src}"></fileset></copy>
|
||||||
|
<javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off" debug="on" source="1.2" target="1.2">
|
||||||
|
<classpath refid="libraries"/>
|
15
java-cup.changes
Normal file
15
java-cup.changes
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 11 16:33:27 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Fixed bnc#501635: Added a lincense file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 5 09:01:11 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Build using gcj (for proper bootstrap of openjdk)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 29 10:27:07 CEST 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Initial packaging of java-cup-bootstrap 0.11 in SUSE (from jpp5)
|
||||||
|
|
26
java-cup.license
Normal file
26
java-cup.license
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
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.
|
||||||
|
This is an open source license. It is also GPL-Compatible (see entry for
|
||||||
|
"Standard ML of New Jersey"). The portions of CUP output which are hard-coded
|
||||||
|
into the CUP source code are (naturally) covered by this same license, as is
|
||||||
|
the CUP runtime code linked with the generated parser.
|
||||||
|
|
||||||
|
Java is a trademark of Sun Microsystems, Inc. References to the Java
|
||||||
|
programming language in relation to JLex are not meant to imply that Sun
|
||||||
|
endorses this product.
|
27
java-cup.script
Normal file
27
java-cup.script
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# java-cup script
|
||||||
|
# JPackage Project <http://www.jpackage.org/>
|
||||||
|
|
||||||
|
# Source functions library
|
||||||
|
if [ -f /usr/share/java-utils/java-functions ] ; then
|
||||||
|
. /usr/share/java-utils/java-functions
|
||||||
|
else
|
||||||
|
echo "Can't find functions library, aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
MAIN_CLASS="java_cup.Main"
|
||||||
|
BASE_FLAGS=""
|
||||||
|
BASE_OPTIONS=""
|
||||||
|
BASE_JARS="java-cup java-cup-runtime"
|
||||||
|
|
||||||
|
# Set parameters
|
||||||
|
set_jvm
|
||||||
|
set_classpath $BASE_JARS
|
||||||
|
set_flags $BASE_FLAGS
|
||||||
|
set_options $BASE_OPTIONS
|
||||||
|
|
||||||
|
# Let's start
|
||||||
|
run "$@"
|
192
java-cup.spec
Normal file
192
java-cup.spec
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
#
|
||||||
|
# spec file for package java-cup (Version 0.11)
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
||||||
|
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
||||||
|
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
||||||
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
||||||
|
%define _without_bootstrap 1
|
||||||
|
%bcond_with bootstrap
|
||||||
|
%define section free
|
||||||
|
%define cvs_version 11a
|
||||||
|
%define real_name java-cup
|
||||||
|
|
||||||
|
Name: java-cup
|
||||||
|
# This line is not a comment, please do not remove it!
|
||||||
|
#%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name})
|
||||||
|
Version: 0.11
|
||||||
|
Release: 2
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
License: Standard ML of New Jersey (http://www.smlnj.org/license.html)
|
||||||
|
Url: http://www2.cs.tum.edu/projects/cup/
|
||||||
|
# https://www2.in.tum.de/WebSVN/dl.php?repname=CUP&path=/develop/&rev=0&isdir=1
|
||||||
|
Source0: develop.tar.bz2
|
||||||
|
Source1: java-cup.script
|
||||||
|
Source2: java-cup-generated-files.tar.bz2
|
||||||
|
# From http://www2.cs.tum.edu/projects/cup/
|
||||||
|
Source3: java-cup.license
|
||||||
|
Patch0: java-cup-javadoc.patch
|
||||||
|
Patch1: java-cup-no-classpath-in-manifest.patch
|
||||||
|
Patch2: java-cup-no-cup-no-jflex.patch
|
||||||
|
Patch3: java-cup-classpath.patch
|
||||||
|
# Missing symbolFactory initialization in lr_parser, causes sinjdoc to crash
|
||||||
|
Patch4: java-cup-lr_parser-constructor.patch
|
||||||
|
BuildRequires: ant
|
||||||
|
%if %without bootstrap
|
||||||
|
BuildRequires: java-cup-bootstrap
|
||||||
|
BuildRequires: jflex
|
||||||
|
%endif
|
||||||
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
||||||
|
Obsoletes: java_cup < %{version}-%{release}
|
||||||
|
Provides: java_cup = %{version}-%{release}
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
|
%description
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%if %without bootstrap
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
License: Standard ML of New Jersey (http://www.smlnj.org/license.html)
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non
|
||||||
|
|
||||||
|
* terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%package manual
|
||||||
|
License: Standard ML of New Jersey (http://www.smlnj.org/license.html)
|
||||||
|
Summary: LALR Parser Generator in Java
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
|
%description manual
|
||||||
|
java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||||
|
use CUP in an Ant-Target
|
||||||
|
|
||||||
|
* start CUP by a simple command like java -jar java-cup-11a.jar
|
||||||
|
myGrammar.cup
|
||||||
|
|
||||||
|
* use generic parametrized classes (since Java 1.5) as datatypes for
|
||||||
|
non
|
||||||
|
|
||||||
|
* terminals and terminals
|
||||||
|
|
||||||
|
* have Your own symbol classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n develop
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%if %with bootstrap
|
||||||
|
%setup -q -T -D -a 2 -n develop
|
||||||
|
%patch2 -p1
|
||||||
|
%else
|
||||||
|
%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs %{__rm}
|
||||||
|
%patch3 -p1
|
||||||
|
%endif
|
||||||
|
%patch4 -p1
|
||||||
|
%{__perl} -pi -e 's/1\.2/1.5/g' build.xml
|
||||||
|
%{__mkdir_p} classes dist
|
||||||
|
cp %{SOURCE3} license.txt
|
||||||
|
|
||||||
|
%build
|
||||||
|
%if %with bootstrap
|
||||||
|
export CLASSPATH=
|
||||||
|
%else
|
||||||
|
export CLASSPATH=$(build-classpath java-cup jflex)
|
||||||
|
%endif
|
||||||
|
export OPT_JAR_LIST=:
|
||||||
|
%ant
|
||||||
|
%if %without bootstrap
|
||||||
|
%ant javadoc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%install
|
||||||
|
# jar
|
||||||
|
%{__mkdir_p} %{buildroot}%{_javadir}
|
||||||
|
%{__cp} -a dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}-%{version}.jar
|
||||||
|
%{__cp} -a dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime-%{version}.jar
|
||||||
|
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do %{__ln_s} ${jar} ${jar/-%{version}/}; done)
|
||||||
|
# compatibility symlinks
|
||||||
|
(cd %{buildroot}%{_javadir} && %{__ln_s} %{real_name}.jar java_cup.jar && %{__ln_s} %{real_name}-runtime.jar java_cup-runtime.jar)
|
||||||
|
%if %without bootstrap
|
||||||
|
# javadoc
|
||||||
|
%{__mkdir_p} %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
%{__cp} -a dist/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
||||||
|
(cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})
|
||||||
|
%endif
|
||||||
|
%{__mkdir_p} %{buildroot}%{_bindir}
|
||||||
|
%{__install} -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
%{__rm} -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%doc changelog.txt license.txt
|
||||||
|
%attr(0755,root,root) %{_bindir}/%{real_name}
|
||||||
|
%{_javadir}/*
|
||||||
|
%if %without bootstrap
|
||||||
|
|
||||||
|
%files manual
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%doc manual.html
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%{_javadocdir}/%{name}-%{version}
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon May 11 2009 mvyskocil@suse.cz
|
||||||
|
- Fixed bnc#501635: Added a lincense file
|
||||||
|
* Tue May 05 2009 mvyskocil@suse.cz
|
||||||
|
- Build using gcj (for proper bootstrap of openjdk)
|
||||||
|
* Wed Apr 29 2009 mvyskocil@suse.cz
|
||||||
|
- Initial packaging of java-cup-bootstrap 0.11 in SUSE (from jpp5)
|
36
jpackage-bootstrap-prepare.sh
Normal file
36
jpackage-bootstrap-prepare.sh
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This script is based on libcdio_spec-prepare.sh (thanks to sbrabec@suse.cz)
|
||||||
|
# create a -bootstrap spec for majority of Java packages for bootstrapping
|
||||||
|
#
|
||||||
|
#Usage:
|
||||||
|
# 1.) add these two lines below into the spec file including hash sign (#)
|
||||||
|
# behind the Name: tag
|
||||||
|
# # This line is not a comment, please do not remove it!
|
||||||
|
# #%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name})
|
||||||
|
# 2.) you need to define a with_bootstrap macro with value 1
|
||||||
|
#
|
||||||
|
# How it works:
|
||||||
|
# 1.) Was called by rpmbuild (or Re, or should be invoked manually from command line)
|
||||||
|
# 2.) Rename the package name to name-bootstrap
|
||||||
|
# 3.) Redefine the with_bootstrap macro to _without_bootstrap 1
|
||||||
|
# 4.) Define a real_name macro with real name (used in %install and %files)
|
||||||
|
# 5.) Copy the .changes to -boostrap.changes
|
||||||
|
|
||||||
|
|
||||||
|
ORIG_SPEC=${2%-bootstrap}
|
||||||
|
# Never update -bootstrap file when it is already opened. It will break advanced build scripts:
|
||||||
|
if [[ "${2}" != "${ORIG_SPEC}" ]]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f ${1}/${ORIG_SPEC}.spec ]] ; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n"
|
||||||
|
sed "s/^%define _without_bootstrap.*$/${EDIT_WARNING}%define with_bootstrap 1/;
|
||||||
|
s/^\(Name:.*\)$/\1-bootstrap/;
|
||||||
|
" < ${1}/${ORIG_SPEC}.spec > ${1}/${ORIG_SPEC}-bootstrap.spec
|
||||||
|
|
||||||
|
cp -a ${1}/${ORIG_SPEC}.changes ${1}/${ORIG_SPEC}-bootstrap.changes
|
Loading…
x
Reference in New Issue
Block a user