Skip to content

Commit 0d32b6c

Browse files
committed
sysutils/yazi: make this build on NetBSD/macppc.
Predominant is the use of portable_atomic instead of the std crate. Bump PKGREVISION.
1 parent a0842c4 commit 0d32b6c

11 files changed

Lines changed: 189 additions & 3 deletions

sysutils/yazi/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# $NetBSD: Makefile,v 1.28 2025/07/21 22:00:55 wiz Exp $
1+
# $NetBSD: Makefile,v 1.29 2025/07/22 14:36:15 he Exp $
22

33
DISTNAME= yazi-25.5.31
44
PKGREVISION= 1
55
CATEGORIES= sysutils
66
MASTER_SITES= ${MASTER_SITE_GITHUB:=sxyazi/}
77
GITHUB_TAG= v${PKGVERSION_NOREV}
8+
PKGREVISION= 1
89

910
MAINTAINER= pkgsrc-users@NetBSD.org
1011
HOMEPAGE= https://github.com/sxyazi/yazi/

sysutils/yazi/cargo-depends.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: cargo-depends.mk,v 1.22 2025/07/01 19:14:19 wiz Exp $
1+
# $NetBSD: cargo-depends.mk,v 1.23 2025/07/22 14:36:15 he Exp $
22

33
CARGO_CRATE_DEPENDS+= addr2line-0.24.2
44
CARGO_CRATE_DEPENDS+= adler2-2.0.0
@@ -202,6 +202,7 @@ CARGO_CRATE_DEPENDS+= pin-utils-0.1.0
202202
CARGO_CRATE_DEPENDS+= pkg-config-0.3.32
203203
CARGO_CRATE_DEPENDS+= plist-1.7.1
204204
CARGO_CRATE_DEPENDS+= png-0.17.16
205+
CARGO_CRATE_DEPENDS+= portable-atomic-1.11.1
205206
CARGO_CRATE_DEPENDS+= powerfmt-0.2.0
206207
CARGO_CRATE_DEPENDS+= ppv-lite86-0.2.21
207208
CARGO_CRATE_DEPENDS+= proc-macro-error-attr2-2.0.0

sysutils/yazi/distinfo

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$NetBSD: distinfo,v 1.25 2025/07/21 22:00:55 wiz Exp $
1+
$NetBSD: distinfo,v 1.26 2025/07/22 14:36:15 he Exp $
22

