diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-05-23 06:32:45 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-05-23 06:32:45 +0000 |
commit | 3cd6abe99d4eb25ce94c76a04ecc5d0ad54df87a (patch) | |
tree | 067c836e930c76660482f5e5cec6299e78fb4ffd /shells | |
parent | d22c28aecb00e43523acc07c410e053d36acbdad (diff) | |
download | ports-3cd6abe99d4eb25ce94c76a04ecc5d0ad54df87a.tar.gz ports-3cd6abe99d4eb25ce94c76a04ecc5d0ad54df87a.zip |
Notes
Diffstat (limited to 'shells')
-rw-r--r-- | shells/ion/Makefile | 3 | ||||
-rw-r--r-- | shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs | 62 |
2 files changed, 64 insertions, 1 deletions
diff --git a/shells/ion/Makefile b/shells/ion/Makefile index 36f179137432..e9f7b3beaccc 100644 --- a/shells/ion/Makefile +++ b/shells/ion/Makefile @@ -12,7 +12,8 @@ COMMENT= Modern system shell written in Rust LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= cargo +USES= cargo dos2unix +DOS2UNIX_FILES= cargo-crates/decimal-2.0.4/src/dec128.rs USE_GITHUB= nodefault GH_TUPLE= whitequark:rust-xdg:9b205b3cc5d12dc8678dceebb1b751d0176118db:xdg USE_GITLAB= yes diff --git a/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs b/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs new file mode 100644 index 000000000000..3610873fec04 --- /dev/null +++ b/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs @@ -0,0 +1,62 @@ +Allow build on aarch64 and maybe powerpc64 + +https://github.com/alkis/decimal/commit/5577a60b9b8860a322288856ff2419c191ed080f + +error[E0308]: mismatched types + --> .../cargo-crates/decimal-2.0.4/src/dec128.rs:229:35 + | +229 | decQuadToString(self, buf.as_mut().as_mut_ptr()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8 + | + = note: expected type `*mut u8` + found type `*mut i8` + +error[E0308]: mismatched types + --> .../cargo-crates/decimal-2.0.4/src/dec128.rs:230:39 + | +230 | let cstr = CStr::from_ptr(buf.as_ptr()); + | ^^^^^^^^^^^^ expected u8, found i8 + | + = note: expected type `*const u8` + found type `*const i8` + +error[E0308]: mismatched types + --> .../cargo-crates/decimal-2.0.4/src/dec128.rs:249:38 + | +249 | decQuadToEngString(self, buf.as_mut().as_mut_ptr()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected u8, found i8 + | + = note: expected type `*mut u8` + found type `*mut i8` + +error[E0308]: mismatched types + --> .../cargo-crates/decimal-2.0.4/src/dec128.rs:250:39 + | +250 | let cstr = CStr::from_ptr(buf.as_ptr()); + | ^^^^^^^^^^^^ expected u8, found i8 + | + = note: expected type `*const u8` + found type `*const i8` + +error: aborting due to 4 previous errors + +--- cargo-crates/decimal-2.0.4/src/dec128.rs.orig 2019-05-23 06:18:16 UTC ++++ cargo-crates/decimal-2.0.4/src/dec128.rs +@@ -224,7 +224,7 @@ impl Into<u32> for d128 { + /// payload is 0. + impl fmt::Display for d128 { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +- let mut buf = [0 as i8; 43]; ++ let mut buf = [0; 43]; + unsafe { + decQuadToString(self, buf.as_mut().as_mut_ptr()); + let cstr = CStr::from_ptr(buf.as_ptr()); +@@ -244,7 +244,7 @@ impl fmt::Debug for d128 { + /// exponential notation is used the exponent will be a multiple of 3. + impl fmt::LowerExp for d128 { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { +- let mut buf = [0 as i8; 43]; ++ let mut buf = [0; 43]; + unsafe { + decQuadToEngString(self, buf.as_mut().as_mut_ptr()); + let cstr = CStr::from_ptr(buf.as_ptr()); |