Github messages for voidlinux
 help / color / mirror / Atom feed
From: atweiden <atweiden@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] diffr: update to 0.1.4.
Date: Mon, 18 May 2020 18:08:11 +0200	[thread overview]
Message-ID: <20200518160811.SrFolVLPsCYbSpBSd8qGQpsuZGTCnnN6hFqDEKgMU6E@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22039@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

There is an updated pull request by atweiden against master on the void-packages repository

https://github.com/atweiden/void-packages diffr
https://github.com/void-linux/void-packages/pull/22039

diffr: update to 0.1.4.


A patch file from https://github.com/void-linux/void-packages/pull/22039.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-diffr-22039.patch --]
[-- Type: text/x-diff, Size: 3986 bytes --]

From 809ee2e08998f01ab11bfb206e36e5df4400f88f Mon Sep 17 00:00:00 2001
From: Andy Weidenbaum <archbaum@gmail.com>
Date: Sun, 17 May 2020 22:06:54 +1000
Subject: [PATCH] diffr: update to 0.1.4.

---
 ...51190affd4ce676bb184cd8cc52e20947bfc.patch | 78 +++++++++++++++++++
 srcpkgs/diffr/template                        |  5 +-
 2 files changed, 81 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/diffr/patches/eca551190affd4ce676bb184cd8cc52e20947bfc.patch

diff --git a/srcpkgs/diffr/patches/eca551190affd4ce676bb184cd8cc52e20947bfc.patch b/srcpkgs/diffr/patches/eca551190affd4ce676bb184cd8cc52e20947bfc.patch
new file mode 100644
index 00000000000..60b9b2f86df
--- /dev/null
+++ b/srcpkgs/diffr/patches/eca551190affd4ce676bb184cd8cc52e20947bfc.patch
@@ -0,0 +1,78 @@
+From eca551190affd4ce676bb184cd8cc52e20947bfc Mon Sep 17 00:00:00 2001
+From: Nathan Moreau <nathan.moreau@m4x.org>
+Date: Thu, 19 Mar 2020 23:47:50 +0100
+Subject: [PATCH] Fix build on 32 bits plateforms.
+
+---
+ src/main.rs | 8 ++++----
+ src/test.rs | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/main.rs b/src/main.rs
+index bccc6c4..333438f 100644
+--- a/src/main.rs
++++ b/src/main.rs
+@@ -574,7 +574,7 @@ struct HunkHeader {
+     plus_range: (usize, usize),
+ }
+ 
+-const WIDTH: [usize; 20] = [
++const WIDTH: [u64; 20] = [
+     0,
+     9,
+     99,
+@@ -597,7 +597,7 @@ const WIDTH: [usize; 20] = [
+     9999999999999999999,
+ ];
+ 
+-fn width1(x: usize) -> usize {
++fn width1(x: u64) -> usize {
+     let result = WIDTH.binary_search(&x);
+     match result {
+         Ok(i) | Err(i) => i,
+@@ -613,8 +613,8 @@ impl HunkHeader {
+     }
+ 
+     fn width(&self) -> usize {
+-        2 * width1(self.minus_range.0 + self.minus_range.1)
+-            .max(width1(self.plus_range.0 + self.plus_range.1))
++        2 * width1((self.minus_range.0 + self.minus_range.1) as u64)
++            .max(width1((self.plus_range.0 + self.plus_range.1) as u64))
+             + 1
+     }
+ }
+diff --git a/src/test.rs b/src/test.rs
+index d1254d3..5de7ba4 100644
+--- a/src/test.rs
++++ b/src/test.rs
+@@ -63,12 +63,12 @@ fn parse_line_number_test() {
+ #[test]
+ fn test_width() {
+     for (i, x) in WIDTH.iter().enumerate() {
+-        if x < &usize::max_value() {
++        if x < &u64::max_value() {
+             assert_eq!(format!("{}", x + 1).len(), i + 1);
+         }
+     }
+     assert_eq!(0, width1(0));
+-    fn test(x: usize) {
++    fn test(x: u64) {
+         assert_eq!(format!("{}", x).len(), width1(x));
+     }
+     for i in 1..=10000 {
+@@ -80,7 +80,7 @@ fn test_width() {
+     for i in 0..64 {
+         test(1 << i);
+     }
+-    test(usize::max_value());
++    test(u64::max_value());
+ 
+     assert_eq!("123:456".len(), HunkHeader::new((123, 5), (456, 9)).width());
+     assert_eq!(
+@@ -88,5 +88,5 @@ fn test_width() {
+         HunkHeader::new((123, 999), (456, 9)).width()
+     );
+     assert_eq!("   :456".len(), HunkHeader::new((0, 0), (456, 9)).width());
+-    assert_eq!(MAX_MARGIN, 2 * width1(usize::max_value()) + 1);
++    assert_eq!(MAX_MARGIN, 2 * width1(u64::max_value()) + 1);
+ }
diff --git a/srcpkgs/diffr/template b/srcpkgs/diffr/template
index 05705ce66ac..10779482c19 100644
--- a/srcpkgs/diffr/template
+++ b/srcpkgs/diffr/template
@@ -1,6 +1,6 @@
 # Template file for 'diffr'
 pkgname=diffr
-version=0.1.3
+version=0.1.4
 revision=1
 build_style=cargo
 short_desc="LCS based diff highlighting tool to ease code review from your terminal"
@@ -9,7 +9,8 @@ license="MIT"
 homepage="https://github.com/mookid/diffr"
 changelog="https://github.com/mookid/diffr/raw/master/CHANGELOG.md"
 distfiles="https://github.com/mookid/diffr/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
-checksum=7fd8c078a1b94140624a5a021eef059a916f79cdf21cfba7489f83be8fadfaa2
+checksum=2613b57778df4466a20349ef10b9e022d0017b4aee9a47fb07e78779f444f8cb
+patch_args="-Np1"
 
 do_install() {
 	vbin "target/${RUST_TARGET}/release/diffr"

  parent reply	other threads:[~2020-05-18 16:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-17 12:08 [PR PATCH] " atweiden
2020-05-17 12:29 ` atweiden
2020-05-18  4:04 ` [PR PATCH] [Updated] " atweiden
2020-05-18 11:34 ` Piraty
2020-05-18 11:36 ` Piraty
2020-05-18 11:36 ` Piraty
2020-05-18 12:26 ` [PR PATCH] [Updated] " atweiden
2020-05-18 13:32 ` atweiden
2020-05-18 16:08 ` atweiden [this message]
2020-05-18 16:32 ` [PR PATCH] [Merged]: " Piraty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200518160811.SrFolVLPsCYbSpBSd8qGQpsuZGTCnnN6hFqDEKgMU6E@z \
    --to=atweiden@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).