33
BLAKE2s (addr2line-0.24.2.crate) = 5bdb03ff8621c0993eda0ec3682c467ad3fc0015f48e46a70779bbd4bfbe8267
44
SHA512 (addr2line-0.24.2.crate) = 39cbec3c920ffc0f37584afb55e1cfe4f182e4415319a4e9bfe842360f102f7b9315f6171c0cf71ba0337123903e604096cd573fe98698a26c8eebc2376d965b
@@ -606,6 +606,9 @@ Size (plist-1.7.1.crate) = 102902 bytes
606606
BLAKE2s (png-0.17.16.crate) = b7004f600e3b71a4f2896eaca9ddcaf770c675e794202b8917b8ddb58d0e3800
607607
SHA512 (png-0.17.16.crate) = fd9130d8d91fe40724f4065748bf1a6175de0b7e8df521939f169000933dadd0815bed0f95c00d12bf5ad341469983ea97be427392a85b82c232473ea753b6ba
608608
Size (png-0.17.16.crate) = 117975 bytes
609+
BLAKE2s (portable-atomic-1.11.1.crate) = 3758e723fa680cf28dc6cc870b7f521f37f8a3abf788e07b7178f9c875a53d29
610+
SHA512 (portable-atomic-1.11.1.crate) = 4c037ae0b4aef43077bdbf803389bc078d963f20d023e2e1d339a54f67fa9b27c174e7c1b6eca8881ecf301e30c431632d2c0dcedfb5b19552892fac0f81e2e1
611+
Size (portable-atomic-1.11.1.crate) = 185506 bytes
609612
BLAKE2s (powerfmt-0.2.0.crate) = bdb2e56103b2ec9bd76d865753db13d6e94acfe71e1196ee3b4e7e51efeb7cd6
610613
SHA512 (powerfmt-0.2.0.crate) = 0623f92e4d6ab284b3f6dae58220d79d9185df4a738999d68040c50d72fe0380d70358cb622f079c629bab53bb03c6e085e165d5bddfbeea84245864fed90029
611614
Size (powerfmt-0.2.0.crate) = 15165 bytes
@@ -1080,4 +1083,12 @@ Size (zune-inflate-0.2.54.crate) = 37973 bytes
10801083
BLAKE2s (zune-jpeg-0.4.14.crate) = 30b1e0c577996dc406e9b3740208a6ca5481c3eaefb0dab371b4b4331a4a0a9f
10811084
SHA512 (zune-jpeg-0.4.14.crate) = 1f62cd2c3f5bc1773a7654aadf45b02aec0384c0abad4c77210e9bc2c05533f47e63a6d44fa1596dc9103d7569079be7266905421f91091f77536c1407f3a0e5
10821085
Size (zune-jpeg-0.4.14.crate) = 63388 bytes
1086+
SHA1 (patch-.._vendor_async-priority-channel-0.2.0_Cargo.toml) = af01f6ee00de93298e7b960a7e8fdab892583327
1087+
SHA1 (patch-.._vendor_async-priority-channel-0.2.0_src_awaitable__atomics.rs) = 7ffcc8fabf7ead8aa6e26d8093ea8bc77a0a49b1
1088+
SHA1 (patch-Cargo.lock) = 549853d270295065bac4d52151463d42bc60a2af
10831089
SHA1 (patch-yazi-core_src_mgr_watcher.rs) = f505d398d6672ab16fa50dd3083f9444a56c687c
1090+
SHA1 (patch-yazi-dds_Cargo.toml) = 46d41b0529b8ef54c794ee905fb1f16ae61a4429
1091+
SHA1 (patch-yazi-dds_src_state.rs) = af4d8cedfab8f2641eb140823fc2838405de5b36
1092+
SHA1 (patch-yazi-shared_Cargo.toml) = 087d2f9a240bd3ffb263a878906cac27bf171894
1093+
SHA1 (patch-yazi-shared_src_id.rs) = 33ed3dcf4262cdfbb3e35ea25cbd4c7caa95284e
1094+
SHA1 (patch-yazi-shared_src_throttle.rs) = 2fd856c98b89a847fc12b42535edb016b3ed123c
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
$NetBSD: patch-.._vendor_async-priority-channel-0.2.0_Cargo.toml,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
Regen'ed and with portable-atomic.
4+
5+
--- ../vendor/async-priority-channel-0.2.0/Cargo.toml.orig 2006-07-24 01:21:28.000000000 +0000
6+
+++ ../vendor/async-priority-channel-0.2.0/Cargo.toml
7+
@@ -1,21 +1,52 @@
8+
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
9+
+#
10+
+# When uploading crates to the registry Cargo will automatically
11+
+# "normalize" Cargo.toml files for maximal compatibility
12+
+# with all versions of Cargo and also rewrite `path` dependencies
13+
+# to registry (e.g., crates.io) dependencies.
14+
+#
15+
+# If you are reading this file be aware that the original Cargo.toml
16+
+# will likely look very different (and much more reasonable).
17+
+# See Cargo.toml.orig for the original contents.
18+
+
19+
[package]
20+
+edition = "2018"
21+
name = "async-priority-channel"
22+
-description = "An async channel where pending messages are delivered in order of priority"
23+
version = "0.2.0"
24+
authors = ["Robert T. McGibbon <rmcgibbo@gmail.com>"]
25+
-edition = "2018"
26+
-license = "Apache-2.0 OR MIT"
27+
-repository = "https://github.com/rmcgibbo/async-priority-channel"
28+
+description = "An async channel where pending messages are delivered in order of priority"
29+
homepage = "https://github.com/rmcgibbo/async-priority-channel"
30+
documentation = "https://docs.rs/async-priority-channel"
31+
-keywords = ["mpmc", "mpsc", "spmc", "chan", "futures"]
32+
-categories = ["asynchronous", "concurrency"]
33+
-resolver = "2"
34+
readme = "README.md"
35+
+keywords = [
36+
+ "mpmc",
37+
+ "mpsc",
38+
+ "spmc",
39+
+ "chan",
40+
+ "futures",
41+
+]
42+
+categories = [
43+
+ "asynchronous",
44+
+ "concurrency",
45+
+]
46+
+license = "Apache-2.0 OR MIT"
47+
+repository = "https://github.com/rmcgibbo/async-priority-channel"
48+
+resolver = "2"
49+
50+
[dependencies]
51+
-event-listener = "4.0.0"
52+
+portable-atomic = "1"
53+
+
54+
+[dependencies.event-listener]
55+
+version = "4.0.0"
56+
+
57+
+[dev-dependencies.futures-lite]
58+
+version = "2.1.0"
59+
60+
-[dev-dependencies]
61+
-futures-lite = "2.1.0"
62+
-tokio = { version = "1.35.0", features = ["sync", "rt-multi-thread", "macros", "time"] }
63+
+[dev-dependencies.tokio]
64+
+version = "1.35.0"
65+
+features = [
66+
+ "sync",
67+
+ "rt-multi-thread",
68+
+ "macros",
69+
+ "time",
70+
+]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$NetBSD: patch-.._vendor_async-priority-channel-0.2.0_src_awaitable__atomics.rs,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
--- ../vendor/async-priority-channel-0.2.0/src/awaitable_atomics.rs.orig 2025-07-22 13:53:56.573453513 +0000
4+
+++ ../vendor/async-priority-channel-0.2.0/src/awaitable_atomics.rs
5+
@@ -1,8 +1,8 @@
6+
use event_listener::{Event, EventListener};
7+
use std::{
8+
pin::Pin,
9+
- sync::atomic::{AtomicU64, Ordering},
10+
};
11+
+use portable_atomic::{AtomicU64, Ordering};
12+
13+
const U64_TOP_BIT_MASK: u64 = 0x1000000000000000;
14+

