Skip to content

Commit 2afbad3

Browse files
committed
Update to calc 2.12.7.1 and 2.12.7.2
Calc 2.12.6.10 changed arguments of qprintnum().
1 parent 3d5ab35 commit 2afbad3

File tree

4 files changed

+32
-20
lines changed

4 files changed

+32
-20
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ rvm:
1010
- 2.6.0
1111
- 2.7.0
1212
env:
13-
- CALC_VERSION=2.12.5.6
14-
- CALC_VERSION=2.12.6.3
13+
- CALC_VERSION=2.12.7.1
14+
- CALC_VERSION=2.12.7.2
1515
before_install:
1616
- gem install bundler # travis ruby 2.0.0 installs bundler 1.7, update it
1717
- bin/install_calc.sh

bin/install_calc.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#! /bin/sh
22
# installs calc into /usr/local
33

4+
set -e
45
set -x
56

6-
version=calc-${CALC_VERSION-2.12.6.0}
7+
version=calc-${CALC_VERSION-2.12.7.1}
78
patch=$PWD/$(dirname $0)/makefile.patch
89

910
cd /tmp
1011
wget -nv http://www.isthe.com/chongo/src/calc/${version}.tar.bz2
1112
tar xjf ${version}.tar.bz2
1213
cd $version
13-
patch -p0 < $patch
14+
patch -t -p0 < $patch
1415
if [ "$CI" = "true" ]; then
1516
make && sudo make install
1617
else

bin/makefile.patch

+25-14
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
1-
--- Makefile.orig 2015-11-06 17:52:22.984273873 +1030
2-
+++ Makefile 2015-11-06 18:00:02.632273873 +1030
3-
@@ -610,25 +610,25 @@
4-
# LIBDIR= /usr/lib
5-
# CALC_SHAREDIR= /usr/share/calc
6-
#
1+
--- Makefile.orig 2018-11-06 02:05:46.000000000 +1030
2+
+++ Makefile 2020-05-04 21:06:06.000000000 +0930
3+
@@ -644,8 +644,8 @@
4+
#endif /* end of skip for non-Gnu makefiles */
5+
6+
# default BINDIR for non-macOS
7+
-BINDIR= /usr/bin
78
-#BINDIR= /usr/local/bin
9+
+#BINDIR= /usr/bin
810
+BINDIR= /usr/local/bin
911
#BINDIR= /dev/env/DJDIR/bin
10-
-BINDIR= /usr/bin
11-
+#BINDIR= /usr/bin
1212

13+
#if 0 /* start of skip for non-Gnu makefiles */
14+
@@ -660,8 +660,8 @@
15+
#endif /* end of skip for non-Gnu makefiles */
16+
17+
# default LIBDIR for non-macOS
18+
-LIBDIR= /usr/lib
1319
-#LIBDIR= /usr/local/lib
20+
+#LIBDIR= /usr/lib
1421
+LIBDIR= /usr/local/lib
1522
#LIBDIR= /dev/env/DJDIR/lib
16-
-LIBDIR= /usr/lib
17-
+#LIBDIR= /usr/lib
1823

24+
#if 0 /* start of skip for non-Gnu makefiles */
25+
@@ -676,8 +676,8 @@
26+
#endif /* end of skip for non-Gnu makefiles */
27+
28+
# default CALC_SHAREDIR for non-macOS
29+
-CALC_SHAREDIR= /usr/share/calc
1930
-#CALC_SHAREDIR= /usr/local/lib/calc
31+
+#CALC_SHAREDIR= /usr/share/calc
2032
+CALC_SHAREDIR= /usr/local/lib/calc
2133
#CALC_SHAREDIR= /dev/env/DJDIR/share/calc
22-
-CALC_SHAREDIR= /usr/share/calc
23-
+#CALC_SHAREDIR= /usr/share/calc
2434

25-
# NOTE: Do not set CALC_INCDIR to /usr/include or /usr/local/include!!!
35+
#if 0 /* start of skip for non-Gnu makefiles */
36+
@@ -688,9 +688,9 @@
2637
# Always be sure that the CALC_INCDIR path ends in /calc to avoid
2738
# conflicts with system or other application include files!!!
2839
#
@@ -34,7 +45,7 @@
3445

3546
# By default, these values are based CALC_SHAREDIR, INCDIR, BINDIR
3647
# ---------------------------------------------------------------
37-
@@ -696,9 +696,9 @@
48+
@@ -758,9 +758,9 @@
3849
# Use MANDIR= to disable installation of the calc man (source) page.
3950
#
4051
#MANDIR=

ext/calc/q.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2592,10 +2592,10 @@ cq_to_s(int argc, VALUE * argv, VALUE self)
25922592
else {
25932593
math_divertio();
25942594
if (args == 0) {
2595-
qprintnum(qself, MODE_DEFAULT);
2595+
qprintnum(qself, MODE_DEFAULT, conf->outdigits);
25962596
}
25972597
else {
2598-
qprintnum(qself, (int) value_to_mode(mode));
2598+
qprintnum(qself, (int) value_to_mode(mode), conf->outdigits);
25992599
}
26002600
s = math_getdivertedio();
26012601
rs = rb_str_new2(s);

0 commit comments

Comments
 (0)