2023-02-07 17:25:11 +00:00
|
|
|
Summary: public domain Berkeley LALR Yacc parser generator
|
|
|
|
|
|
|
|
%global AppVersion 2.0
|
|
|
|
%global AppPatched 20230201
|
|
|
|
|
|
|
|
%global AltProgram byacc2
|
|
|
|
%global UseProgram yacc
|
|
|
|
|
|
|
|
# $Id: byacc.spec,v 1.70 2023/02/02 00:12:06 tom Exp $
|
|
|
|
Name: byacc
|
|
|
|
Version: %{AppVersion}.%{AppPatched}
|
2012-05-03 09:57:52 +00:00
|
|
|
Release: 1
|
|
|
|
License: Public Domain, MIT
|
2023-02-07 17:25:11 +00:00
|
|
|
URL: https://invisible-island.net/%{name}/
|
|
|
|
Source0: https://invisible-mirror.net/archives/%{name}/%{name}-%{AppPatched}.tgz
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package provides a parser generator utility that reads a grammar
|
|
|
|
specification from a file and generates an LR(1) parser for it. The
|
|
|
|
parsers consist of a set of LALR(1) parsing tables and a driver
|
|
|
|
routine written in the C programming language. It has a public domain
|
|
|
|
license which includes the generated C.
|
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
%package -n byacc2
|
|
|
|
Summary: public domain Berkeley LALR Yacc parser generator with backtracking
|
2020-06-22 22:42:20 +00:00
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
%description -n byacc2
|
2020-06-22 22:42:20 +00:00
|
|
|
This package provides a parser generator utility that reads a grammar
|
|
|
|
specification from a file and generates an LR(1) parser for it. The
|
|
|
|
parsers consist of a set of LALR(1) parsing tables and a driver
|
|
|
|
routine written in the C programming language. It has a public domain
|
|
|
|
license which includes the generated C.
|
|
|
|
|
|
|
|
This package has the backtracking extension.
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
%prep
|
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
%global debug_package %{nil}
|
2020-06-22 22:42:20 +00:00
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
%setup -q -n %{name}-%{AppPatched}
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%build
|
2020-06-22 22:42:20 +00:00
|
|
|
%define my_srcdir ..
|
|
|
|
%define CFG_OPTS \\\
|
|
|
|
--verbose \\\
|
|
|
|
--disable-echo \\\
|
2023-02-07 17:25:11 +00:00
|
|
|
--enable-stdnoreturn \\\
|
2020-06-22 22:42:20 +00:00
|
|
|
--target %{_target_platform} \\\
|
|
|
|
--prefix=%{_prefix} \\\
|
|
|
|
--srcdir=%{my_srcdir} \\\
|
|
|
|
--bindir=%{_bindir} \\\
|
|
|
|
--libdir=%{_libdir} \\\
|
|
|
|
--mandir=%{_mandir}
|
|
|
|
|
|
|
|
%global _configure ../configure
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
mkdir BUILD-byacc
|
|
|
|
pushd BUILD-byacc
|
|
|
|
CONFIGURE_TOP=%{my_srcdir} \
|
|
|
|
%configure %{CFG_OPTS} \
|
|
|
|
--program-prefix=b \
|
|
|
|
make
|
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
mkdir BUILD-byacc2
|
|
|
|
pushd BUILD-byacc2
|
2020-06-22 22:42:20 +00:00
|
|
|
CONFIGURE_TOP=%{my_srcdir} \
|
|
|
|
%configure %{CFG_OPTS} \
|
|
|
|
--enable-btyacc \
|
2023-02-07 17:25:11 +00:00
|
|
|
--program-transform-name='s,\<yacc,byacc2,g' \
|
|
|
|
--with-max-table-size=123456 \
|
2012-05-03 09:57:52 +00:00
|
|
|
make
|
2020-06-22 22:42:20 +00:00
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
pushd BUILD-byacc
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
2023-02-07 17:25:11 +00:00
|
|
|
( cd $RPM_BUILD_ROOT%{_bindir} && ln -vs %{name} %{UseProgram} )
|
2020-06-22 22:42:20 +00:00
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
pushd BUILD-byacc2
|
2020-06-22 22:42:20 +00:00
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
popd
|
2012-05-03 09:57:52 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
2023-02-07 17:25:11 +00:00
|
|
|
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_bindir}/%{UseProgram}
|
|
|
|
%{_mandir}/man1/%{name}.*
|
|
|
|
|
|
|
|
%files -n byacc2
|
|
|
|
%doc ACKNOWLEDGEMENTS CHANGES NEW_FEATURES NOTES NO_WARRANTY README README.BTYACC
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/%{AltProgram}
|
2020-06-22 22:42:20 +00:00
|
|
|
%{_mandir}/man1/%{AltProgram}.*
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
%changelog
|
|
|
|
# each patch should add its ChangeLog entries here
|
|
|
|
|
2023-02-07 17:25:11 +00:00
|
|
|
* Sun Jan 09 2022 Thomas Dickey
|
|
|
|
- rpmlint
|
|
|
|
|
|
|
|
* Sat Jan 01 2022 Thomas Dickey
|
|
|
|
- rename btyacc package to byacc2 to co-exist with traditional btyacc
|
|
|
|
|
2020-06-22 22:42:20 +00:00
|
|
|
* Fri May 25 2018 Thomas Dickey
|
|
|
|
- add btyacc package
|
|
|
|
|
|
|
|
* Sun Jul 09 2017 Thomas Dickey
|
|
|
|
- use predefined "configure"
|
|
|
|
|
2012-05-03 09:57:52 +00:00
|
|
|
* Sun Jun 06 2010 Thomas Dickey
|
|
|
|
- initial version
|