From 6f2b5750be754f76e5a6395b9441eca691e4cfda Mon Sep 17 00:00:00 2001 From: 0x5c Date: Sat, 7 May 2022 00:39:18 -0400 Subject: [PATCH] New package: riff-2.16 Fixes #36885 --- srcpkgs/riff/patches/doublebuild.patch | 14 ++++++++++++++ srcpkgs/riff/patches/git_version.patch | 15 +++++++++++++++ srcpkgs/riff/template | 16 ++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 srcpkgs/riff/patches/doublebuild.patch create mode 100644 srcpkgs/riff/patches/git_version.patch create mode 100644 srcpkgs/riff/template diff --git a/srcpkgs/riff/patches/doublebuild.patch b/srcpkgs/riff/patches/doublebuild.patch new file mode 100644 index 000000000000..58b870cc18e6 --- /dev/null +++ b/srcpkgs/riff/patches/doublebuild.patch @@ -0,0 +1,14 @@ +Slight hack to prevent a rebuild in the install phase + +-- + +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -19,6 +19,7 @@ + bytecount = "0.6.2" + num_cpus = "1.13.0" + threadpool = "1.8.1" ++syn = {version = "1.0.48", features = ["full"]} + + [dev-dependencies] + pretty_assertions = "0.6.1" diff --git a/srcpkgs/riff/patches/git_version.patch b/srcpkgs/riff/patches/git_version.patch new file mode 100644 index 000000000000..a8eef7dee13a --- /dev/null +++ b/srcpkgs/riff/patches/git_version.patch @@ -0,0 +1,15 @@ +Allow the version to be set to something, otherwise the build breaks + +-- + +--- a/src/main.rs ++++ b/src/main.rs +@@ -61,7 +61,7 @@ + + const PAGER_FORKBOMB_STOP: &str = "_RIFF_IGNORE_PAGER"; + +-const GIT_VERSION: &str = git_version!(); ++const GIT_VERSION: &str = git_version!(cargo_prefix=""); + + fn highlight_diff(input: &mut dyn io::Read, output: W) { + let mut line_collector = LineCollector::new(output); diff --git a/srcpkgs/riff/template b/srcpkgs/riff/template new file mode 100644 index 000000000000..b8ab0028709c --- /dev/null +++ b/srcpkgs/riff/template @@ -0,0 +1,16 @@ +# Template file for 'riff' +pkgname=riff +version=2.16 +revision=1 +build_style=cargo +short_desc="Diff filter highlighting which line parts have changed" +maintainer="0x5c " +license="MIT" +homepage="https://github.com/walles/riff" +distfiles="https://github.com/walles/riff/archive/refs/tags/${version}.tar.gz" +checksum=3f7c8e6f2602b97849422f8ad3e1c9fec7fc8cbaf7e7a8ea0856ee8a9cfe7091 + + +post_install() { + vlicense LICENSE +}