aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-09-13 12:40:23 +0000
committerJan Beich <jbeich@FreeBSD.org>2023-09-13 13:11:31 +0000
commitbd72269e87dc4df2b9e92f7ed1b65d9dbf4bfb12 (patch)
treeb9bb20ad467ed65c830f8bfeff58457a456e229c
parent8bc7c3334e653274d9f63ce53aae8bce52002473 (diff)
downloadports-bd72269e87dc4df2b9e92f7ed1b65d9dbf4bfb12.tar.gz
ports-bd72269e87dc4df2b9e92f7ed1b65d9dbf4bfb12.zip
games/punchy: unbreak build after fa874813924c
error[E0080]: evaluation of constant value failed --> cargo-crates/v8-0.47.1/src/isolate.rs:1222:3 | 1222 | assert!(size_of::<TypeId>() == size_of::<u64>()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::<TypeId>() == size_of::<u64>()', cargo-crates/v8-0.47.1/src/isolate.rs:1222:3 | = note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info) Reported by: pkg-fallout
-rw-r--r--games/punchy/files/patch-rust-1.7230
1 files changed, 30 insertions, 0 deletions
diff --git a/games/punchy/files/patch-rust-1.72 b/games/punchy/files/patch-rust-1.72
new file mode 100644
index 000000000000..04f0300b8241
--- /dev/null
+++ b/games/punchy/files/patch-rust-1.72
@@ -0,0 +1,30 @@
+https://github.com/denoland/rusty_v8/commit/270f46aa5f2f
+
+--- cargo-crates/v8-0.47.1/src/isolate.rs.orig 1970-01-01 00:00:00 UTC
++++ cargo-crates/v8-0.47.1/src/isolate.rs
+@@ -1193,6 +1193,8 @@ impl Hasher for TypeIdHasher {
+
+ #[inline]
+ fn write_u64(&mut self, value: u64) {
++ // The internal hash function of TypeId only takes the bottom 64-bits, even on versions
++ // of Rust that use a 128-bit TypeId.
+ let prev_state = self.state.replace(value);
+ debug_assert_eq!(prev_state, None);
+ }
+@@ -1219,8 +1221,14 @@ const _: () = {
+ }
+
+ const _: () = {
+- assert!(size_of::<TypeId>() == size_of::<u64>());
+- assert!(align_of::<TypeId>() == align_of::<u64>());
++ assert!(
++ size_of::<TypeId>() == size_of::<u64>()
++ || size_of::<TypeId>() == size_of::<u128>()
++ );
++ assert!(
++ align_of::<TypeId>() == align_of::<u64>()
++ || align_of::<TypeId>() == align_of::<u128>()
++ );
+ };
+
+ pub(crate) struct RawSlot {