From c4040d3295a9be4fa5c0b23bf3f044b781f79685e4a0750e333ce20edd8f9be2 Mon Sep 17 00:00:00 2001 From: Petr Gajdos Date: Fri, 30 May 2025 07:09:47 +0000 Subject: [PATCH] GNU bc 1.08.2 OBS-URL: https://build.opensuse.org/package/show/Base:System/bc?expand=0&rev=26 --- .gitattributes | 23 +++ .gitignore | 1 + bc-1.07.1.tar.gz | 3 + bc-1.07.1.tar.gz.sig | Bin 0 -> 72 bytes bc-1.08.2.tar.gz | 3 + bc-1.08.2.tar.gz.sig | Bin 0 -> 310 bytes bc-dc-correct-return-value.patch | 16 ++ bc.changes | 256 +++++++++++++++++++++++++++++++ bc.keyring | 30 ++++ bc.spec | 81 ++++++++++ 10 files changed, 413 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bc-1.07.1.tar.gz create mode 100644 bc-1.07.1.tar.gz.sig create mode 100644 bc-1.08.2.tar.gz create mode 100644 bc-1.08.2.tar.gz.sig create mode 100644 bc-dc-correct-return-value.patch create mode 100644 bc.changes create mode 100644 bc.keyring create mode 100644 bc.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/bc-1.07.1.tar.gz b/bc-1.07.1.tar.gz new file mode 100644 index 0000000..a0bf323 --- /dev/null +++ b/bc-1.07.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a +size 419850 diff --git a/bc-1.07.1.tar.gz.sig b/bc-1.07.1.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..fcbaebd36f5783e9590fb08d73b59b6cbd9ed9605c6994b5c6146b5371d6394d GIT binary patch literal 72 zcmV-O0Jr~$Mg#y60ssaD0$A$lc>oFt5P`x^@h`WrOBA#KpL}(}&uGlk#Vu`S(}od= eqJtxe(g2@PdCDr%#v<;GGQ?cUG`|hT1iWJBBp&|& literal 0 HcmV?d00001 diff --git a/bc-1.08.2.tar.gz b/bc-1.08.2.tar.gz new file mode 100644 index 0000000..4bc98a4 --- /dev/null +++ b/bc-1.08.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86 +size 457557 diff --git a/bc-1.08.2.tar.gz.sig b/bc-1.08.2.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..1e387236992d4ab8669fd400dd1e9330cb69c1939257e7bce5431df18ed85ce7 GIT binary patch literal 310 zcmV-60m=S}0W$;u0SW*e79j*OTU6v_Ka*M|&oaHCh9`|eYB=cy0%$XSxc~|Y5TS-A zjY4WT=>xV10JwOx3ep&|tGK^?{TuC{&^uE{R$Kj41AK4r^U;g&4A(X IEh;6RKRd#gO#lD@ literal 0 HcmV?d00001 diff --git a/bc-dc-correct-return-value.patch b/bc-dc-correct-return-value.patch new file mode 100644 index 0000000..993ece3 --- /dev/null +++ b/bc-dc-correct-return-value.patch @@ -0,0 +1,16 @@ +Index: bc-1.07.1/dc/eval.c +=================================================================== +--- bc-1.07.1.orig/dc/eval.c 2017-04-07 17:22:07.000000000 +0200 ++++ bc-1.07.1/dc/eval.c 2019-03-13 11:24:50.561897120 +0100 +@@ -814,10 +814,10 @@ error_fail: + fprintf(stderr, "%s: ", progname); + perror("error reading input"); + return DC_FAIL; +-reset_and_exit_quit: + reset_and_exit_fail: + signal(SIGINT, sigint_default); + return DC_FAIL; ++reset_and_exit_quit: + reset_and_exit_success: + signal(SIGINT, sigint_default); + return DC_SUCCESS; diff --git a/bc.changes b/bc.changes new file mode 100644 index 0000000..9609608 --- /dev/null +++ b/bc.changes @@ -0,0 +1,256 @@ +------------------------------------------------------------------- +Thu May 29 17:53:58 UTC 2025 - Andreas Stieger + +- GNU bc 1.08.2 + * GCC 15 compatibility + * Plug a small memory leak in dc + * Fix a formatting botch in doc/bc.1 +- drop upstreamed bc-dc-correct-return-value.patch +- drop unneeded info macros + +------------------------------------------------------------------- +Thu Feb 22 10:08:49 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN + +------------------------------------------------------------------- +Thu Oct 15 14:20:20 UTC 2020 - pgajdos@suse.com + +- fix [bsc#1177579] -- wrong clamping of hexadecimal digits in dc +- deleted patches + - bc-1.06-dc_ibase.patch (upstreamed) + +------------------------------------------------------------------- +Wed Aug 28 11:33:46 CEST 2019 - kukuk@suse.de + +- Use %license instead of %doc [bsc#1082318] +- Cleanup %doc section + +------------------------------------------------------------------- +Wed Mar 13 10:32:04 UTC 2019 - pgajdos@suse.com + +- added patches + Correct return value after 'q' [bsc#1129038] + + bc-dc-correct-return-value.patch + +------------------------------------------------------------------- +Mon Apr 10 07:39:45 UTC 2017 - mpluskal@suse.com + +- Update to version 1.07.1: + * Fixed ibase extension causing problems for read() + * Fixed parallel make problem. + * Fixed dc "Q" comanmd bug. +- Changes for version 1.07: + * Added void functions. + * fixes bug in load_code introduced by mathlib string storage in 1.06. + * fix to get long options working. + * signal code clean-up. + * fixed a bug in the AVL tree routines. + * fixed math library to work properly when called with ibase not 10. + * fixed a symbol table bug when using more than 32 names. + * removed a double free. + * Added base 17 to 36 for ibase. + * Fixed some memory leaks. + * Various small tweaks and doc bug fixes. +- Drop no longer needed patches: + * bc-1.06.95-memleak.patch + * bc-1.06.95-matlib.patch + * bc-1.06.95-sigintmasking.patch +- Refresh bc-1.06-dc_ibase.patch +- Add gpg signature + +------------------------------------------------------------------- +Mon Mar 16 18:42:48 UTC 2015 - mpluskal@suse.com + +- Update url +- Correct info files scriplets and dependencies + +------------------------------------------------------------------- +Fri Nov 28 20:48:58 UTC 2014 - tchvatal@suse.com + +- Clean up with spec-cleaner +- Add ncurses-devel as it is inherited from readline +- Explicitely pass without-libedit if we decide to switch for + it at some point + +------------------------------------------------------------------- +Mon Sep 17 12:00:40 UTC 2012 - idonmez@suse.com + +- Add BuildRequires on makeinfo to fix Factory build + +------------------------------------------------------------------- +Thu May 31 12:56:27 UTC 2012 - sweet_f_a@gmx.de + +- update to upstream alpha 1.06.95 (2006-09-05), in use in other + major distros for quite a long time (Debian, Fedora, Ubuntu, ...) +- add patches from Fedora +- automake dependency removed + +------------------------------------------------------------------- +Wed Nov 30 09:29:51 UTC 2011 - coolo@suse.com + +- add automake as buildrequire to avoid implicit dependency + +------------------------------------------------------------------- +Thu Dec 27 14:14:55 CET 2007 - schwab@suse.de + +- Fix last change. +- Fix detection of empty opt_expression in the parser. + +------------------------------------------------------------------- +Tue Jun 12 14:33:31 CEST 2007 - pgajdos@suse.cz + +- repared acceptance of some long commandline options + [#282747] + +------------------------------------------------------------------- +Thu Mar 29 12:07:56 CEST 2007 - rguenther@suse.de + +- add flex BuildRequires + +------------------------------------------------------------------- +Wed Jan 25 21:29:59 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Sep 19 23:43:31 CEST 2005 - mmj@suse.de + +- fix strict aliasing issues + +------------------------------------------------------------------- +Thu Jul 7 15:01:52 CEST 2005 - mmj@suse.de + +- add missing decls + +------------------------------------------------------------------- +Mon Aug 30 19:13:35 CEST 2004 - postadal@suse.cz + +- fixed for new flex + +------------------------------------------------------------------- +Sun Jan 11 12:15:42 CET 2004 - adrian@suse.de + +- build as user + +------------------------------------------------------------------- +Tue Jul 22 15:39:38 CEST 2003 - schwab@suse.de + +- Fix unbalanced identifier tree. + +------------------------------------------------------------------- +Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de + +- fix install_info --delete call and move from preun to postun + +------------------------------------------------------------------- +Thu Feb 6 18:47:27 CET 2003 - kukuk@suse.de + +- Use install-info macros +- Fix bc.info (add dir entry) + +------------------------------------------------------------------- +Wed Nov 20 12:35:04 CET 2002 - postadal@suse.cz + +- returned the recompilation of libmath.h and fixed the problematic + part which caused segmentation fault on 64bit archs [#21697] + +------------------------------------------------------------------- +Mon Oct 07 09:40:06 CEST 2002 - postadal@suse.cz + +- removed recompilation of libmath.h [#20241] + +------------------------------------------------------------------- +Wed Aug 7 13:35:23 CEST 2002 - uli@suse.de + +- build with -O0 on x86-64 (bug #17231) + +------------------------------------------------------------------- +Thu Apr 12 12:24:19 CEST 2001 - cihlar@suse.cz + +- fixed to compile + +------------------------------------------------------------------- +Fri Feb 23 00:10:25 CET 2001 - ro@suse.de + +- added readline/readline-devel to neededforbuild (split from bash) + +------------------------------------------------------------------- +Tue Dec 5 12:53:50 CET 2000 - cihlar@suse.cz + +- added ed to neededforbuild +- fixed to recompile libmath.h + +------------------------------------------------------------------- +Mon Oct 30 12:33:28 CET 2000 - cihlar@suse.cz + +- update to version 1.6 +- added BuildRoot +- bzipped sources + +------------------------------------------------------------------- +Tue Sep 26 12:08:39 CEST 2000 - schwab@suse.de + +- Fix overflow bug in bc scanner. + +------------------------------------------------------------------- +Fri Mar 10 11:21:55 CET 2000 - kasal@suse.de + +- specfile cleanup + +------------------------------------------------------------------- +Fri Feb 25 11:42:56 CET 2000 - kukuk@suse.de + +- Use _infodir/_mandir, add group tag + +------------------------------------------------------------------- +Thu Nov 25 12:18:41 MET 1999 - kukuk@suse.de + +- Remove termcap from needforbuild + +------------------------------------------------------------------- +Fri Nov 12 20:10:19 MET 1999 - kukuk@suse.de + +- Fix Include paths + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Fri Aug 27 16:20:57 MEST 1999 - fehr@suse.de + +- chaged to new version 1.05a + +------------------------------------------------------------------- +Wed Jul 21 17:42:00 CEST 1999 - garloff@suse.de + +- added -d to YFLAGS to prevent problem when bison changes + +------------------------------------------------------------------- +Tue Sep 22 10:43:51 MEST 1998 - ro@suse.de + +- dont try to include posix_lim2.h for glibc + +---------------------------------------------------------------------------- +Fri Dec 12 18:06:42 MET 1997 - florian@suse.de + + +- add many bug-fixes from gnu.utils.bug + + +---------------------------------------------------------------------------- +Fri Oct 10 11:41:47 MEST 1997 - florian@suse.de + + +- update to 1.04 and fix rpm spec file + + +---------------------------------------------------------------------------- +Sat Nov 2 17:35:11 CET 1996 - florian@suse.de + + +- add some bug-fixes + diff --git a/bc.keyring b/bc.keyring new file mode 100644 index 0000000..f6d2045 --- /dev/null +++ b/bc.keyring @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBEum60cBCADIZ/am0d96/2Is86VRUkNi4DReLYDzQqpuI1cCtCHKbBel6uYL +ERsTJUxgqEtYAzjQOaOOr8k7X/U8NzmmjAk/GR/coHFbGLVUI3O/TWZZ4u3bZLpC +4lhe303PZZDHMGGcUEmzhU9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+AQABiQE8BBgBCgAmAhsMFiEEMltU5GU/k1olzzK9oYYnjUJqOOkFAmclQkMFCSEh +8XwACgkQoYYnjUJqOOk55wf/W3p31v5zZtRyalRohfxUn9rrbucye38W+LzZGGoz +BU4CCcZhwtumkFgd3bB3t50e26VDBB3D3cVPyLDLU182eibKbgv4/6bjk09l1PRl +UhTHpWTqiz+lkmMEMsSFXWJjXssmAo5XOL4OxX/bgHUK5NgvaRg7WL1CVuLAL91s +VTasLP1XoOpZ85ec5YmzNciCU41XfGSIrkG+PbE7MJmjlUT0w4/Q59/5CiIv/XoM +UAiiIDozgvzDinVUBP8+Kl5QexEe3E3dHSNPRc4xlPsx5KTOCWJHEe00XgZgMuTZ +bzVD5uvJm95WssY37wZ2bt58iufB9sBsw2NFPr3eQIo12A== +=L3fP +-----END PGP PUBLIC KEY BLOCK----- diff --git a/bc.spec b/bc.spec new file mode 100644 index 0000000..a7a94ca --- /dev/null +++ b/bc.spec @@ -0,0 +1,81 @@ +# +# spec file for package bc +# +# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2025 Andreas Stieger +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: bc +Version: 1.08.2 +Release: 0 +Summary: GNU Command Line Calculator +License: GFDL-1.2-or-later AND GPL-3.0-or-later +Group: Productivity/Scientific/Math +URL: https://www.gnu.org/software/bc/ +Source0: https://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz +Source1: https://ftp.gnu.org/gnu/bc/bc-%{version}.tar.gz.sig +# from https://src.fedoraproject.org/rpms/bc/blob/rawhide/f/kevin_pizzini.asc +Source2: %{name}.keyring +BuildRequires: bison +BuildRequires: ed +BuildRequires: flex +BuildRequires: makeinfo +BuildRequires: pkgconfig +BuildRequires: pkgconfig(readline) + +%description +bc is an interpreter that supports numbers of arbitrary precision and +the interactive execution of statements. The syntax has some +similarities to the C programming language. A standard math library is +available through command line options. When used, the math library is +read in before any other input files. bc then reads in all other files +from the command line, evaluating their contents. Then bc reads from +standard input (usually the keyboard). + +The dc program is also included. dc is a calculator that supports +reverse-polish notation and allows unlimited precision arithmetic. +Macros can also be defined. Normally, dc reads from standard input but +can also read in files specified on the command line. A calculator with +reverse-polish notation saves numbers to a stack. Arguments to +mathematical operations (operands) are "pushed" onto the stack until +the next operator is read in, which "pops" its arguments off the stack +and "pushes" its results back onto the stack. + +%prep +%autosetup -p1 + +%build +%configure \ + --with-readline \ + --without-libedit +%make_build + +%install +%make_install + +%check +%make_build check + +%files +%license COPYING +%doc NEWS README FAQ +%{_bindir}/bc +%{_bindir}/dc +%{_infodir}/bc.info%{?ext_info} +%{_infodir}/dc.info%{?ext_info} +%{_mandir}/man1/bc.1%{?ext_man} +%{_mandir}/man1/dc.1%{?ext_man} + +%changelog -- 2.51.1