Date: Thu, 23 May 2019 06:32:45 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r502314 - in head/shells/ion: . files Message-ID: <201905230632.x4N6Wjdl089425@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Thu May 23 06:32:45 2019 New Revision: 502314 URL: https://svnweb.freebsd.org/changeset/ports/502314 Log: shells/ion: Attempt to fix build on powerpc64 http://pylon.nyi.freebsd.org/data/head-powerpc64-default/p501607_s347555/logs/errors/ion-shell-1.0.5.900_1.log Added: head/shells/ion/files/ head/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs (contents, props changed) Modified: head/shells/ion/Makefile Modified: head/shells/ion/Makefile ============================================================================== --- head/shells/ion/Makefile Thu May 23 06:18:25 2019 (r502313) +++ head/shells/ion/Makefile Thu May 23 06:32:45 2019 (r502314) @@ -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 Added: head/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/shells/ion/files/patch-cargo-crates_decimal-2.0.4_src_dec128.rs Thu May 23 06:32:45 2019 (r502314) @@ -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());
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905230632.x4N6Wjdl089425>