tools/bc: update to 1.07
authorNick Hainke <vincent@systemli.org>
Mon, 29 Aug 2022 05:26:52 +0000 (07:26 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 7 Sep 2022 03:22:39 +0000 (04:22 +0100)
Update to latest version. Replace mirror with @GNU/bc.

Manually refresh:
- 001-no_doc.patch

Add patch found here:
https://github.com/fivepiece/gnu-bc/commit/26f275502dd28114e78bc098fed81acde1d86d62
as 002-fix-libmath.patch to fix compilation.

Add another patch found here:
https://github.com/archlinux/svntogit-packages/commit/55b26eda94e1a9ff726ac458fccab5f3f3ad2114
as 003-bc-fix-hang.patch to prevent a hang when building the kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
tools/bc/Makefile
tools/bc/patches/001-no_doc.patch
tools/bc/patches/002-fix-libmath.patch [new file with mode: 0644]
tools/bc/patches/003-bc-fix-hang.patch [new file with mode: 0644]

index dc021024cd90356dc147d16c365945bede535140..9e1b2ba33617586a1c63fc875fcd71400e7c7385 100644 (file)
@@ -7,14 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bc
-PKG_VERSION:=1.06.95
+PKG_VERSION:=1.07
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/bc \
-       https://gnualpha.uib.no/bc/ \
-       https://mirrors.fe.up.pt/pub/gnu-alpha/bc/ \
-       https://www.nic.funet.fi/pub/gnu/alpha/gnu/bc/
-PKG_HASH:=7ee4abbcfac03d8a6e1a8a3440558a3d239d6b858585063e745c760957725ecc
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/bc
+PKG_HASH:=55cf1fc33a728d7c3d386cc7b0cb556eb5bacf8e0cb5a3fcca7f109fc61205ad
 
 PKG_FIXUP := autoreconf
 PKG_CPE_ID:=cpe:/a:gnu:bc
index 50deee8c89d03ad9388c877b8da3bd061084014f..119f111f491169e2eab2cbef84bd5265c538794e 100644 (file)
@@ -1,6 +1,5 @@
-diff -urN bc-1.06.95/Makefile.am bc-1.06.95.new/Makefile.am
---- bc-1.06.95/Makefile.am     2005-05-27 01:05:41.000000000 +0100
-+++ bc-1.06.95.new/Makefile.am 2013-07-09 09:33:31.521490710 +0100
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -1,6 +1,6 @@
  ## Process this file with automake to produce Makefile.in
  
@@ -8,16 +7,15 @@ diff -urN bc-1.06.95/Makefile.am bc-1.06.95.new/Makefile.am
 +SUBDIRS = lib bc dc
  
  MAINTAINERCLEANFILES =  aclocal.m4 config.h.in configure Makefile.in \
-                       stamp-h $(distdir).tar.gz h/number.h depcomp missing
-diff -urN bc-1.06.95/Makefile.in bc-1.06.95.new/Makefile.in
---- bc-1.06.95/Makefile.in     2006-09-05 03:39:30.000000000 +0100
-+++ bc-1.06.95.new/Makefile.in 2013-07-09 09:33:28.565490767 +0100
-@@ -149,7 +149,7 @@
- sharedstatedir = @sharedstatedir@
- sysconfdir = @sysconfdir@
- target_alias = @target_alias@
+                       stamp-h $(distdir).tar.gz h/number.h depcomp missing \
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -288,7 +288,7 @@ target_alias = @target_alias@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
 -SUBDIRS = lib bc dc doc
 +SUBDIRS = lib bc dc
  MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
-                       stamp-h $(distdir).tar.gz h/number.h depcomp missing
+                       stamp-h $(distdir).tar.gz h/number.h depcomp missing \
+                       bc/libmath.h
diff --git a/tools/bc/patches/002-fix-libmath.patch b/tools/bc/patches/002-fix-libmath.patch
new file mode 100644 (file)
index 0000000..1a84395
--- /dev/null
@@ -0,0 +1,32 @@
+--- a/bc/fix-libmath_h
++++ b/bc/fix-libmath_h
+@@ -1,9 +1,9 @@
+-ed libmath.h <<EOS-EOS
+-1,1s/^/{"/
+-1,\$s/\$/",/
+-2,\$s/^/"/
+-\$,\$d
+-\$,\$s/,\$/,0}/
+-w
+-q
+-EOS-EOS
++#! /bin/bash
++sed -e '1   s/^/{"/' \
++    -e     's/$/",/' \
++    -e '2,$ s/^/"/'  \
++    -e   '$ d'       \
++    -i libmath.h
++
++sed -e '$ s/$/0}/' \
++    -i libmath.h
+--- a/configure
++++ b/configure
+@@ -5288,7 +5288,7 @@ case $bcle-$bcrl-$LEX in
+    ?-?-flex)
+       LEX="flex -I -8" ;;
+    ?-y-*)
+-      as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
++      : ;; # as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
+ esac
+ case $LEX-`uname -s` in
diff --git a/tools/bc/patches/003-bc-fix-hang.patch b/tools/bc/patches/003-bc-fix-hang.patch
new file mode 100644 (file)
index 0000000..ba29705
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/bc/execute.c
++++ b/bc/execute.c
+@@ -595,7 +595,7 @@ input_char (void)
+   if (in_ch == '.' || in_ch == '+' || in_ch == '-')
+     return (in_ch);
+   if (in_ch <= ' ')
+-    return (' ');
++    return (':');
+   
+   return (':');
+ }