summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoréclairevoyant2023-06-23 09:27:12 -0400
committeréclairevoyant2023-06-23 09:27:12 -0400
commit447556b56f4f1d4dd704ade31b63dc6d354ce8b6 (patch)
tree9a9410bfa4b2d88bebc70781c890d71f0f354f53
parentddd9cee4cec25f318163c48be4ecef7a27178a7e (diff)
downloadaur-447556b56f4f1d4dd704ade31b63dc6d354ce8b6.tar.gz
eww-git: patch to comply with rust-lang/rfcs#2140
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore1
-rw-r--r--0001-comply-with-rust-lang-rfcs-2140.patch57
-rw-r--r--PKGBUILD11
4 files changed, 70 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2438b9b4c5df..739b464c718a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = eww-git
pkgdesc = ElKowar's wacky widgets
- pkgver = 0.4.0.r28.ge762068
- pkgrel = 2
+ pkgver = 0.4.0.r34.g25e50ed
+ pkgrel = 1
url = https://github.com/elkowar/eww
install = eww-git.install
arch = x86_64
@@ -13,9 +13,11 @@ pkgbase = eww-git
provides = eww
conflicts = eww
source = git+https://github.com/elkowar/eww.git?signed
+ source = 0001-comply-with-rust-lang-rfcs-2140.patch
validpgpkeys = 94E8F34BCE4F4BA8ED9B29BD50E76B4711E4C3E4
validpgpkeys = 5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23
b2sums = SKIP
+ b2sums = fafbf79bd0c74780e53887784102102758e2d3a411c2c95fb77b5cb75b4c9bb53cda92b9b80e463704a38edb5161187f86c5c57dcb32bd768fd56addc2df937b
pkgname = eww-x11-git
pkgdesc = ElKowar's wacky widgets (X11 backend)
diff --git a/.gitignore b/.gitignore
index f79e632eafb4..8ab73c8e4fcd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
!/.SRCINFO
!/PKGBUILD
!/eww-git.install
+!/0001-comply-with-rust-lang-rfcs-2140.patch
diff --git a/0001-comply-with-rust-lang-rfcs-2140.patch b/0001-comply-with-rust-lang-rfcs-2140.patch
new file mode 100644
index 000000000000..320ac5a9c5f5
--- /dev/null
+++ b/0001-comply-with-rust-lang-rfcs-2140.patch
@@ -0,0 +1,57 @@
+From 2bb7084425994bf70a69ee52f5917dd3fa1185ba Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=A9clairevoyant?=
+ <848000+eclairevoyant@users.noreply.github.com>
+Date: Fri, 23 Jun 2023 09:21:29 -0400
+Subject: [PATCH] comply with rust-lang/rfcs#2140
+
+---
+ crates/eww/src/error_handling_ctx.rs | 2 +-
+ crates/eww/src/main.rs | 4 ++--
+ crates/eww/src/widgets/widget_definitions.rs | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/crates/eww/src/error_handling_ctx.rs b/crates/eww/src/error_handling_ctx.rs
+index 3273200..8a57e35 100644
+--- a/crates/eww/src/error_handling_ctx.rs
++++ b/crates/eww/src/error_handling_ctx.rs
+@@ -53,7 +53,7 @@ pub fn anyhow_err_to_diagnostic(err: &anyhow::Error) -> Option<Diagnostic<usize>
+ }
+
+ pub fn stringify_diagnostic(mut diagnostic: codespan_reporting::diagnostic::Diagnostic<usize>) -> anyhow::Result<String> {
+- diagnostic.labels.drain_filter(|label| Span(label.range.start, label.range.end, label.file_id).is_dummy());
++ diagnostic.labels.extract_if(|label| Span(label.range.start, label.range.end, label.file_id).is_dummy());
+
+ let mut config = term::Config::default();
+ let mut chars = Chars::box_drawing();
+diff --git a/crates/eww/src/main.rs b/crates/eww/src/main.rs
+index 1e61c3b..9211d03 100644
+--- a/crates/eww/src/main.rs
++++ b/crates/eww/src/main.rs
+@@ -1,9 +1,9 @@
+ #![feature(trace_macros)]
+-#![feature(drain_filter)]
++#![feature(extract_if)]
+ #![feature(box_patterns)]
+ #![feature(slice_concat_trait)]
+ #![feature(try_blocks)]
+-#![feature(hash_drain_filter)]
++#![feature(hash_extract_if)]
+ #![allow(rustdoc::private_intra_doc_links)]
+
+ extern crate gtk;
+diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs
+index 2cdc907..a142940 100644
+--- a/crates/eww/src/widgets/widget_definitions.rs
++++ b/crates/eww/src/widgets/widget_definitions.rs
+@@ -127,7 +127,7 @@ static DEPRECATED_ATTRS: Lazy<HashSet<&str>> =
+ /// @desc these properties apply to _all_ widgets, and can be used anywhere!
+ pub(super) fn resolve_widget_attrs(bargs: &mut BuilderArgs, gtk_widget: &gtk::Widget) -> Result<()> {
+ let deprecated: HashSet<_> = DEPRECATED_ATTRS.to_owned();
+- let contained_deprecated: Vec<_> = bargs.unhandled_attrs.drain_filter(|a, _| deprecated.contains(&a.0 as &str)).collect();
++ let contained_deprecated: Vec<_> = bargs.unhandled_attrs.extract_if(|a, _| deprecated.contains(&a.0 as &str)).collect();
+ if !contained_deprecated.is_empty() {
+ let diag = error_handling_ctx::stringify_diagnostic(gen_diagnostic! {
+ kind = Severity::Error,
+--
+2.41.0
+
diff --git a/PKGBUILD b/PKGBUILD
index ff3ef2b137de..c41a3e7f5761 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname=eww
pkgbase="$_pkgname-git"
pkgname=($_pkgname-{x11,wayland}-git)
-pkgver=0.4.0.r32.gb31e397
+pkgver=0.4.0.r34.g25e50ed
pkgrel=1
pkgdesc="ElKowar's wacky widgets"
arch=(x86_64)
@@ -15,8 +15,10 @@ makedepends=(cargo-nightly git)
provides=("$_pkgname")
conflicts=("$_pkgname")
install=$pkgbase.install
-source=("git+$url.git?signed")
-b2sums=('SKIP')
+source=("git+$url.git?signed"
+ 0001-comply-with-rust-lang-rfcs-2140.patch)
+b2sums=('SKIP'
+ 'fafbf79bd0c74780e53887784102102758e2d3a411c2c95fb77b5cb75b4c9bb53cda92b9b80e463704a38edb5161187f86c5c57dcb32bd768fd56addc2df937b')
validpgpkeys=(
'94E8F34BCE4F4BA8ED9B29BD50E76B4711E4C3E4' # Leon Kowarschick <5300871+elkowar@users.noreply.github.com>
'5DE3E0509C47EA3CF04A42D34AEE18F83AFDEB23' # GitHub (web-flow commit signing) <noreply@github.com>
@@ -24,6 +26,9 @@ validpgpkeys=(
prepare() {
cd $_pkgname
+
+ patch -Np1 -i "$srcdir/0001-comply-with-rust-lang-rfcs-2140.patch"
+
export RUSTUP_TOOLCHAIN=nightly
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}