🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=gotop
PKG_VERSION:=4.2.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/xxxserxxx/gotop/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
GO_PKG:=github.com/xxxserxxx/gotop
GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
define Package/gotop
SECTION:=admin
CATEGORY:=Administration
TITLE:=A terminal based graphical activity monitor
URL:=https://github.com/xxxserxxx/gotop
DEPENDS:=$(GO_ARCH_DEPENDS)
endef
define Package/gotop/description
Another terminal based graphical activity monitor.
endef
$(eval $(call GoBinPackage,gotop))
$(eval $(call BuildPackage,gotop))
@@ -0,0 +1,76 @@
From 658926bd0fa8e15c75c4db1426f2b20307312870 Mon Sep 17 00:00:00 2001
From: Camber Huang <camber@poi.science>
Date: Mon, 9 May 2022 14:04:06 +0800
Subject: [PATCH] Fix build failure on riscv64 caused by missing syscall
On RISC-V 64-bit linux systems, syscall `dup2()` is not available, therefore
syscall.Dup2 will be undefined and gotop will fail to be built from soure.
This patch updates building target of logging/logging_{other,arm64} and
renames them based on syscall used.
---
logging/{logging_other.go => logging_dup2.go} | 2 +-
logging/{logging_arm64.go => logging_dup3.go} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename logging/{logging_other.go => logging_dup2.go} (67%)
rename logging/{logging_arm64.go => logging_dup3.go} (73%)
--- a/logging/logging_other.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build linux,!arm64 openbsd,!arm64 freebsd darwin
-
-package logging
-
-import (
- "os"
- "syscall"
-)
-
-func stderrToLogfile(logfile *os.File) {
- syscall.Dup2(int(logfile.Fd()), 2)
-}
--- /dev/null
+++ b/logging/logging_dup2.go
@@ -0,0 +1,12 @@
+// +build linux,!arm64,!riscv64 openbsd,!arm64 freebsd darwin
+
+package logging
+
+import (
+ "os"
+ "syscall"
+)
+
+func stderrToLogfile(logfile *os.File) {
+ syscall.Dup2(int(logfile.Fd()), 2)
+}
--- a/logging/logging_arm64.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// +build !freebsd,!darwin,arm64
-
-package logging
-
-import (
- "os"
- "syscall"
-)
-
-func stderrToLogfile(logfile *os.File) {
- syscall.Dup3(int(logfile.Fd()), 2, 0)
-}
--- /dev/null
+++ b/logging/logging_dup3.go
@@ -0,0 +1,12 @@
+// +build !freebsd,!darwin,arm64 linux,riscv64
+
+package logging
+
+import (
+ "os"
+ "syscall"
+)
+
+func stderrToLogfile(logfile *os.File) {
+ syscall.Dup3(int(logfile.Fd()), 2, 0)
+}