[Jpackage-commits] dist/antlr3/devel .cvsignore, 1.1, 1.2 antlr-3.1.1.pom, NONE, 1.1 antlr-clean-generated, NONE, 1.1 antlr3, NONE, 1.1 antlr3-build.patch, NONE, 1.1 antlr3.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Sat Feb 20 18:47:35 CET 2010


Update of /home/projects/jpackage/cvs/dist/antlr3/devel
In directory ryu.zarb.org:/tmp/cvs-serv13081/devel

Modified Files:
	.cvsignore sources 
Added Files:
	antlr-3.1.1.pom antlr-clean-generated antlr3 
	antlr3-build.patch antlr3.spec 
Log Message:
Import antlr3 into devel

--- NEW FILE: antlr3.spec ---
# Copyright (c) 2000-2010, 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.
#

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%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}}

%bcond_with tests


Summary: ANother Tool for Language Recognition
Name: antlr3
Version: 3.1.1
Release: 9%{?dist}
URL: http://www.antlr.org/
Source0: http://www.antlr.org/download/antlr-%{version}.tar.gz
# Utility file, in conversation with upstream about this
Source1: antlr-clean-generated
Source2: antlr3
Source3: http://repo1.maven.org/maven2/org/antlr/antlr/%{version}/antlr-%{version}.pom
Patch0:  antlr3-build.patch
License: BSD
Group: Development/Libraries
BuildArch: noarch
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: java-devel >= 1.6.0
## For cleaner script
#BuildRequires: python
BuildRequires: ant
BuildRequires: ant-antlr
BuildRequires: ant-junit
BuildRequires: ant-trax
BuildRequires: antlr
BuildRequires: stringtemplate >= 0:3.2.1
# The build.xml uses this to version the jar
BuildRequires: bcel
BuildRequires: jpackage-utils >= 0:5.0.0
Requires: jpackage-utils >= 0:5.0.0
Requires: antlr
Requires: stringtemplate >= 0:3.2.1

Requires(post):    jpackage-utils >= 0:5.0.0
Requires(postun):  jpackage-utils >= 0:5.0.0

%description
ANother Tool for Language Recognition, is a language tool
that provides a framework for constructing recognizers,
interpreters, compilers, and translators from grammatical 
descriptions containing actions in a variety of target languages.

%package javadoc
Group:          Development/Documentation
Summary:        Javadoc for %{name}

%description javadoc
%{summary}.

%if 0
%package        python
Group:          Development/Libraries
Summary:        Python runtime support for ANTLR-generated parsers
BuildRequires:  python-devel
#BuildRequires:  python-setuptools-devel
BuildArch:      noarch

%description    python
Python runtime support for ANTLR-generated parsers
%endif

%prep
%setup -q -n antlr-%{version}
%patch0 -b .orig

