This commit is contained in:
parent
016a25e94e
commit
3fb24f7d8d
125
antlr3.spec
125
antlr3.spec
@ -37,7 +37,6 @@ License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://www.antlr3.org/
|
||||
Source0: https://github.com/antlr/antlr3/archive/%{antlr_version}.tar.gz
|
||||
Source1: http://www.antlr3.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
|
||||
Patch0: 0001-java8-fix.patch
|
||||
Patch100: antlr3-generated_sources.patch
|
||||
# Generate OSGi metadata
|
||||
@ -75,9 +74,6 @@ BuildRequires: xz
|
||||
Name: antlr3
|
||||
BuildRequires: ant
|
||||
BuildRequires: antlr
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: mvn(org.antlr:antlr)
|
||||
BuildRequires: mvn(org.antlr:antlr3-maven-plugin)
|
||||
#!BuildRequires: stringtemplate4
|
||||
@ -104,61 +100,6 @@ that provides a framework for constructing recognizers,
|
||||
interpreters, compilers, and translators from grammatical
|
||||
descriptions containing actions in a variety of target languages.
|
||||
|
||||
%if %{without bootstrap}
|
||||
%package javascript
|
||||
Version: %{javascript_runtime_version}
|
||||
Release: 0
|
||||
Summary: Javascript run-time support for ANTLR-generated parsers
|
||||
Group: Development/Libraries/Java
|
||||
BuildArch: noarch
|
||||
|
||||
%description javascript
|
||||
Javascript run-time support for ANTLR-generated parsers
|
||||
|
||||
%package -n libantlr3c
|
||||
Version: %{c_runtime_version}
|
||||
Release: 0
|
||||
Summary: C run-time support for ANTLR-generated parsers
|
||||
Group: Development/Libraries/Java
|
||||
Provides: %{name}-C = %{version}-%{release}
|
||||
|
||||
%description -n libantlr3c
|
||||
C run-time support for ANTLR-generated parsers
|
||||
|
||||
%package C-devel
|
||||
Version: %{c_runtime_version}
|
||||
Release: 0
|
||||
Summary: Header files for the C bindings for ANTLR-generated parsers
|
||||
Group: Development/Libraries/Java
|
||||
Requires: libantlr3c = %{c_runtime_version}-%{release}
|
||||
|
||||
%description C-devel
|
||||
Header files for the C bindings for ANTLR-generated parsers
|
||||
|
||||
%package C-docs
|
||||
Version: %{c_runtime_version}
|
||||
Release: 0
|
||||
Summary: API documentation for the C run-time support for ANTLR-generated parsers
|
||||
Group: Development/Libraries/Java
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: graphviz
|
||||
Requires: libantlr3c = %{c_runtime_version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description C-docs
|
||||
This package contains doxygen documentation with instruction
|
||||
on how to use the C target in ANTLR and complete API description of the
|
||||
C run-time support for ANTLR-generated parsers.
|
||||
|
||||
%package C++-devel
|
||||
Summary: C++ runtime support for ANTLR-generated parsers
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description C++-devel
|
||||
C++ runtime support for ANTLR-generated parsers.
|
||||
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
||||
%if %{without boostrap}
|
||||
@ -173,7 +114,7 @@ BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n antlr3-%{antlr_version} -a 1
|
||||
%setup -q -n antlr3-%{antlr_version}
|
||||
%if %{with bootstrap}
|
||||
%patch100
|
||||
%pom_remove_plugin :antlr3-maven-plugin tool
|
||||
@ -232,22 +173,6 @@ sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resour
|
||||
|
||||
%if %{without runtime} && %{without bootstrap}
|
||||
|
||||
# Build the C runtime
|
||||
pushd runtime/C
|
||||
autoreconf -i
|
||||
%configure --disable-abiflags --enable-debuginfo \
|
||||
%if 0%{?__isa_bits} == 64
|
||||
--enable-64bit
|
||||
%else
|
||||
%{nil}
|
||||
%endif
|
||||
|
||||
sed -i "s#CFLAGS = .*#CFLAGS = %{optflags}#" Makefile
|
||||
make %{?_smp_mflags}
|
||||
doxygen -u # update doxygen configuration file
|
||||
doxygen # build doxygen documentation
|
||||
popd
|
||||
|
||||
# build ant task
|
||||
pushd antlr-ant/main/antlr3-task/
|
||||
export CLASSPATH=$(build-classpath ant)
|
||||
@ -279,33 +204,6 @@ cat > %{buildroot}%{_sysconfdir}/ant.d/ant-antlr3 << EOF
|
||||
ant/ant-antlr3 antlr3
|
||||
EOF
|
||||
|
||||
# install C runtime
|
||||
pushd runtime/C
|
||||
%make_install
|
||||
rm %{buildroot}%{_libdir}/libantlr3c.{a,la}
|
||||
pushd api/man/man3
|
||||
for file in `ls -1 * | grep -vi "^antlr3"`; do
|
||||
mv $file antlr3-$file
|
||||
done
|
||||
sed -i -e 's,^\.so man3/pANTLR3,.so man3/antlr3-pANTLR3,' `grep -rl 'man3/pANTLR3' .`
|
||||
gzip *
|
||||
popd
|
||||
mv api/man/man3 %{buildroot}%{_mandir}/
|
||||
rmdir api/man
|
||||
popd
|
||||
|
||||
# install javascript runtime
|
||||
pushd antlr-javascript-runtime-%{javascript_runtime_version}
|
||||
install -pm 644 *.js %{buildroot}%{_datadir}/antlr/
|
||||
popd
|
||||
|
||||
# install C++ runtime (header only)
|
||||
mkdir -p %{buildroot}/%{_includedir}/%{name}
|
||||
install -pm 644 runtime/Cpp/include/* %{buildroot}/%{_includedir}/
|
||||
|
||||
%fdupes -s runtime/C/api
|
||||
%fdupes -s %{buildroot}%{_mandir}
|
||||
|
||||
%endif
|
||||
|
||||
# install wrapper script
|
||||
@ -318,27 +216,6 @@ install -pm 644 runtime/Cpp/include/* %{buildroot}/%{_includedir}/
|
||||
%if %{without bootstrap}
|
||||
%{_javadir}/ant/ant-antlr3.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/ant-antlr3
|
||||
|
||||
%files -n libantlr3c
|
||||
%license tool/LICENSE.txt
|
||||
%{_libdir}/libantlr3c.so
|
||||
|
||||
%files C-devel
|
||||
%{_mandir}/man3/*
|
||||
%{_includedir}/*.h
|
||||
|
||||
%files C-docs
|
||||
%doc runtime/C/api
|
||||
|
||||
%files C++-devel
|
||||
%license tool/LICENSE.txt
|
||||
%{_includedir}/*.hpp
|
||||
%{_includedir}/*.inl
|
||||
|
||||
%files javascript
|
||||
%license tool/LICENSE.txt
|
||||
%{_datadir}/antlr/
|
||||
|
||||
%endif
|
||||
|
||||
%else
|
||||
|
Loading…
Reference in New Issue
Block a user