Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/bc-gh math/bc-gh: Update to 2.7.2



details:   https://anonhg.NetBSD.org/pkgsrc/rev/726cb42a7a24
branches:  trunk
changeset: 431873:726cb42a7a24
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sat May 16 22:54:21 2020 +0000

description:
math/bc-gh: Update to 2.7.2

Upstream NEWS highlights:
(translations and bugfixes omitted)


## 2.7.2

This is a production release with one major bug fix.

The `length()` built-in function can take either a number or an array. If it
takes an array, it returns the length of the array. Arrays can be passed by
reference. The bug is that the `length()` function would not properly
dereference arrays that were references. This is a bug that affects all users.

**ALL USERS SHOULD UPDATE `bc`**.

## 2.7.0

There is only one new feature: **`bc` now has a built-in pseudo-random number
generator** (PRNG).

The PRNG is seeded, making it useful for applications where
`/dev/urandom` does not work because output needs to be reproducible. However,
it also uses `/dev/urandom` to seed itself by default, so it will start with a
good seed by default.

On top of that, four functions were added to `bc`'s [extended math library][16]
to make using the PRNG easier:

* `frand(p)`: Generates a number between `[0,1)` to `p` decimal places.
* `ifrand(i, p)`: Generates an integer with bound `i` and adds it to `frand(p)`.
* `srand(x)`: Randomizes the sign of `x`. In other words, it flips the sign of
  `x` with probability `0.5`.
* `brand()`: Returns a random boolean value (either `0` or `1`).

## 2.4.0

* The `bc` `&&` and `||` operators were made available to `dc` through the `M`
  and `m` commands, respectively.
* `dc` macros were changed to be tail call-optimized.

The last item, tail call optimization, means that if the last thing in a macro
is a call to another macro, then the old macro is popped before executing the
new macro. This change was made to stop `dc` from consuming more and more memory
as macros are executed in a loop.

The `q` and `Q` commands still respect the "hidden" macros by way of recording
how many macros were removed by tail call optimization.

diffstat:

 math/bc-gh/Makefile |   4 ++--
 math/bc-gh/PLIST    |  26 +++++++++++++++++++++++++-
 math/bc-gh/distinfo |  10 +++++-----
 3 files changed, 32 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r 21a51a589f48 -r 726cb42a7a24 math/bc-gh/Makefile
--- a/math/bc-gh/Makefile       Sat May 16 22:32:00 2020 +0000
+++ b/math/bc-gh/Makefile       Sat May 16 22:54:21 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2019/11/23 17:26:01 gdt Exp $
+# $NetBSD: Makefile,v 1.4 2020/05/16 22:54:21 gdt Exp $
 
-VERSION=       2.3.1
+VERSION=       2.7.2
 DISTNAME=      bc-${VERSION}
 PKGNAME=       bc-gh-${VERSION}
 CATEGORIES=    math
diff -r 21a51a589f48 -r 726cb42a7a24 math/bc-gh/PLIST
--- a/math/bc-gh/PLIST  Sat May 16 22:32:00 2020 +0000
+++ b/math/bc-gh/PLIST  Sat May 16 22:54:21 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2019/06/17 00:35:33 gdt Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/05/16 22:54:21 gdt Exp $
 bin/bc-gh
 bin/dc-gh
 man/man1/bc-gh.1
@@ -48,3 +48,27 @@
 share/locale/fr_FR.ISO8859-1/bc-gh
 share/locale/fr_FR.ISO8859-15/bc-gh
 share/locale/fr_FR.UTF-8/bc-gh
+share/locale/ja_JP.UTF-8/bc-gh
+share/locale/ja_JP.eucJP/bc-gh
+share/locale/nl_BE.ISO8859-1/bc-gh
+share/locale/nl_BE.ISO8859-15/bc-gh
+share/locale/nl_NL.ISO8859-1/bc-gh
+share/locale/nl_NL.ISO8859-15/bc-gh
+share/locale/nl_NL.UTF-8/bc-gh
+share/locale/pl_PL.ISO8859-2/bc-gh
+share/locale/pl_PL.UTF-8/bc-gh
+share/locale/pt_BR.ISO8859-1/bc-gh
+share/locale/pt_BR.ISO8859-15/bc-gh
+share/locale/pt_BR.UTF-8/bc-gh
+share/locale/pt_PT.ISO8859-1/bc-gh
+share/locale/pt_PT.ISO8859-15/bc-gh
+share/locale/pt_PT.UTF-8/bc-gh
+share/locale/ru_RU.CP1251/bc-gh
+share/locale/ru_RU.CP866/bc-gh
+share/locale/ru_RU.ISO8859-5/bc-gh
+share/locale/ru_RU.KOI8-R/bc-gh
+share/locale/ru_RU.UTF-8/bc-gh
+share/locale/zh_CN.GB18030/bc-gh
+share/locale/zh_CN.GB2312/bc-gh
+share/locale/zh_CN.UTF-8/bc-gh
+share/locale/zh_CN.eucCN/bc-gh
diff -r 21a51a589f48 -r 726cb42a7a24 math/bc-gh/distinfo
--- a/math/bc-gh/distinfo       Sat May 16 22:32:00 2020 +0000
+++ b/math/bc-gh/distinfo       Sat May 16 22:54:21 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2019/11/23 17:26:01 gdt Exp $
+$NetBSD: distinfo,v 1.4 2020/05/16 22:54:21 gdt Exp $
 
-SHA1 (bc-2.3.1.tar.xz) = c76d7e7509663e249cae9674981a91e868c4e8cc
-RMD160 (bc-2.3.1.tar.xz) = a1418b974933a70281315369cc352be626df8d78
-SHA512 (bc-2.3.1.tar.xz) = a704356dfba75d94a3db9ab30ccd4b5cea1ccd8866c20650026148f61e0d799760d04bb6fefec46b3ce93a4a575c81f0668064af498cf7b581edcb82d00eb22e
-Size (bc-2.3.1.tar.xz) = 161780 bytes
+SHA1 (bc-2.7.2.tar.xz) = 2332db5d8839202cc2b43e2bebe2654efc093bf1
+RMD160 (bc-2.7.2.tar.xz) = f7f6e4ca0f3befc7a064cc1d308857047af7cc15
+SHA512 (bc-2.7.2.tar.xz) = c2014b16165bf5f8bdadf42bb60ea967a060753c17e13a7c3569d16d218bb3fb644e6a46950e9e7b3aa5a9f6bee4da9b158694909a0ab1fe390b7bb4dc20b303
+Size (bc-2.7.2.tar.xz) = 189020 bytes



Home | Main Index | Thread Index | Old Index