sysutils/yazi/patches/patch-Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$NetBSD: patch-yazi-dds_Cargo.toml,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
Use portable-atomic.
4+
5+
--- yazi-dds/Cargo.toml.orig 2025-07-22 13:32:21.086791774 +0000
6+
+++ yazi-dds/Cargo.toml
7+
@@ -13,6 +13,7 @@ default = [ "vendored-lua" ]
8+
vendored-lua = [ "mlua/vendored" ]
9+
10+
[dependencies]
11+
+portable-atomic = "1"
12+
yazi-binding = { path = "../yazi-binding", version = "25.4.8" }
13+
yazi-boot = { path = "../yazi-boot", version = "25.4.8" }
14+
yazi-fs = { path = "../yazi-fs", version = "25.4.8" }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$NetBSD: patch-yazi-dds_src_state.rs,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
Use portable_atomic.
4+
5+
--- yazi-dds/src/state.rs.orig 2025-07-22 13:30:48.088532978 +0000
6+
+++ yazi-dds/src/state.rs
7+
@@ -1,4 +1,5 @@
8+
-use std::{collections::HashMap, mem, ops::Deref, sync::atomic::{AtomicU64, Ordering}, time::UNIX_EPOCH};
9+
+use std::{collections::HashMap, mem, ops::Deref, time::UNIX_EPOCH};
10+
+use portable_atomic::{AtomicU64, Ordering};
11+
12+
use anyhow::Result;
13+
use parking_lot::RwLock;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$NetBSD: patch-yazi-shared_Cargo.toml,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
--- yazi-shared/Cargo.toml.orig 2025-07-22 12:13:51.218622996 +0000
4+
+++ yazi-shared/Cargo.toml
5+
@@ -19,6 +19,7 @@ futures = { workspace = true }
6+
memchr = "2.7.4"
7+
parking_lot = { workspace = true }
8+
percent-encoding = "2.3.1"
9+
+portable-atomic = "1"
10+
ratatui = { workspace = true }
11+
serde = { workspace = true }
12+
tokio = { workspace = true }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$NetBSD: patch-yazi-shared_src_id.rs,v 1.1 2025/07/22 14:36:15 he Exp $
2+
3+
Use portable_atomic.
4+
5+
--- yazi-shared/src/id.rs.orig 2025-07-22 12:15:08.593611533 +0000
6+
+++ yazi-shared/src/id.rs
7+
@@ -1,4 +1,5 @@
8+
-use std::{fmt::Display, str::FromStr, sync::atomic::{AtomicU64, Ordering}};
9+
+use std::{fmt::Display, str::FromStr};
10+
+use portable_atomic::{AtomicU64, Ordering};
11+
12+
use serde::{Deserialize, Serialize};
13+

0 commit comments

Comments
 (0)