[yocto] [PATCH meta-gplv2] bc: add

Ross Burton ross.burton at intel.com
Fri Jul 20 02:57:26 PDT 2018


Add 1.06 from oe-core as bc 1.07 is GPLv3.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 recipes-extended/bc/bc_1.06.bb                    | 26 +++++++++++++++++++++
 recipes-extended/bc/files/fix-segment-fault.patch | 28 +++++++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 recipes-extended/bc/bc_1.06.bb
 create mode 100644 recipes-extended/bc/files/fix-segment-fault.patch

diff --git a/recipes-extended/bc/bc_1.06.bb b/recipes-extended/bc/bc_1.06.bb
new file mode 100644
index 0000000..d8c8a86
--- /dev/null
+++ b/recipes-extended/bc/bc_1.06.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Arbitrary precision calculator language"
+HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
+
+LICENSE = "GPLv2+ & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
+                    file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
+                    file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
+                    file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
+
+SECTION = "base"
+DEPENDS = "flex"
+PR = "r3"
+
+SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
+           file://fix-segment-fault.patch "
+
+SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
+SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
+
+inherit autotools texinfo update-alternatives
+
+ALTERNATIVE_${PN} = "dc"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-extended/bc/files/fix-segment-fault.patch b/recipes-extended/bc/files/fix-segment-fault.patch
new file mode 100644
index 0000000..20c0da2
--- /dev/null
+++ b/recipes-extended/bc/files/fix-segment-fault.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
+This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
+
+Signed-off-by: Kai Kang <kai.kang at windriver.com>
+
+--- bc-1.06/lib/number.c.orig	2003-09-26 21:14:02.000000000 +0000
++++ bc-1.06/lib/number.c	2003-09-26 21:14:26.000000000 +0000
+@@ -34,6 +34,7 @@
+ #include <number.h>
+ #include <assert.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <ctype.h>/* Prototypes needed for external utility routines. */
+ 
+ #define bc_rt_warn rt_warn
+--- bc-1.06/bc/load.c.orig	2003-09-26 21:14:14.000000000 +0000
++++ bc-1.06/bc/load.c	2003-09-26 21:14:26.000000000 +0000
+@@ -156,7 +156,7 @@
+   long  label_no;
+   long  vaf_name;	/* variable, array or function number. */
+   long  func;
+-  program_counter save_adr;
++  static program_counter save_adr;
+ 
+   /* Initialize. */
+   str = code;
-- 
2.11.0



More information about the yocto mailing list