%build
rm -f lib/*.jar
build-jar-repository -s -p lib stringtemplate bcel antlr
# Clean out generated files upstream includes
%{__python} %{SOURCE1} .
# Build
ant build-all \
%if %with tests
test \
%endif
javadoc

%if 0
# Build the python runtime
cd runtime/Python
%{__python} setup.py build
cd ../..
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -D build/antlr-%{version}.jar \
        $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -D build/antlr-%{version}-runtime.jar \
        $RPM_BUILD_ROOT%{_javadir}/%{name}-runtime-%{version}.jar
install -D -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr3
pushd $RPM_BUILD_ROOT%{_javadir}
for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`;
 done
popd
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap org.antlr antlr %{version} JPP %{name}

# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}

%if 0
cd runtime/Python
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
cd ../..
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%doc README.txt LICENSE.txt
%{_datadir}/java/*.jar
%{_bindir}/antlr3
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}

%if 0
%files python
%defattr(0644,root,root,0755)
%{python_sitelib}/antlr3/*
%{python_sitelib}/antlr_python_runtime-*
%endif

%changelog
* Sat Feb 20 2010 Ralph Apel <r.apel at r-apel.de> - 3.1.1-9
- Adapt to JPP6
- Omit -python subpackage for us
- Add pom and depmap frag
- Add javadocs
- Optionally run tests
- Build full and rt jars

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Mar 17 2009 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> - 3.1.1-7
- Fix the name of the jar to antlr.jar

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jan 12 2009 Colin Walters <walters at redhat.com> - 3.1.1-5
- Add bcel to build path

* Mon Jan 12 2009 Colin Walters <walters at redhat.com> - 3.1.1-4
- Add bcel build dep to version jar name

* Mon Nov 10 2008 Colin Walters <walters at redhat.com> - 3.1.1-3
- Add antlr3 script

* Mon Nov  6 2008 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> - 3.1.1-2
- Fix the install of the jar (remove the version)

* Mon Nov  3 2008 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> - 3.1.1-1
- Update to version 3.1.1
- Add python runtime subpackage

* Fri Jun 27 2008 Colin Walters <walters at redhat.com> - 3.0.1-2
- Fix some BRs

* Sun Apr 06 2008 Colin Walters <walters at redhat.com> - 3.0.1-1
- First version

--- NEW FILE: antlr3-build.patch ---
--- build.xml.orig	2008-10-01 23:40:17.000000000 +0200
+++ build.xml	2010-02-18 14:38:00.005041272 +0100
@@ -13,6 +13,7 @@
 
     <property name="build.classes" location="${build.dir}/classes" />
     <property name="build.rtclasses" location="${build.dir}/rtclasses" />
+    <property name="build.javadoc" location="${build.dir}/javadoc" />
     <property name="build.tests" location="${build.dir}/tests" />
     <property name="build.tests.xml" location="${build.tests}/xml" />
     <property name="build.tests.reports" location="${build.tests}/reports" />
@@ -31,6 +32,8 @@
     <property name="compile.deprecation" value="false" />
     <property name="compile.optimize" value="false" />
 
+    <property name="Name" value="Antlr" />
+
     <path id="src.path">
         <pathelement location="${src.dir}" />
         <pathelement location="${codegen.dir}" />
@@ -251,7 +254,22 @@
     </target>
 
     <target name="test" description="Run tests" depends="run-tests,run-reports">
+<!--
         <fail if="testfailure">Tests failed</fail>
+-->
+    </target>
+
+    <target name="javadoc" >
+        <mkdir dir="${build.javadoc}"/>
+	<javadoc packagenames="${packages}"
+	         destdir="${build.javadoc}"
+		 author="true"
+		 version="true"
+		 windowtitle="${Name} API"
+		 doctitle="${Name} API Documentation"
+		 >
+		 <fileset dir="src" defaultexcludes="yes"/>
+    	</javadoc>
     </target>
 
 </project>

--- NEW FILE: antlr-clean-generated ---
#!/usr/bin/python
# Clean out files which look to have been generated by antlr
# Author: Colin Walters <walters at verbum.org>
# This file is hereby placed into the public domain.

import os,sys,re

_antlr_compiled_re = re.compile(r'// \$ANTLR.*:.*->.*\$$')

def clean_antlr_generated(basedir):
  for (dpath,subdirs,fnames) in os.walk(basedir):
    for fname in fnames:
      fpath = os.path.join(dpath, fname)
      f = open(fpath)
      first = f.readline()
      f.close()
      if _antlr_compiled_re.match(first):
        print "Deleting antlr-compiled %s" % (fpath,)
        os.unlink(fpath)

if __name__ == '__main__':
  basedir = sys.argv[1]
  clean_antlr_generated(basedir)

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/antlr3/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	20 Feb 2010 17:26:03 -0000	1.1
--- sources	20 Feb 2010 17:47:33 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ c9fb696a18126a4d633aedcd96d9822a  antlr-3.1.1.tar.gz

--- NEW FILE: antlr3 ---
#!/bin/sh
#
# antlr3 script, modified from antlr script from:
# 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="org.antlr.Tool"
BASE_FLAGS=""
BASE_JARS="antlr.jar stringtemplate.jar antlr3.jar"

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS

# Let's start
run "$@"

--- NEW FILE: antlr-3.1.1.pom ---
<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.antlr</groupId>
	<artifactId>antlr</artifactId>
	<version>3.1.1</version>
	<packaging>jar</packaging>
	<url>http://antlr.org/</url>
	<licenses>
		<license>
			<name>BSD licence</name>
			<url>http://antlr.org/license.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<name>AntLR Parser Generator</name>
	<description>
		A framework for constructing recognizers, compilers, and translators from grammatical descriptions containing
		Java, C#, C++, or Python actions.
	</description>
	<dependencies>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>stringtemplate</artifactId>
			<version>3.2</version>
		</dependency>
		<dependency>
			<groupId>antlr</groupId>
			<artifactId>antlr</artifactId>
			<version>2.7.7</version>
		</dependency>
	</dependencies>
  <scm>
    <url>http://fisheye2.cenqua.com/browse/antlr</url>
  </scm> 
</project>

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/antlr3/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	20 Feb 2010 17:26:03 -0000	1.1
--- .cvsignore	20 Feb 2010 17:47:32 -0000	1.2
***************
*** 0 ****
--- 1 ----
+ antlr-3.1.1.tar.gz




More information about the JPackage-commits mailing list