2009-05-19 04:38:03 +02:00
|
|
|
#
|
2013-01-29 10:36:32 +01:00
|
|
|
# spec file for package java-cup
|
2009-05-19 04:38:03 +02:00
|
|
|
#
|
2018-05-17 21:59:13 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-05-19 04:38:03 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2013-08-29 09:58:59 +02:00
|
|
|
%global _without_bootstrap 1
|
2009-05-19 04:38:03 +02:00
|
|
|
%define cvs_version 11a
|
|
|
|
%define real_name java-cup
|
2017-09-15 13:18:18 +02:00
|
|
|
%bcond_with bootstrap
|
2009-05-19 04:38:03 +02:00
|
|
|
Name: java-cup
|
|
|
|
Version: 0.11
|
2013-01-29 10:36:32 +01:00
|
|
|
Release: 0
|
2009-05-19 04:38:03 +02:00
|
|
|
Summary: LALR Parser Generator in Java
|
2012-06-11 07:28:58 +02:00
|
|
|
License: HPND
|
2013-01-29 10:36:32 +01:00
|
|
|
Group: Development/Libraries/Java
|
2009-05-19 04:38:03 +02:00
|
|
|
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
|
|
|
|
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
|
2017-09-15 13:18:18 +02:00
|
|
|
BuildRequires: java-devel
|
2010-11-15 17:54:00 +01:00
|
|
|
BuildRequires: xml-commons-apis-bootstrap
|
|
|
|
BuildRequires: xml-commons-resolver-bootstrap
|
|
|
|
#!BuildIgnore: xml-commons-jaxp-1.3-apis
|
|
|
|
#!BuildIgnore: xml-commons-resolver12
|
2009-05-19 04:38:03 +02:00
|
|
|
Obsoletes: java_cup < %{version}-%{release}
|
|
|
|
Provides: java_cup = %{version}-%{release}
|
|
|
|
BuildArch: noarch
|
2017-09-15 13:18:18 +02:00
|
|
|
%if %without bootstrap
|
|
|
|
BuildRequires: java-cup-bootstrap
|
|
|
|
BuildRequires: jflex
|
|
|
|
%endif
|
2013-08-29 09:58:59 +02:00
|
|
|
# bootstrap variant is just stripped down java-cup, so it conflicts
|
|
|
|
%if %without bootstrap
|
|
|
|
Conflicts: java-cup-bootstrap
|
|
|
|
%else
|
|
|
|
Conflicts: java-cup
|
|
|
|
%endif
|
|
|
|
|
2009-05-19 04:38:03 +02:00
|
|
|
%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 manual
|
|
|
|
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
|
|
|
|
%patch1 -p1
|
|
|
|
%if %with bootstrap
|
|
|
|
%setup -q -T -D -a 2 -n develop
|
|
|
|
%patch2 -p1
|
|
|
|
%else
|
2017-09-15 13:18:18 +02:00
|
|
|
%{_bindir}/find . -name '*.jar' | %{_bindir}/xargs rm
|
2009-05-19 04:38:03 +02:00
|
|
|
%patch3 -p1
|
|
|
|
%endif
|
|
|
|
%patch4 -p1
|
2017-09-15 13:18:18 +02:00
|
|
|
perl -pi -e 's/1\.2/1.6/g' build.xml
|
|
|
|
mkdir -p classes dist
|
2009-05-19 04:38:03 +02:00
|
|
|
cp %{SOURCE3} license.txt
|
|
|
|
|
|
|
|
%build
|
|
|
|
%if %with bootstrap
|
|
|
|
export CLASSPATH=
|
|
|
|
%else
|
|
|
|
export CLASSPATH=$(build-classpath java-cup jflex)
|
|
|
|
%endif
|
|
|
|
export OPT_JAR_LIST=:
|
2017-09-15 13:18:18 +02:00
|
|
|
ant
|
2009-05-19 04:38:03 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
# jar
|
2017-09-15 13:18:18 +02:00
|
|
|
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)
|
2009-05-19 04:38:03 +02:00
|
|
|
# compatibility symlinks
|
2017-09-15 13:18:18 +02:00
|
|
|
(cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s %{real_name}-runtime.jar java_cup-runtime.jar)
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
install -p -m 755 %{SOURCE1} %{buildroot}%{_bindir}/%{real_name}
|
2009-05-19 04:38:03 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%doc changelog.txt license.txt
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{real_name}
|
|
|
|
%{_javadir}/*
|
|
|
|
%if %without bootstrap
|
|
|
|
%files manual
|
|
|
|
%doc manual.html
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|