diff --git a/README.md b/README.md index 5fbe68b..be5276e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # bc +Bc is an arbitrary precision numeric processing language. +Syntax is similar to C, but differs in many substantial areas. +It supports interactive execution of statements. +Bc is a utility included in the POSIX P1003.2/D11 draft standard. + +This version does not use the historical method of having bc be a calculator for the dc calculator (the POSIX document doesn't specify how bc must be implemented). +This version has a single executable that both compiles the language and runs the resulting 'byte code.' The byte code is not the dc language. + diff --git a/bc-1.06-configure_flex.patch b/bc-1.06-configure_flex.patch new file mode 100644 index 0000000..c79e903 --- /dev/null +++ b/bc-1.06-configure_flex.patch @@ -0,0 +1,11 @@ +--- bc-1.06/configure.orig 2007-12-04 10:29:01.000000000 +0100 ++++ bc-1.06/configure 2007-12-04 10:29:42.000000000 +0100 +@@ -2245,7 +2245,7 @@ + + + if test "$LEX" = "flex" ; then +- LEX="flex -I8" ++ LEX="flex -I -8" + else + if test "$bcrl" = "y" ; then + echo "configure: warning: readline works only with flex." 1>&2 diff --git a/bc-1.06-info_direntry.patch b/bc-1.06-info_direntry.patch new file mode 100644 index 0000000..6acf9fd --- /dev/null +++ b/bc-1.06-info_direntry.patch @@ -0,0 +1,13 @@ +--- bc-1.06/doc/bc.texi.orig 2006-06-20 10:50:26.000000000 +0200 ++++ bc-1.06/doc/bc.texi 2006-06-20 10:54:47.000000000 +0200 +@@ -13,6 +13,10 @@ + @c \overfullrule=0pt + @c end tex + ++@direntry ++* bc: (bc). Arbritrary precision calculator language. ++@end direntry ++ + @titlepage + @title @command{bc} + @subtitle an arbitrary precision calculator language diff --git a/bc-1.06-info_exp_bessel.patch b/bc-1.06-info_exp_bessel.patch new file mode 100644 index 0000000..e3e778d --- /dev/null +++ b/bc-1.06-info_exp_bessel.patch @@ -0,0 +1,15 @@ +--- bc-1.06/doc/bc.info.info_exp_bessel 2003-08-12 14:57:45.000000000 +0200 ++++ bc-1.06/doc/bc.info 2003-08-12 14:57:51.000000000 +0200 +@@ -664,10 +664,10 @@ + `l (X)' + The natural logarithm of X. + +-`E (X)' ++`e (X)' + The exponential function of raising E to the value X. + +-`J (N,X)' ++`j (N,X)' + The bessel function of integer order N of X. + +  diff --git a/bc-1.06-readline42.patch b/bc-1.06-readline42.patch new file mode 100644 index 0000000..37dfaf5 --- /dev/null +++ b/bc-1.06-readline42.patch @@ -0,0 +1,10 @@ +--- bc-1.06/bc/scan.l.sux Fri May 11 14:27:20 2001 ++++ bc-1.06/bc/scan.l Fri May 11 14:27:32 2001 +@@ -143,7 +143,6 @@ + + /* Definitions for readline access. */ + extern FILE *rl_instream; +-_PROTOTYPE(char *readline, (char *)); + + /* rl_input puts upto MAX characters into BUF with the number put in + BUF placed in *RESULT. If the yy input file is the same as diff --git a/bc-1.06-string.patch b/bc-1.06-string.patch new file mode 100644 index 0000000..2ec471b --- /dev/null +++ b/bc-1.06-string.patch @@ -0,0 +1,10 @@ +--- bc-1.06/lib/number.c.string 2007-07-26 15:01:34.000000000 +0200 ++++ bc-1.06/lib/number.c 2007-07-26 15:01:41.000000000 +0200 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include /* Prototypes needed for external utility routines. */ + + #define bc_rt_warn rt_warn diff --git a/bc.spec b/bc.spec new file mode 100644 index 0000000..ced0623 --- /dev/null +++ b/bc.spec @@ -0,0 +1,97 @@ +Name: bc +Version: 1.06.95 +Release: 1mamba +Summary: GNU interactive algebraic language +Group: Applications/Mathematics +Vendor: openmamba +Distribution: openmamba +Packager: Aleph0 +URL: http://www.gnu.org/directory/GNU/bc.html +Source: http://alpha.gnu.org/gnu/bc/bc-%{version}.tar.bz2 +Patch0: %{name}-1.06-info_direntry.patch +Patch1: %{name}-1.06-configure_flex.patch +Patch2: %{name}-1.06-info_exp_bessel.patch +Patch3: %{name}-1.06-string.patch +Patch4: %{name}-1.06-readline42.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libncurses-devel +BuildRequires: libreadline-devel +## AUTOBUILDREQ-END +BuildRequires: flex +BuildRequires: bison +BuildRequires: texinfo +Requires(post): %{__install_info} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Bc is an arbitrary precision numeric processing language. +Syntax is similar to C, but differs in many substantial areas. +It supports interactive execution of statements. +Bc is a utility included in the POSIX P1003.2/D11 draft standard. + +This version does not use the historical method of having bc be a calculator for the dc calculator (the POSIX document doesn't specify how bc must be implemented). +This version has a single executable that both compiles the language and runs the resulting 'byte code.' The byte code is not the dc language. + +%prep +%setup -q +%patch0 -p1 +#%patch1 -p1 +#%patch2 -p1 +#%patch3 -p1 +#%patch4 -p1 + +%build +%configure --with-readline +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeoldinstall + +%post +%install_info %{name}.info +%install_info dc.info +exit 0 + +%preun +%uninstall_info %{name}.info +%uninstall_info dc.info +exit 0 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%{_bindir}/%{name} +%{_bindir}/dc +%{_infodir}/%{name}.* +%{_infodir}/dc.* +%{_mandir}/man1/%{name}.* +%{_mandir}/man1/dc.* +%doc AUTHORS COPYING COPYING.LIB +# FAQ NEWS README Examples/* Changelog + +%changelog +* Sat Feb 01 2014 Silvan Calarco 1.06.95-1mamba +- update to 1.06.95 + +* Sat Mar 23 2013 Silvan Calarco 1.06-5mamba +- rebuilt with libreadline 6.2 + +* Tue Dec 04 2007 Aleph0 1.06-4mamba +- new package mantainer +- fixed compilation warnings +- fixed some documentation bugs about exp and bessel functions +- rebuilt with readline support + +* Tue Jun 20 2006 Stefano Cotta Ramusino 1.06-3qilnx +- added info file patch + +* Wed Sep 28 2005 Davide Madrisan 1.06-2qilnx +- install/uninstall info files + +* Fri Feb 06 2004 Davide Madrisan +- first build