From c3fce65a2b9bb1d703f15f04778c98dd18f85528 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2014 09:44:34 +0000 Subject: import devtoolset-3-lpg-2.0.17-6.el7 --- diff --git a/.devtoolset-3-lpg.metadata b/.devtoolset-3-lpg.metadata new file mode 100644 index 0000000..cd78694 --- /dev/null +++ b/.devtoolset-3-lpg.metadata @@ -0,0 +1,4 @@ +bcc582c52b67833d55b8e7485c7f5059af7bd7a2 SOURCES/lpg-generator-cpp-src-2.0.17.zip +68101cc06ee439f119e395f07f1b056be117fa18 SOURCES/lpg-generator-templates-2.0.17.zip +03d68731760a81239b22a813d2847006952ec795 SOURCES/lpg-java-runtime-src-2.0.17.zip +ed97f9bd51a8daf7af95127d774692aa556f4761 SOURCES/lpgdistribution-05-16-06.zip diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ca1e62 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +SOURCES/lpg-generator-cpp-src-2.0.17.zip +SOURCES/lpg-generator-templates-2.0.17.zip +SOURCES/lpg-java-runtime-src-2.0.17.zip +SOURCES/lpgdistribution-05-16-06.zip diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/lpg-bootstrap-target.patch b/SOURCES/lpg-bootstrap-target.patch new file mode 100644 index 0000000..9a72440 --- /dev/null +++ b/SOURCES/lpg-bootstrap-target.patch @@ -0,0 +1,11 @@ +--- lpg-generator-cpp/src/Makefile 2009-04-27 23:58:38.000000000 +0100 ++++ lpg-generator-cpp/src/Makefile 2009-04-27 23:59:28.000000000 +0100 +@@ -26,7 +26,7 @@ + GEN_FILES=jikespg_sym.h jikespg_def.h jikespg_prs.h jikespg_prs.cpp jikespg_act.h jikespg_act.cpp jikespg_init.cpp + + bootstrap: jikespg.g +- ../bin/lpg jikespg.g ++ ../bin/$(TARGET) jikespg.g + $(RM) jikespg.l + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/SOURCES/lpg-build.xml b/SOURCES/lpg-build.xml new file mode 100644 index 0000000..352d781 --- /dev/null +++ b/SOURCES/lpg-build.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SOURCES/lpg-manifest.mf b/SOURCES/lpg-manifest.mf new file mode 100644 index 0000000..86fbee4 --- /dev/null +++ b/SOURCES/lpg-manifest.mf @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ClassPath: . +Bundle-Vendor: Eclipse.org +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3 +Bundle-Name: SourceForge LPG +Bundle-SymbolicName: net.sourceforge.lpg.lpgjavaruntime +Export-Package: lpg.lpgjavaruntime; version="1.1" +Bundle-Version: 1.1.0.v200803061910 +Bundle-ManifestVersion: 2 + diff --git a/SOURCES/lpg-osgi-jar.patch b/SOURCES/lpg-osgi-jar.patch new file mode 100644 index 0000000..ded076f --- /dev/null +++ b/SOURCES/lpg-osgi-jar.patch @@ -0,0 +1,24 @@ +--- lpg-java-runtime/META-INF/MANIFEST.MF 2009-05-18 23:09:59.000000000 +0100 ++++ lpg-java-runtime/META-INF/MANIFEST.MF 2009-07-04 16:26:41.204699558 +0100 +@@ -2,7 +2,7 @@ + Bundle-ManifestVersion: 2 + Bundle-Name: LPG Java Runtime + Bundle-SymbolicName: lpg.runtime +-Bundle-ClassPath: lpgruntime.jar ++Bundle-ClassPath: . + Bundle-Version: 2.0.17 + Bundle-Vendor: pcharles@us.ibm.com + Bundle-Localization: plugin +--- lpg-java-runtime/exportPlugin.xml 2009-02-18 23:14:10.000000000 +0000 ++++ lpg-java-runtime/exportPlugin.xml 2009-07-04 16:41:44.509545672 +0100 +@@ -70,9 +70,6 @@ + + + +- ++ includes="**/*.class,**/*.properties" manifest="${basedir}/META-INF/MANIFEST.MF"/> + + diff --git a/SPECS/lpg.spec b/SPECS/lpg.spec new file mode 100644 index 0000000..8baa067 --- /dev/null +++ b/SPECS/lpg.spec @@ -0,0 +1,185 @@ +%{?scl:%scl_package lpg} +%{!?scl:%global pkg_name %{name}} + +%global _version 2.0.17 +%global _compat_version 1.1.0 + +Name: %{?scl_prefix}lpg +Version: %{_version} +Release: 6%{?dist} +Summary: LALR Parser Generator +Group: Development/Libraries +# although the text of the licence isn't distributed with some of the source, +# the author has exlicitly stated that everything is covered under the EPL +# see: http://sourceforge.net/forum/forum.php?thread_id=3277926&forum_id=523519 +License: EPL +URL: http://lpg.sourceforge.net/ + +Source0: http://downloads.sourceforge.net/lpg/lpg-java-runtime-src-%{version}.zip +Source1: http://downloads.sourceforge.net/lpg/lpg-generator-cpp-src-%{version}.zip +Source2: http://downloads.sourceforge.net/lpg/lpg-generator-templates-%{version}.zip + +# source archive for the java compat lib +Source3: http://downloads.sourceforge.net/lpg/lpgdistribution-05-16-06.zip + +# upstream does not provide a build script or manifest file for the java +# compat lib +Source4: %{pkg_name}-build.xml +Source5: %{pkg_name}-manifest.mf + +# TODO: drop Source3, 4, 5 and obsolete the java-compat package when dependent +# projects are ported to LPG 2.x.x + +# executable name in the bootstrap make target is wrong; sent upstream, see: +# https://sourceforge.net/tracker/?func=detail&aid=2794057&group_id=155963&atid=797881 +Patch0: %{pkg_name}-bootstrap-target.patch + +# change build script to build the base jar with osgi bundle info +Patch1: %{pkg_name}-osgi-jar.patch + +%{?scl:Requires: %scl_runtime} + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +The LALR Parser Generator (LPG) is a tool for developing scanners and parsers +written in Java, C++ or C. Input is specified by BNF rules. LPG supports +backtracking (to resolve ambiguity), automatic AST generation and grammar +inheritance. + +%package java +Summary: Java runtime library for LPG +Group: Development/Libraries + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: ant-apache-regexp +Requires: java +Requires: jpackage-utils + +%description java +Java runtime library for parsers generated with the LALR Parser Generator +(LPG). + +%package java-compat +Version: %{_compat_version} +Summary: Compatibility Java runtime library for LPG 1.x +Group: Development/Libraries + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: ant +Requires: java +Requires: jpackage-utils + +%description java-compat +Compatibility Java runtime library for parsers generated with the LALR Parser +Generator (LPG) 1.x. + +%prep +%setup -q -T -c -n %{name}-%{version} + +# because you can't use setup to unzip to subdirectories when your source +# archives do not create top level directories +unzip -qq %{SOURCE0} -d lpg-java-runtime +unzip -qq %{SOURCE1} -d lpg-generator-cpp +unzip -qq %{SOURCE2} -d lpg-generator-templates +chmod -Rf a+rX,u+w,g-w,o-w . + +# setup java compat stuff +%setup -q -D -T -a 3 -n %{name}-%{version} +cp -p %{SOURCE4} lpgdistribution/build.xml +cp -p %{SOURCE5} lpgdistribution/MANIFEST.MF + +# apply patches +%patch0 -p0 +%patch1 -p0 + +%build +# build java stuff +(cd lpg-java-runtime && ant -f exportPlugin.xml) + +# build java compat stuff +(cd lpgdistribution && ant) + +# build native stuff +pushd lpg-generator-cpp/src + +# ARCH just tells us what tools to use, so this can be the same on all arches +# we build twice in order to bootstrap the grammar parser +make clean install ARCH=linux_x86 \ + LOCAL_CFLAGS="%{optflags} -Wno-strict-overflow" LOCAL_CXXFLAGS="%{optflags} -Wno-strict-overflow" +make bootstrap ARCH=linux_x86 +make clean install ARCH=linux_x86 \ + LOCAL_CFLAGS="%{optflags} -Wno-strict-overflow" LOCAL_CXXFLAGS="%{optflags} -Wno-strict-overflow" + +popd + +%install +rm -rf %{buildroot} + +install -pD -T lpg-java-runtime/%{pkg_name}runtime.jar \ + %{buildroot}%{_javadir}/%{pkg_name}runtime-%{_version}.jar +install -pD -T lpgdistribution/%{pkg_name}javaruntime.jar \ + %{buildroot}%{_javadir}/%{pkg_name}javaruntime-%{_compat_version}.jar +install -pD -T lpg-generator-cpp/bin/%{pkg_name}-linux_x86 \ + %{buildroot}%{_bindir}/%{pkg_name} + +# create unversioned symlinks to jars +(cd %{buildroot}%{_javadir} && for jar in *-%{_version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{_version}||g"`; done) +(cd %{buildroot}%{_javadir} && for jar in *-%{_compat_version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{_compat_version}||g"`; done) + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc lpg-generator-templates/docs/* +%{_bindir}/%{pkg_name} + +%files java +%defattr(-,root,root,-) +%doc "lpg-java-runtime/Eclipse Public License - Version 1_0.htm" +%{_javadir}/%{pkg_name}runtime* + +%files java-compat +%defattr(-,root,root,-) +%doc "lpg-java-runtime/Eclipse Public License - Version 1_0.htm" +%{_javadir}/%{pkg_name}javaruntime* + +%changelog +* Thu Feb 14 2013 Alexander Kurtakov 2.0.17-6 +- Add Wno-strict-overflow flag to remove unnecessary warning about + subtracting one from an index value. + +* Tue Nov 27 2012 Alexander Kurtakov 2.0.17-5 +- SCL enabled build. + +* Mon Nov 30 2009 Dennis Gregorovic - 2.0.17-4.1 +- Rebuilt for RHEL 6 + +* Sat Jul 25 2009 Fedora Release Engineering - 2.0.17-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 15 2009 Mat Booth 2.0.17-3 +- Add missing build dependency on ant-apache-regexp. +- Remove empty sub-package that was accidentally left. + +* Sun Jul 05 2009 Mat Booth 2.0.17-2 +- Add version constants so we get the correct version numbers on the java + libraries. + +* Sat Jul 04 2009 Mat Booth 2.0.17-1 +- Update to 2.0.17. +- Add OSGI manifest info to the runtime jar. +- Bundle generator docs with the generator in the main package. + +* Tue May 19 2009 Mat Booth 2.0.16-2 +- Better document source files/patches. + +* Tue Apr 28 2009 Mat Booth 2.0.16-1 +- Initial release of version 2.