summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bc
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-17 17:38:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-24 11:52:26 +0100
commite3af86e98d62d09507011618ce254b12f5466750 (patch)
treea898fdcaed57a0b2f83415a9ae2b95e3caeed2ff /meta/recipes-extended/bc
parent1d8c7fa36981dcecda45a417b0eb3943e049f4e0 (diff)
downloadpoky-e3af86e98d62d09507011618ce254b12f5466750.tar.gz
bc: upgrade to 1.07.1
Relicensed to just GPLv3+, update LICENSE and checksums. The build dependency for flex should be flex-native. libmath.h is missing from the tarball (it was present in 1.06) and the generation rules are not cross-friendly, so delete the rules and copy in a pre-generated libmath.h. Remove fix-segment-fault.patch as the fixes are now upstream. Add PACKAGECONFIG for readline and libedit, defaulting to readline. (From OE-Core rev: 9862849ba883c110e4d2c57c39ab2c58e9b2d216) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/bc')
-rw-r--r--meta/recipes-extended/bc/bc/libmath.h46
-rw-r--r--meta/recipes-extended/bc/bc/no-gen-libmath.patch24
-rw-r--r--meta/recipes-extended/bc/bc_1.06.bb26
-rw-r--r--meta/recipes-extended/bc/bc_1.07.1.bb33
-rw-r--r--meta/recipes-extended/bc/files/fix-segment-fault.patch28
5 files changed, 103 insertions, 54 deletions
diff --git a/meta/recipes-extended/bc/bc/libmath.h b/meta/recipes-extended/bc/bc/libmath.h
new file mode 100644
index 0000000000..63e1acb9ef
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/libmath.h
@@ -0,0 +1,46 @@
1{"@iK20:s2:p@r",
2"@iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:",
3"s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+",
4"K.44:l5:*+s13:pl5:cS1+s2:pN3:l5:1>Z4:l10:1+s10:pl5:K2:/s5:pl2:",
5"1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:",
6"l11:i11:pJ6:N7:l6:l5:*s6:l8:l11:*s8:/s9:pl9:0=Z9:l10:0>Z10:N11:",
7"l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R",
8"N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r",
9"@iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:",
10"s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:",
11"pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:",
12"K.5:{Z6:l10:K2:*s10:pl5:cRs5:pJ5:N6:l5:1-l5:1+/s13:s14:pl13:l13:",
13"*s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:",
14"/s9:pl9:0=Z11:l10:l14:*s14:pl15:s2:pl14:1/RN11:l14:l9:+s14:pJ10:N7:",
15"0R]@r",
16"@iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:",
17"s14:pl7:s0:pl14:RN1:l2:s15:pK1.1:l15:*K2:+s2:p1C4,0:s14:pl5:0",
18"<Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:",
19"*-s5:pl13:K2:%Z3:l5:ns5:pN3:l15:K2:+s2:pl5:s9:s14:pl5:nl5:*s16:",
20"pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*",
21"s9:pl9:0=Z8:l15:s2:pl12:Z9:l14:n1/RN9:l14:1/RN8:l14:l9:+s14:p",
22"J7:N4:0R]@r",
23"@iF5,5.7,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C5,0:s14:pl7:s0:pl14:",
24"RN1:l2:s15:pl2:K1.2:*s2:pl5:1C4,0:K2:*+C3,0:s14:pl15:s2:pl14:",
25"1/R0R]@r",
26"@iF4,5.6,7,9,10,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:",
27"C4,0:s14:pl7:s0:pl14:RN1:1s12:pl5:0<Z2:1ns12:pl5:ns5:pN2:l5:1",
28"=Z3:l2:K25:{Z4:K.7853981633974483096156608:l12:/RN4:l2:K40:{Z5:",
29"K.7853981633974483096156608458198757210492:l12:/RN5:l2:K60:{Z6:",
30"K.785398163397448309615660845819875721049292349843776455243736",
31":l12:/RN6:N3:l5:K.2:=Z7:l2:K25:{Z8:K.1973955598498807583700497",
32":l12:/RN8:l2:K40:{Z9:K.1973955598498807583700497651947902934475",
33":l12:/RN9:l2:K60:{Z10:K.197395559849880758370049765194790293447585103787852101517688",
34":l12:/RN10:N7:l2:s15:pl5:K.2:>Z11:l15:K5:+s2:pK.2:C4,0:s6:pN11:",
35"l15:K3:+s2:pN12:l5:K.2:>Z13:l10:1+s10:pl5:K.2:-1l5:K.2:*+/s5:",
36"pJ12:N13:l5:s13:s14:pl5:nl5:*s16:pK3:s11:pN15:1B16:J14:N17:l11:",
37"K2:+s11:pJ15:N16:l13:l16:*s13:l11:/s9:pl9:0=Z18:l15:s2:pl10:l6:",
38"*l14:+l12:/RN18:l14:l9:+s14:pJ17:N14:0R]@r",
39"@iF6,13,5.6,7,8,9,10,11,12,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl13:",
40"l5:C6,00:s14:pl7:s0:pl14:RN1:l2:s15:p0s2:pl13:1/s13:pl13:0<Z2:",
41"l13:ns13:pl13:K2:%1=Z3:1s12:pN3:N2:1s10:pK2:s11:pN5:l11:l13:{",
42"B6:J4:N7:l11:i11:pJ5:N6:l10:l11:*s10:pJ7:N4:K1.5:l15:*s2:pl5:",
43"l13:^K2:l13:^/l10:/s10:p1s9:s14:pl5:nl5:*K4:/s16:pK1.5:l15:*l10:",
44"cL+l10:cS-s2:p1s11:pN9:1B10:J8:N11:l11:i11:pJ9:N10:l9:l16:*l11:",
45"/l13:l11:+/s9:pl9:0=Z12:l15:s2:pl12:Z13:l10:nl14:*1/RN13:l10:",
46"l14:*1/RN12:l14:l9:+s14:pJ11:N8:0R]@r",0}
diff --git a/meta/recipes-extended/bc/bc/no-gen-libmath.patch b/meta/recipes-extended/bc/bc/no-gen-libmath.patch
new file mode 100644
index 0000000000..c4cce58759
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/no-gen-libmath.patch
@@ -0,0 +1,24 @@
1These rules are not cross-friendly so delete them and we'll generate the file offline.
2
3Upstream-Status: Inappropriate
4Signed-off-by: Ross Burton <ross.burton@intel.com>
5
6diff --git a/bc/Makefile.am b/bc/Makefile.am
7index d9d412e..f244241 100644
8--- a/bc/Makefile.am
9+++ b/bc/Makefile.am
10@@ -31,14 +31,6 @@ global.o: libmath.h
11
12 fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o
13
14-libmath.h: libmath.b $(fbcOBJ) $(LIBBC)
15- echo '{0}' > libmath.h
16- $(MAKE) global.o
17- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS)
18- ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h
19- $(srcdir)/fix-libmath_h
20- rm -f ./fbc ./global.o
21-
22 sbcOBJ = main.o sbc.o scan.o execute.o global.o load.o storage.o util.o \
23 warranty.o
24 sbc.o: sbc.c
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb
deleted file mode 100644
index d8c8a860f8..0000000000
--- a/meta/recipes-extended/bc/bc_1.06.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1SUMMARY = "Arbitrary precision calculator language"
2HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
3
4LICENSE = "GPLv2+ & LGPLv2.1"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://COPYING.LIB;md5=d8045f3b8f929c1cb29a1e3fd737b499 \
7 file://bc/bcdefs.h;endline=31;md5=46dffdaf10a99728dd8ce358e45d46d8 \
8 file://dc/dc.h;endline=25;md5=2f9c558cdd80e31b4d904e48c2374328 \
9 file://lib/number.c;endline=31;md5=99434a0898abca7784acfd36b8191199"
10
11SECTION = "base"
12DEPENDS = "flex"
13PR = "r3"
14
15SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \
16 file://fix-segment-fault.patch "
17
18SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117"
19SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33"
20
21inherit autotools texinfo update-alternatives
22
23ALTERNATIVE_${PN} = "dc"
24ALTERNATIVE_PRIORITY = "100"
25
26BBCLASSEXTEND = "native"
diff --git a/meta/recipes-extended/bc/bc_1.07.1.bb b/meta/recipes-extended/bc/bc_1.07.1.bb
new file mode 100644
index 0000000000..e80857745e
--- /dev/null
+++ b/meta/recipes-extended/bc/bc_1.07.1.bb
@@ -0,0 +1,33 @@
1SUMMARY = "Arbitrary precision calculator language"
2HOMEPAGE = "http://www.gnu.org/software/bc/bc.html"
3
4LICENSE = "GPLv3+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
6 file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
7 file://bc/bcdefs.h;endline=17;md5=4295c06df9e833519a342f7b5d43db06 \
8 file://dc/dc.h;endline=18;md5=36b8c600b63ee8c3aeade2764f6b2a4b \
9 file://lib/number.c;endline=20;md5=cf43068cc88f837731dc53240456cfaf"
10
11SECTION = "base"
12DEPENDS = "flex-native"
13
14SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
15 file://no-gen-libmath.patch \
16 file://libmath.h"
17SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc"
18SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
19
20inherit autotools texinfo update-alternatives
21
22PACKAGECONFIG ??= "readline"
23PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
24PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
25
26do_compile_prepend() {
27 cp -f ${WORKDIR}/libmath.h ${B}/bc/libmath.h
28}
29
30ALTERNATIVE_${PN} = "dc"
31ALTERNATIVE_PRIORITY = "100"
32
33BBCLASSEXTEND = "native" \ No newline at end of file
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch
deleted file mode 100644
index 20c0da2ebe..0000000000
--- a/meta/recipes-extended/bc/files/fix-segment-fault.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Upstream-Status: Pending
2
3when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
4This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
5
6Signed-off-by: Kai Kang <kai.kang@windriver.com>
7
8--- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000
9+++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000
10@@ -34,6 +34,7 @@
11 #include <number.h>
12 #include <assert.h>
13 #include <stdlib.h>
14+#include <string.h>
15 #include <ctype.h>/* Prototypes needed for external utility routines. */
16
17 #define bc_rt_warn rt_warn
18--- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000
19+++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000
20@@ -156,7 +156,7 @@
21 long label_no;
22 long vaf_name; /* variable, array or function number. */
23 long func;
24- program_counter save_adr;
25+ static program_counter save_adr;
26
27 /* Initialize. */
28 str = code;