public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ncdu] f43: Use translate-c & arocc sources to build
@ 2026-06-27 20:51 Richard Fearn
0 siblings, 0 replies; only message in thread
From: Richard Fearn @ 2026-06-27 20:51 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ncdu
Branch : f43
Commit : d0d49b688e105bd9941c359ac5614764f9a46125
Author : Richard Fearn <richardfearn@gmail.com>
Date : 2026-06-27T20:32:11+01:00
Stats : +17/-105 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/ncdu/c/d0d49b688e105bd9941c359ac5614764f9a46125?branch=f43
Log:
Use translate-c & arocc sources to build
---
diff --git a/.gitignore b/.gitignore
index 0208a77..2fd21e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
/ncdu-*/
/ncdu-*.tar.gz*
+/translate-c-*.tar.gz
+/arocc-*.tar.gz
diff --git a/ncdu-translate-c.patch b/ncdu-translate-c.patch
deleted file mode 100644
index 3242070..0000000
--- a/ncdu-translate-c.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-diff --git a/build.zig b/build.zig
---- a/build.zig
-+++ b/build.zig
-@@ -3,8 +3,6 @@
-
- const std = @import("std");
-
--const Translator = @import("translate_c").Translator;
--
- const manifest = @import("build.zig.zon");
-
- pub fn build(b: *std.Build) void {
-@@ -14,50 +12,15 @@ pub fn build(b: *std.Build) void {
- const pie = b.option(bool, "pie", "Build with PIE support (by default: target-dependant)");
- const strip = b.option(bool, "strip", "Strip debugging info (by default false)") orelse false;
-
-- const translate_c = b.dependency("translate_c", .{});
-- const t: Translator = .init(translate_c, .{
-- .c_source_file = b.path("src/c.h"),
-+ const c_mod = b.createModule(.{
-+ .root_source_file = b.path("src/c.zig"),
- .target = target,
- .optimize = optimize,
- });
-
-- const use_system_ncurses = b.systemIntegrationOption("ncurses", .{});
-- if (use_system_ncurses) {
-- t.linkSystemLibrary("ncursesw", .{});
-- } else ncurses: {
-- const ncurses_dep = b.lazyDependency("ncurses", .{}) orelse break :ncurses;
--
-- const ncurses = buildNcurses(b, ncurses_dep, target.result, pie);
-- t.run.step.dependOn(&ncurses.step.step);
-- t.addIncludePath(ncurses.inst_dir.path(b, "include/ncursesw"));
-- t.addIncludePath(ncurses.inst_dir.path(b, "include"));
-- t.mod.addObjectFile(ncurses.inst_dir.path(b, "lib/libncursesw.a"));
-- }
-+ c_mod.linkSystemLibrary("ncursesw", .{});
-
-- const use_system_zstd = b.systemIntegrationOption("zstd", .{});
-- if (use_system_zstd) {
-- t.linkSystemLibrary("zstd", .{});
-- } else zstd: {
-- // These are settings used by release process
-- // (for tarballs with static binary)
-- const zstd_dep = b.lazyDependency("zstd", .{
-- .target = target,
-- .optimize = optimize,
--
-- .linkage = .static,
-- .strip = strip,
-- .pie = pie,
--
-- .compression = true,
-- .decompression = true,
-- .dictbuilder = false,
-- .minify = true,
-- .@"exclude-compressors-dfast-and-up" = true,
-- }) orelse break :zstd;
-- const zstd_lib = zstd_dep.artifact("zstd");
-- t.addIncludePath(zstd_lib.getEmittedIncludeTree());
-- t.mod.linkLibrary(zstd_lib);
-- }
-+ c_mod.linkSystemLibrary("zstd", .{});
-
- const main_mod = b.createModule(.{
- .root_source_file = b.path("src/main.zig"),
-@@ -66,7 +29,7 @@ pub fn build(b: *std.Build) void {
- .strip = strip,
- .link_libc = true,
- .imports = &.{
-- .{ .name = "c", .module = t.mod },
-+ .{ .name = "c", .module = c_mod },
- },
- });
-
-diff --git a/build.zig.zon b/build.zig.zon
---- a/build.zig.zon
-+++ b/build.zig.zon
-@@ -11,22 +11,6 @@
-
- .name = .ncdu,
- .version = "2.10.0",
-- .dependencies = .{
-- .translate_c = .{
-- .url = "https://codeberg.org/ziglang/translate-c/archive/1.0.0.tar.gz",
-- .hash = "translate_c-1.0.0-Q_BUWo75BgBmrtWsRz9QVUZlzvsSUUe_IIXD9vmWguhX",
-- },
-- .zstd = .{
-- .url = "https://github.com/allyourcodebase/zstd/archive/refs/tags/1.5.7-2.tar.gz",
-- .hash = "zstd-1.5.7-2-KEItkAMwAADNhCbGaImKrjXjnSA51jcqEbGCA3RasVZ9",
-- .lazy = true,
-- },
-- .ncurses = .{
-- .url = "https://ftp.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz",
-- .hash = "N-V-__8AAMZOFwGYoq9VA4jW9LOy4Ud9bufE7x2ep88NNqFr",
-- .lazy = true,
-- },
-- },
- .paths = .{
- "LICENSES/MIT.txt",
- // "LICENSES/CC0-1.0.txt" not included, because files with this license
diff --git a/ncdu.spec b/ncdu.spec
index b9b6a2e..a0adb13 100644
--- a/ncdu.spec
+++ b/ncdu.spec
@@ -1,14 +1,20 @@
+%global translate_c_version 1.0.0
+
+# From https://codeberg.org/ziglang/translate-c/src/tag/1.0.0/build.zig.zon#L12
+%global aro_commit 5f5a050569a95ecc40a426f0c3666ae7ef987ede
+
Name: ncdu
Version: 2.10.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Text-based disk usage viewer
License: MIT
URL: https://github.com/BratishkaErik/ncdu
Source0: https://github.com/BratishkaErik/ncdu/releases/download/v%{version}/ncdu-%{version}.tar.gz
+Source1: https://codeberg.org/ziglang/translate-c/archive/%{translate_c_version}.tar.gz#/translate-c-%{translate_c_version}.tar.gz
+Source2: https://github.com/Vexu/arocc/archive/%{aro_commit}.tar.gz#/arocc-%{aro_commit}.tar.gz
Patch0: ncdu-allow-shlib-undefined.patch
-Patch1: ncdu-translate-c.patch
ExclusiveArch: %{zig_arches}
@@ -25,10 +31,11 @@ and provides a fast way to see what directories are using your disk space.
%prep
%autosetup -n ncdu-%{version} -p1
+%zig_fetch %{SOURCE1}
+%zig_fetch %{SOURCE2}
%build
%zig_prep
-%__zig translate-c src/c.h -lc -lncurses > src/c.zig
%zig_build -Dpie
%install
@@ -42,6 +49,9 @@ and provides a fast way to see what directories are using your disk space.
%{_bindir}/ncdu
%changelog
+* Sat Jun 27 2026 Richard Fearn <richardfearn@gmail.com> - 2.10.0-2
+- Use translate-c & arocc sources to build
+
* Thu Jun 25 2026 Richard Fearn <richardfearn@gmail.com> - 2.10.0-1
- Update to 2.10.0 from new upstream (#2487467)
diff --git a/sources b/sources
index 00ba33c..6eb204e 100644
--- a/sources
+++ b/sources
@@ -1 +1,3 @@
SHA512 (ncdu-2.10.0.tar.gz) = ac31728459478310c39e152f5d34f093a8a0f661c83fa9535b84bff5e97e3cc1c388d4eee8005973538b032d194a10f2cce0a90395f8dd3a33474d31a26cad15
+SHA512 (translate-c-1.0.0.tar.gz) = 335a3da698eef3e5f4389d346d441c7be4a4b1265b52ae61213d75c58bcbe3f0ba887c0b1fb1afdaa34ca1faf6399048ea15239038c31e8d723570f119c4a8df
+SHA512 (arocc-5f5a050569a95ecc40a426f0c3666ae7ef987ede.tar.gz) = b040b5651902402580a3a2f4a2b57be1c37723eb374b63631553adf76e9bde54c975e8abb632bcaf5dc2886f1c1785e5528804512e0a87b934d414e9207a3f2b
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-27 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 20:51 [rpms/ncdu] f43: Use translate-c & arocc sources to build Richard Fearn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox