summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD23
-rw-r--r--libmatheval.install20
-rw-r--r--replace-obsolete-functions.patch33
4 files changed, 50 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7bde85a49d04..a7c318b3f8df 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,15 +3,17 @@ pkgbase = libmatheval
pkgver = 1.1.11
pkgrel = 1
url = https://www.gnu.org/software/libmatheval/
- install = libmatheval.install
arch = i686
arch = x86_64
license = GPL3
+ makedepends = guile2.0
depends = flex
- source = http://ftp.gnu.org/gnu/libmatheval/libmatheval-1.1.11.tar.gz
+ source = https://ftp.gnu.org/gnu/libmatheval/libmatheval-1.1.11.tar.gz
source = removeifndefs.patch
+ source = replace-obsolete-functions.patch
md5sums = 595420ea60f6ddd75623847f46ca45c4
md5sums = b340ca489388a8c7986654f4be8127f4
+ md5sums = 5a58a75ad710d8847be3931944404429
pkgname = libmatheval
diff --git a/PKGBUILD b/PKGBUILD
index 98d6a7a7576b..282ddba9d80a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,24 +8,27 @@ arch=('i686' 'x86_64')
url="https://www.gnu.org/software/libmatheval/"
license=('GPL3')
depends=('flex')
-install=libmatheval.install
-source=("http://ftp.gnu.org/gnu/libmatheval/$pkgname-$pkgver.tar.gz"
- "removeifndefs.patch")
+makedepends=('guile2.0')
+source=("https://ftp.gnu.org/gnu/libmatheval/${pkgname}-${pkgver}.tar.gz"
+ "removeifndefs.patch"
+ "replace-obsolete-functions.patch")
md5sums=('595420ea60f6ddd75623847f46ca45c4'
- 'b340ca489388a8c7986654f4be8127f4')
+ 'b340ca489388a8c7986654f4be8127f4'
+ '5a58a75ad710d8847be3931944404429')
prepare() {
- cd "$pkgname-$pkgver"
- patch -p1 -i "$srcdir/removeifndefs.patch"
+ cd "${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/removeifndefs.patch"
+ patch -p1 -i "${srcdir}/replace-obsolete-functions.patch"
}
build() {
- cd "$pkgname-$pkgver"
- ./configure --prefix=/usr
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr GUILE=/usr/bin/guile2.0 GUILE_CONFIG=/usr/bin/guile-config2.0
make
}
package() {
- cd "$pkgname-$pkgver"
- make DESTDIR="$pkgdir/" install
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}/" install
}
diff --git a/libmatheval.install b/libmatheval.install
deleted file mode 100644
index a1277574cd73..000000000000
--- a/libmatheval.install
+++ /dev/null
@@ -1,20 +0,0 @@
-infodir=/usr/share/info
-filelist=(libmatheval.info)
-
-post_install() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- [ -x usr/bin/install-info ] || return 0
- for file in ${filelist[@]}; do
- install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
- done
-}
diff --git a/replace-obsolete-functions.patch b/replace-obsolete-functions.patch
new file mode 100644
index 000000000000..c1039cc1fdb9
--- /dev/null
+++ b/replace-obsolete-functions.patch
@@ -0,0 +1,33 @@
+diff -aur 1/tests/matheval.c 2/tests/matheval.c
+--- 1/tests/matheval.c 2013-08-14 21:22:08.000000000 +0100
++++ 2/tests/matheval.c 2017-12-30 21:01:53.333215271 +0000
+@@ -51,7 +51,7 @@
+
+ /* 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);
+@@ -122,7 +122,7 @@
+ }
+
+ /* 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)
+@@ -245,9 +245,9 @@
+ 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_makfrom0str(names[i]),
+ SCM_UNDEFINED),
+ SCM_UNDEFINED));
+