From f5fbf050d376336267355bd4487c3d393f917451 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 5 Aug 2019 13:44:43 +0200 Subject: [PATCH] i3status-rust: fix i686 --- srcpkgs/i3status-rust/patches/fix-i686.patch | 35 ++++++++++++++++++++ srcpkgs/i3status-rust/template | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/i3status-rust/patches/fix-i686.patch diff --git a/srcpkgs/i3status-rust/patches/fix-i686.patch b/srcpkgs/i3status-rust/patches/fix-i686.patch new file mode 100644 index 0000000000..8d80d9163a --- /dev/null +++ b/srcpkgs/i3status-rust/patches/fix-i686.patch @@ -0,0 +1,35 @@ +From 2de5afb0fee02253dc2d9436d9783a2d26c92f95 Mon Sep 17 00:00:00 2001 +From: Enno Boland +Date: Wed, 17 Jul 2019 13:44:43 +0200 +Subject: [PATCH] src/blocks/disk_space.rs: fix build on i686 + +fixes #403. +--- + src/blocks/disk_space.rs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/blocks/disk_space.rs b/src/blocks/disk_space.rs +index 2a6c111..2269fda 100644 +--- src/blocks/disk_space.rs ++++ src/blocks/disk_space.rs +@@ -189,16 +189,16 @@ impl Block for DiskSpace { + let mut result; + let mut converted = 0.0f64; + let mut converted_str = String::new(); +- let total = statvfs.blocks() * statvfs.fragment_size(); +- let used = (statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size(); ++ let total = (statvfs.blocks() * statvfs.fragment_size()) as u64; ++ let used = ((statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size()) as u64; + + match self.info_type { + InfoType::Available => { +- result = statvfs.blocks_available() * statvfs.block_size(); ++ result = (statvfs.blocks_available() * statvfs.block_size()) as u64; + converted = Unit::bytes_in_unit(self.unit, result); + } + InfoType::Free => { +- result = statvfs.blocks_free() * statvfs.block_size(); ++ result = (statvfs.blocks_free() * statvfs.block_size()) as u64; + converted = Unit::bytes_in_unit(self.unit, result); + } + InfoType::Total => { diff --git a/srcpkgs/i3status-rust/template b/srcpkgs/i3status-rust/template index 5950d19506..3ebcd4436e 100644 --- a/srcpkgs/i3status-rust/template +++ b/srcpkgs/i3status-rust/template @@ -1,7 +1,7 @@ # Template file for 'i3status-rust' pkgname=i3status-rust version=0.10.0 -revision=1 +revision=2 build_style=cargo hostmakedepends="pkg-config" makedepends="dbus-devel pulseaudio-devel"