mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 14:43:52 +02:00
janet: update to 1.8.1.
This commit is contained in:
parent
ead2b2c2db
commit
eb4e75ba67
2 changed files with 2 additions and 82 deletions
|
@ -1,80 +0,0 @@
|
||||||
From 459e75bec840c1644f884795330ab7c3aca5a532 Mon Sep 17 00:00:00 2001
|
|
||||||
From: q66 <daniel@octaforge.org>
|
|
||||||
Date: Mon, 30 Mar 2020 18:30:19 +0200
|
|
||||||
Subject: [PATCH 1/3] Fix endian check for little endian PowerPC and maybe
|
|
||||||
others
|
|
||||||
|
|
||||||
This fixes various subtle breakage on ppc64le at very least.
|
|
||||||
---
|
|
||||||
src/include/janet.h | 9 ++++++++-
|
|
||||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/include/janet.h b/src/include/janet.h
|
|
||||||
index 6d5b7de0..9fb9f416 100644
|
|
||||||
--- a/src/include/janet.h
|
|
||||||
+++ b/src/include/janet.h
|
|
||||||
@@ -97,7 +97,14 @@ extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Check big endian */
|
|
||||||
-#if defined(__MIPSEB__) /* MIPS 32-bit */ \
|
|
||||||
+#if defined(__LITTLE_ENDIAN__) || \
|
|
||||||
+ (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
|
||||||
+/* If we know the target is LE, always use that - e.g. ppc64 little endian
|
|
||||||
+ * defines the __LITTLE_ENDIAN__ macro in the ABI spec, so we can rely
|
|
||||||
+ * on that and if that's not defined, fall back to big endian assumption
|
|
||||||
+ */
|
|
||||||
+#define JANET_LITTLE_ENDIAN 1
|
|
||||||
+#elif defined(__MIPSEB__) /* MIPS 32-bit */ \
|
|
||||||
|| defined(__ppc__) || defined(__PPC__) /* CPU(PPC) - PowerPC 32-bit */ \
|
|
||||||
|| defined(__powerpc__) || defined(__powerpc) || defined(__POWERPC__) \
|
|
||||||
|| defined(_M_PPC) || defined(__PPC) \
|
|
||||||
|
|
||||||
From 12b183179a012554e07dce93c5b3d7173db54e8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: q66 <daniel@octaforge.org>
|
|
||||||
Date: Mon, 30 Mar 2020 19:14:00 +0200
|
|
||||||
Subject: [PATCH 2/3] Fix typo in big endian unmarshalling code
|
|
||||||
|
|
||||||
This was subtly breaking everything.
|
|
||||||
---
|
|
||||||
src/core/marsh.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/core/marsh.c b/src/core/marsh.c
|
|
||||||
index d6d6353c..d9cd3f70 100644
|
|
||||||
--- a/src/core/marsh.c
|
|
||||||
+++ b/src/core/marsh.c
|
|
||||||
@@ -1141,7 +1141,7 @@ static const uint8_t *unmarshal_one(
|
|
||||||
u.bytes[0] = data[8];
|
|
||||||
u.bytes[1] = data[7];
|
|
||||||
u.bytes[2] = data[6];
|
|
||||||
- u.bytes[5] = data[5];
|
|
||||||
+ u.bytes[3] = data[5];
|
|
||||||
u.bytes[4] = data[4];
|
|
||||||
u.bytes[5] = data[3];
|
|
||||||
u.bytes[6] = data[2];
|
|
||||||
|
|
||||||
From 8b7c160e73fd4f17ff0393be61c04abebeb71717 Mon Sep 17 00:00:00 2001
|
|
||||||
From: q66 <daniel@octaforge.org>
|
|
||||||
Date: Mon, 30 Mar 2020 19:19:51 +0200
|
|
||||||
Subject: [PATCH 3/3] Fix wrong check on big endian systems
|
|
||||||
|
|
||||||
We can't randomly type pun random-sized types on big endian
|
|
||||||
systems.
|
|
||||||
---
|
|
||||||
src/include/janet.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/include/janet.h b/src/include/janet.h
|
|
||||||
index 9fb9f416..d874cb53 100644
|
|
||||||
--- a/src/include/janet.h
|
|
||||||
+++ b/src/include/janet.h
|
|
||||||
@@ -663,7 +663,7 @@ struct Janet {
|
|
||||||
#define janet_type(x) ((x).type)
|
|
||||||
#define janet_checktype(x, t) ((x).type == (t))
|
|
||||||
#define janet_truthy(x) \
|
|
||||||
- ((x).type != JANET_NIL && ((x).type != JANET_BOOLEAN || ((x).as.integer & 0x1)))
|
|
||||||
+ ((x).type != JANET_NIL && ((x).type != JANET_BOOLEAN || ((x).as.u64 & 0x1)))
|
|
||||||
|
|
||||||
#define janet_unwrap_struct(x) ((const JanetKV *)(x).as.pointer)
|
|
||||||
#define janet_unwrap_tuple(x) ((const Janet *)(x).as.pointer)
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'janet'
|
# Template file for 'janet'
|
||||||
pkgname=janet
|
pkgname=janet
|
||||||
version=1.8.0
|
version=1.8.1
|
||||||
revision=1
|
revision=1
|
||||||
build_style=meson
|
build_style=meson
|
||||||
short_desc="Dynamic Lisp dialect and bytecode VM"
|
short_desc="Dynamic Lisp dialect and bytecode VM"
|
||||||
|
@ -8,7 +8,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
homepage="https://janet-lang.org/"
|
homepage="https://janet-lang.org/"
|
||||||
distfiles="https://github.com/janet-lang/janet/archive/v${version}.tar.gz"
|
distfiles="https://github.com/janet-lang/janet/archive/v${version}.tar.gz"
|
||||||
checksum=e02ae5c7b4579a23e3f30636c16d248273ed119467a076d18c9362e858eb9812
|
checksum=0f3ee438fb159d3081b38506e51df6406b355eb241c662ca1a3529dac0140b92
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue