bc: Update to 1.08.2 (#24387)

This commit is contained in:
Suyun 2025-05-29 14:30:31 +08:00 committed by GitHub
parent 9c3ca6aaec
commit fd0d38440c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 20 deletions

View File

@ -1,12 +0,0 @@
diff -Naur bc-1.07.1/bc/Makefile.am bc-1.07.1/bc/Makefile.am
--- bc-1.07.1/bc/Makefile.am 2017-04-07 15:09:29.000000000 -0500
+++ bc-1.07.1/bc/Makefile.am 2022-01-10 20:23:24.853298247 -0600
@@ -36,7 +36,7 @@
$(MAKE) global.o
$(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
- $(srcdir)/fix-libmath_h
+ sh $(srcdir)/fix-libmath_h
rm -f ./fbc ./global.o
sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \

View File

@ -0,0 +1,14 @@
--- bc-1.08.2-orig/bc/main.c 2025-05-27 16:23:59.399634800 +0800
+++ bc-1.08.2/bc/main.c 2025-05-27 16:30:56.093776400 +0800
@@ -91,7 +91,11 @@
int long_index;
file_node *temp;
+#ifdef _WIN32
+ srand(time(NULL));
+#else
srandom(time(NULL));
+#endif
/* Force getopt to initialize. Depends on GNU getopt. */
optind = 0;

View File

@ -4,7 +4,7 @@
_realname=bc
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.07.1
pkgver=1.08.2
pkgrel=1
pkgdesc='bc is an arbitrary precision numeric processing language (mingw-w64)'
arch=('any')
@ -16,20 +16,20 @@ msys2_references=(
license=('GPL3')
makedepends=("${MINGW_PACKAGE_PREFIX}-autotools" "${MINGW_PACKAGE_PREFIX}-cc" "ed")
depends=("${MINGW_PACKAGE_PREFIX}-readline")
source=("https://ftp.gnu.org/gnu/${_realname}/${_realname}-${pkgver}.tar.gz"
source=("https://mirrors.kernel.org/gnu/${_realname}/${_realname}-${pkgver}.tar.gz"
"0001-use-rand-on-windows.patch"
"0002-fix-fix-libmath_h.patch"
"0003-use-binary-io.patch")
sha256sums=('62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a'
"0003-use-binary-io.patch"
"0004-use-srand-on-windows.patch")
sha256sums=('ae470fec429775653e042015edc928d07c8c3b2fc59765172a330d3d87785f86'
'd0203c9cbe9764ddb4ef50f5c2bda6f0b0483d01d2c5e8722be5826c28300f71'
'c1c638e5387dd81ac210ed1bc68e4e09e23a18b0fd992ff03dbe5e1390ff3706'
'1c796bb531b1d516e0170d4bd88ff8c6869d41132736eab27da4fcc9e6fdfad2')
'1c796bb531b1d516e0170d4bd88ff8c6869d41132736eab27da4fcc9e6fdfad2'
'353a15cd2ce2bf4e9c5c37af7cc0d2222e56d05347fd534baa2d2f9073cfe0cd')
prepare() {
cd $srcdir/${_realname}-${pkgver}
patch -p1 -i "${srcdir}"/0001-use-rand-on-windows.patch
patch -p1 -i "${srcdir}"/0002-fix-fix-libmath_h.patch
patch -p1 -i "${srcdir}"/0003-use-binary-io.patch
patch -p1 -i "${srcdir}"/0004-use-srand-on-windows.patch
autoreconf -fiv
}