[packages/libmatheval] Up to 1.1.12
arekm
arekm at pld-linux.org
Thu Nov 26 09:11:11 CET 2026
commit d2f91f6f6c18784c13176e9286afe209714d0f44
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 26 02:42:10 2026 +0100
Up to 1.1.12
libmatheval-guile3.patch | 614 ----------------------------------------------
libmatheval-texinfo.patch | 21 --
libmatheval.spec | 30 +--
3 files changed, 12 insertions(+), 653 deletions(-)
---
diff --git a/libmatheval.spec b/libmatheval.spec
index fec11e9..4b13f7c 100644
--- a/libmatheval.spec
+++ b/libmatheval.spec
@@ -1,23 +1,21 @@
+%bcond_without tests # unit tests (need guile)
+
Summary: Library for evaluating mathematical expressions
Summary(pl.UTF-8): Biblioteka do obliczania wyrażeń matematycznych
Name: libmatheval
-Version: 1.1.11
-Release: 3
+Version: 1.1.12
+Release: 1
License: GPL v3+
Group: Libraries
Source0: http://ftp.gnu.org/gnu/libmatheval/%{name}-%{version}.tar.gz
-# Source0-md5: 595420ea60f6ddd75623847f46ca45c4
-Patch0: %{name}-guile3.patch
-Patch1: %{name}-texinfo.patch
+# Source0-md5: 1faa4cb8f652fbfcdcd2f2c792b26692
URL: http://www.gnu.org/software/libmatheval/
-BuildRequires: autoconf >= 2.53
-BuildRequires: automake
BuildRequires: bison
BuildRequires: flex >= 2.5.33-2
-# for config.rpath
-BuildRequires: gettext-tools
+%if %{with tests}
BuildRequires: guile-devel
-BuildRequires: libtool
+BuildRequires: pkgconfig
+%endif
BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -68,19 +66,15 @@ Statyczna biblioteka libmatheval.
%prep
%setup -q
-%patch -P0 -p1
-%patch -P1 -p1
%build
-cp -f %{_datadir}/gettext/config.rpath config
-%{__libtoolize}
-%{__aclocal} -I %{_datadir}/gettext/m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
%configure
%{__make}
+%if %{with tests}
+%{__make} check
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/libmatheval-guile3.patch b/libmatheval-guile3.patch
deleted file mode 100644
index 8a5b724..0000000
--- a/libmatheval-guile3.patch
+++ /dev/null
@@ -1,614 +0,0 @@
-Description: Port tests to guile3
-Author: Julian Taylor jtaylor.debian at googlemail.com
-Bug-Debian: https://bugs.debian.org/885212
-
----
-
-Index: libmatheval/configure.in
-===================================================================
---- libmatheval.orig/configure.in
-+++ libmatheval/configure.in
-@@ -60,10 +60,11 @@ dnl Checks for library functions.
- AC_CHECK_FUNCS([bzero memset], [break])
-
- dnl Additional Guile feature checks.
-+CFLAGS="$CFLAGS $GUILE_CFLAGS"
- AC_CHECK_TYPE([scm_t_bits], [AC_DEFINE([HAVE_SCM_T_BITS], [1], [Define to 1 if you have the `scm_t_bits' type.])], [], [#include <libguile.h>])
--AC_CHECK_LIB([guile], [scm_c_define_gsubr], [AC_DEFINE([HAVE_SCM_C_DEFINE_GSUBR], [1], [Define to 1 if you have the `scm_c_define_gsubr' function.])], [], [$GUILE_LDFLAGS])
--AC_CHECK_LIB([guile], [scm_make_gsubr], [AC_DEFINE([HAVE_SCM_MAKE_GSUBR], [1], [Define to 1 if you have the `scm_make_gsubr' function.])], [], [$GUILE_LDFLAGS])
--AC_CHECK_LIB([guile], [scm_num2dbl], [AC_DEFINE([HAVE_SCM_NUM2DBL], [1], [Define to 1 if you have the `scm_num2dbl' function.])], [], [$GUILE_LDFLAGS])
-+AC_CHECK_LIB([guile-3.0], [scm_c_define_gsubr], [AC_DEFINE([HAVE_SCM_C_DEFINE_GSUBR], [1], [Define to 1 if you have the `scm_c_define_gsubr' function.])], [], [$GUILE_LDFLAGS])
-+AC_CHECK_LIB([guile-3.0], [scm_make_gsubr], [AC_DEFINE([HAVE_SCM_MAKE_GSUBR], [1], [Define to 1 if you have the `scm_make_gsubr' function.])], [], [$GUILE_LDFLAGS])
-+AC_CHECK_LIB([guile-3.0], [scm_num2dbl], [AC_DEFINE([HAVE_SCM_NUM2DBL], [1], [Define to 1 if you have the `scm_num2dbl' function.])], [], [$GUILE_LDFLAGS])
-
- AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile])
- AC_OUTPUT(libmatheval.pc)
-Index: libmatheval/tests/basics.at
-===================================================================
---- libmatheval.orig/tests/basics.at
-+++ libmatheval/tests/basics.at
-@@ -62,7 +62,7 @@ AT_DATA([basics.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh basics.scm], [ignore], [10.0], [ignore])
-+AT_CHECK([matheval.sh basics.scm], [ignore], [10.000000000000002], [ignore])
-
- AT_DATA([basics.scm],
- [[
-@@ -70,7 +70,7 @@ AT_DATA([basics.scm],
- (display (evaluator-evaluate-x f 0.7))
- ]])
-
--AT_CHECK([matheval.sh basics.scm], [ignore], [0.220966666722528], [ignore])
-+AT_CHECK([matheval.sh basics.scm], [ignore], [0.22096666672252796], [ignore])
-
- AT_DATA([basics.scm],
- [[
-@@ -78,7 +78,7 @@ AT_DATA([basics.scm],
- (display (evaluator-evaluate-x-y f 0.4 -0.7))
- ]])
-
--AT_CHECK([matheval.sh basics.scm], [ignore], [-1.14962406520749], [ignore])
-+AT_CHECK([matheval.sh basics.scm], [ignore], [-1.1496240652074883], [ignore])
-
- AT_DATA([basics.scm],
- [[
-@@ -86,7 +86,7 @@ AT_DATA([basics.scm],
- (display (evaluator-evaluate-x-y-z f 11.2 0.41 -0.66))
- ]])
-
--AT_CHECK([matheval.sh basics.scm], [ignore], [3.99876152571934], [ignore])
-+AT_CHECK([matheval.sh basics.scm], [ignore], [3.9987615257193383], [ignore])
-
- AT_DATA([basics.scm],
- [[
-Index: libmatheval/tests/constants.at
-===================================================================
---- libmatheval.orig/tests/constants.at
-+++ libmatheval/tests/constants.at
-@@ -29,7 +29,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [2.71828182845905], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [2.718281828459045], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -37,7 +37,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [1.44269504088896], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [1.4426950408889634], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -45,7 +45,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.434294481903252], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.4342944819032518], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -53,7 +53,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.693147180559945], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.6931471805599453], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -61,7 +61,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [2.30258509299405], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [2.302585092994046], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -69,7 +69,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [3.14159265358979], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [3.141592653589793], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -77,7 +77,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [1.5707963267949], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [1.5707963267948966], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -85,7 +85,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.785398163397448], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.7853981633974483], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -93,7 +93,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.318309886183791], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.3183098861837907], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -101,7 +101,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.636619772367581], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.6366197723675814], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -109,7 +109,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [1.12837916709551], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [1.1283791670955126], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -117,7 +117,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [1.4142135623731], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [1.4142135623730951], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -125,7 +125,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [0.707106781186548], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [0.7071067811865476], [ignore])
-
- AT_DATA([constant.scm],
- [[
-@@ -133,7 +133,7 @@ AT_DATA([constant.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh constant.scm], [ignore], [10.0], [ignore])
-+AT_CHECK([matheval.sh constant.scm], [ignore], [10.000000000000002], [ignore])
-
- AT_DATA([constant.scm],
- [[
-Index: libmatheval/tests/functions.at
-===================================================================
---- libmatheval.orig/tests/functions.at
-+++ libmatheval/tests/functions.at
-@@ -29,7 +29,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [2.71828182845905], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [2.718281828459045], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -80,7 +80,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.841470984807897], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.8414709848078965], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -97,7 +97,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.54030230586814], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.5403023058681398], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -114,7 +114,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.5574077246549], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.5574077246549023], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -131,7 +131,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.642092615934331], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.6420926159343306], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -148,7 +148,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.85081571768093], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.8508157176809255], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -165,7 +165,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.18839510577812], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.1883951057781212], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -182,7 +182,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.5707963267949], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.5707963267948966], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -216,7 +216,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.785398163397448], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.7853981633974483], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -233,7 +233,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.785398163397448], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.7853981633974483], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -267,7 +267,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.5707963267949], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.5707963267948966], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -284,7 +284,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.1752011936438], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.1752011936438014], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -301,7 +301,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.54308063481524], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.5430806348152437], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -318,7 +318,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.761594155955765], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.7615941559557649], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -335,7 +335,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [1.31303528549933], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.3130352854993315], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -352,7 +352,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.648054273663885], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.6480542736638855], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -368,7 +368,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.850918128239322], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.8509181282393216], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -385,7 +385,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.881373587019543], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.8813735870195429], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -419,7 +419,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 0.5))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.549306144334055], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.5493061443340549], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -436,7 +436,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 2))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.549306144334055], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.5493061443340549], [ignore])
-
- AT_DATA([function.scm],
- [[
-@@ -470,7 +470,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
-
--AT_CHECK([matheval.sh function.scm], [ignore], [0.881373587019543], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [0.8813735870195429], [ignore])
-
- AT_DATA([function.scm],
- [[
-Index: libmatheval/tests/numbers.at
-===================================================================
---- libmatheval.orig/tests/numbers.at
-+++ libmatheval/tests/numbers.at
-@@ -53,6 +53,6 @@ AT_DATA([number.scm],
- (display (evaluator-evaluate-x f 0))
- ]])
-
--AT_CHECK([matheval.sh number.scm], [ignore], [0.644394014977254], [ignore])
-+AT_CHECK([matheval.sh number.scm], [ignore], [0.6443940149772542], [ignore])
-
- AT_CLEANUP
-Index: libmatheval/tests/matheval.c
-===================================================================
---- libmatheval.orig/tests/matheval.c
-+++ libmatheval/tests/matheval.c
-@@ -26,32 +26,12 @@
- #include <matheval.h>
- #include "config.h"
-
--#ifndef HAVE_SCM_T_BITS
--typedef long scm_t_bits;
--#endif
--
--#ifndef HAVE_SCM_NUM2DBL
--#ifdef SCM_NUM2DBL
--#define scm_num2dbl(x,s) SCM_NUM2DBL(x)
--#else
--#error Neither scm_num2dbl() nor SCM_NUM2DBL available
--#endif
--#endif
--
--#ifndef HAVE_SCM_C_DEFINE_GSUBR
--#ifdef HAVE_SCM_MAKE_GSUBR
--#define scm_c_define_gsubr scm_make_gsubr
--#else
--#error Neither scm_c_define_gsubr() nor scm_make_gsubr() available
--#endif
--#endif
--
- static scm_t_bits evaluator_tag; /* Unique identifier for Guile
- * objects of evaluator type. */
-
- /* Guile interface for libmatheval library. Procedures below are simple
- * wrappers for corresponding libmatheval procedures. */
--static scm_sizet evaluator_destroy_scm(SCM evaluator_smob);
-+static size_t evaluator_destroy_scm(SCM evaluator_smob);
- static SCM evaluator_create_scm(SCM string);
- static SCM evaluator_evaluate_scm(SCM evaluator_smob, SCM count,
- SCM names, SCM values);
-@@ -104,7 +84,7 @@ inner_main(void *closure, int argc, char
-
- /* Interpret Guile code from file with name given through above
- * argument. */
-- scm_primitive_load(scm_makfrom0str(argv[1]));
-+ scm_primitive_load(scm_from_locale_string(argv[1]));
- }
-
- /* Program is demonstrating use of libmatheval library of procedures for
-@@ -122,7 +102,7 @@ main(int argc, char **argv)
- }
-
- /* Wrapper for evaluator_destroy() procedure from libmatheval library. */
--static scm_sizet
-+static size_t
- evaluator_destroy_scm(SCM evaluator_smob)
- {
- SCM_ASSERT((SCM_NIMP(evaluator_smob)
-@@ -141,13 +121,11 @@ evaluator_create_scm(SCM string)
- char *stringz;
- void *evaluator;
-
-- SCM_ASSERT(SCM_NIMP(string)
-- && SCM_STRINGP(string), string, SCM_ARG1,
-+ SCM_ASSERT(SCM_NIMP(string) &&
-+ scm_is_string(string), string, SCM_ARG1,
- "evaluator-create");
--
-- stringz = (char *) malloc((SCM_LENGTH(string) + 1) * sizeof(char));
-- memcpy(stringz, SCM_CHARS(string), SCM_LENGTH(string));
-- stringz[SCM_LENGTH(string)] = 0;
-+
-+ stringz = scm_to_locale_string(string);
-
- evaluator = evaluator_create(stringz);
-
-@@ -174,43 +152,38 @@ evaluator_evaluate_scm(SCM evaluator_smo
- SCM_ASSERT((SCM_NIMP(evaluator_smob)
- && SCM_SMOB_PREDICATE(evaluator_tag, evaluator_smob)),
- evaluator_smob, SCM_ARG1, "evaluator-evaluate");
-- SCM_ASSERT(SCM_INUMP(count), count, SCM_ARG2,
-+ SCM_ASSERT(scm_is_integer(count), count, SCM_ARG2,
- "evaluator-evaluate");
-
-- names_copy = (char **) malloc(SCM_INUM(count) * sizeof(char *));
-- for (i = 0, name = names; i < SCM_INUM(count);
-+ names_copy = (char **) malloc(scm_to_int(count) * sizeof(char *));
-+ for (i = 0, name = names; i < scm_to_int(count);
- i++, name = SCM_CDR(name)) {
- SCM_ASSERT(SCM_NIMP(name) && SCM_CONSP(name)
-- && SCM_STRINGP(SCM_CAR(name)), names, SCM_ARG3,
-+ && scm_is_string(SCM_CAR(name)), names, SCM_ARG3,
- "evaluator-evaluate");
-- names_copy[i] =
-- (char *) malloc((SCM_LENGTH(SCM_CAR(name)) + 1) *
-- sizeof(char));
-- memcpy(names_copy[i], SCM_CHARS(SCM_CAR(name)),
-- SCM_LENGTH(SCM_CAR(name)));
-- names_copy[i][SCM_LENGTH(SCM_CAR(name))] = 0;
-+ names_copy[i] = scm_to_locale_string(SCM_CAR(name));
- }
-
-- values_copy = (double *) malloc(SCM_INUM(count) * sizeof(double));
-- for (i = 0, value = values; i < SCM_INUM(count);
-+ values_copy = (double *) malloc(scm_to_int(count) * sizeof(double));
-+ for (i = 0, value = values; i < scm_to_int(count);
- i++, value = SCM_CDR(value)) {
- SCM_ASSERT(SCM_NIMP(value) && SCM_CONSP(value)
- && SCM_NUMBERP(SCM_CAR(value)), values,
- SCM_ARG4, "evaluator-evaluate");
- values_copy[i] =
-- scm_num2dbl(SCM_CAR(value), "evaluator-evaluate");
-+ scm_to_double(SCM_CAR(value));
- }
-
- result =
- evaluator_evaluate((void *) SCM_CDR(evaluator_smob),
-- SCM_INUM(count), names_copy, values_copy);
-+ scm_to_int(count), names_copy, values_copy);
-
-- for (i = 0; i < SCM_INUM(count); i++)
-+ for (i = 0; i < scm_to_int(count); i++)
- free(names_copy[i]);
- free(names_copy);
- free(values_copy);
-
-- return scm_make_real(result);
-+ return scm_from_double(result);
- }
-
- /* Wrapper for evaluator_get_string() procedure from libmatheval library. */
-@@ -222,7 +195,7 @@ evaluator_get_string_scm(SCM evaluator_s
- evaluator_smob, SCM_ARG1, "evaluator-get-string");
-
- return
-- scm_makfrom0str(evaluator_get_string
-+ scm_from_locale_string(evaluator_get_string
- ((void *) SCM_CDR(evaluator_smob)));
- }
-
-@@ -245,9 +218,9 @@ evaluator_get_variables_scm(SCM evaluato
- list = SCM_EOL;
- for (i = 0; i < count; i++)
- list =
-- scm_append_x(scm_listify
-+ scm_append_x(scm_list_n
- (list,
-- scm_listify(scm_makfrom0str(names[i]),
-+ scm_list_n(scm_from_locale_string(names[i]),
- SCM_UNDEFINED),
- SCM_UNDEFINED));
-
-@@ -258,16 +231,19 @@ evaluator_get_variables_scm(SCM evaluato
- static SCM
- evaluator_derivative_scm(SCM evaluator_smob, SCM name)
- {
-+ char * stringz;
- SCM_ASSERT((SCM_NIMP(evaluator_smob)
- && SCM_SMOB_PREDICATE(evaluator_tag, evaluator_smob)),
- evaluator_smob, SCM_ARG1, "evaluator-derivative");
- SCM_ASSERT(SCM_NIMP(name)
-- && SCM_STRINGP(name), name, SCM_ARG2,
-+ && scm_is_string(name), name, SCM_ARG2,
- "evaluator-derivative");
-+ stringz = scm_to_locale_string(name);
- SCM_RETURN_NEWSMOB(evaluator_tag,
- evaluator_derivative((void *)
- SCM_CDR(evaluator_smob),
-- SCM_CHARS(name)));
-+ stringz));
-+ free(stringz);
- }
-
- /* Wrapper for evaluator_evaluate_x() procedure from libmatheval library. */
-@@ -279,9 +255,9 @@ evaluator_evaluate_x_scm(SCM evaluator_s
- evaluator_smob, SCM_ARG1, "evaluator-evaluate-x");
- SCM_ASSERT(SCM_NUMBERP(x), x, SCM_ARG2, "evaluator-evaluate-x");
- return
-- scm_make_real(evaluator_evaluate_x
-+ scm_from_double(evaluator_evaluate_x
- ((void *) SCM_CDR(evaluator_smob),
-- scm_num2dbl(x, "evaluator-evaluate-x")));
-+ scm_to_double(x)));
- }
-
- /* Wrapper for evaluator_evaluate_x_y() procedure from libmatheval
-@@ -295,10 +271,10 @@ evaluator_evaluate_x_y_scm(SCM evaluator
- SCM_ASSERT(SCM_NUMBERP(x), x, SCM_ARG2, "evaluator-evaluate-x-y");
- SCM_ASSERT(SCM_NUMBERP(y), y, SCM_ARG3, "evaluator-evaluate-x-y");
- return
-- scm_make_real(evaluator_evaluate_x_y
-+ scm_from_double(evaluator_evaluate_x_y
- ((void *) SCM_CDR(evaluator_smob),
-- scm_num2dbl(x, "evaluator-evaluate-x-y"),
-- scm_num2dbl(y, "evaluator-evaluate-x-y")));
-+ scm_to_double(x),
-+ scm_to_double(y)));
- }
-
- /* Wrapper for evaluator_evaluate_x_y_z() procedure from libmatheval
-@@ -316,11 +292,11 @@ evaluator_evaluate_x_y_z_scm(SCM evaluat
- SCM_ASSERT(SCM_NUMBERP(z), z, SCM_ARG4,
- "evaluator-evaluate-x-y-z");
- return
-- scm_make_real(evaluator_evaluate_x_y_z
-+ scm_from_double(evaluator_evaluate_x_y_z
- ((void *) SCM_CDR(evaluator_smob),
-- scm_num2dbl(x, "evaluator-evaluate-x-y-z"),
-- scm_num2dbl(y, "evaluator-evaluate-x-y-z"),
-- scm_num2dbl(z, "evaluator-evaluate-x-y-z")));
-+ scm_to_double(x),
-+ scm_to_double(y),
-+ scm_to_double(z)));
- }
-
- /* Wrapper for evaluator_derivative_x() procedure from libmatheval
diff --git a/libmatheval-texinfo.patch b/libmatheval-texinfo.patch
deleted file mode 100644
index 66cecd1..0000000
--- a/libmatheval-texinfo.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Fix texinfo syntax: @title, @subtitle, @author don't take braced arguments.
-
---- libmatheval-1.1.11/doc/libmatheval.texi.orig 2013-09-01 21:26:09.000000000 +0200
-+++ libmatheval-1.1.11/doc/libmatheval.texi 2013-09-01 21:26:22.000000000 +0200
-@@ -34,11 +34,11 @@
- @end ifnottex
-
- @titlepage
-- at title{GNU @code{libmatheval} manual}
-- at subtitle{Manual edition @value{EDITION}}
-- at subtitle{For GNU @code{libmatheval} version @value{VERSION}}
-- at subtitle{Last updated @value{UPDATED}}
-- at author{Aleksandar Samardzic}
-+ at title GNU @code{libmatheval} manual
-+ at subtitle Manual edition @value{EDITION}
-+ at subtitle For GNU @code{libmatheval} version @value{VERSION}
-+ at subtitle Last updated @value{UPDATED}
-+ at author Aleksandar Samardzic
-
- @page
- @vskip 0pt plus 1filll
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libmatheval.git/commitdiff/d2f91f6f6c18784c13176e9286afe209714d0f44
More information about the pld-cvs-commit
mailing list