aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2017-03-23 02:56:29 +0800
committerdanfe <danfe@FreeBSD.org>2017-03-23 02:56:29 +0800
commit848b97366c71845113f540e04cb18457f8cb10c7 (patch)
treeabe39b40dc6f4a12654573ca159f082128eaa313
parent2b4094c07cc62772aac28c949c398db8deef0bfb (diff)
downloadfreebsd-ports-gnome-848b97366c71845113f540e04cb18457f8cb10c7.tar.gz
freebsd-ports-gnome-848b97366c71845113f540e04cb18457f8cb10c7.tar.zst
freebsd-ports-gnome-848b97366c71845113f540e04cb18457f8cb10c7.zip
Add a port of RadeonTop, top(1)-like program that displays AMD Radeon GPU
resource utilization. WWW: https://github.com/clbr/radeontop Because GitHub releases (tarballs) are not fetched with correct modification time, set TIMESTAMP to 1477640465 which corresponds to commit c0abadf tagged as this release.
-rw-r--r--sysutils/Makefile3
-rw-r--r--sysutils/radeontop/Makefile42
-rw-r--r--sysutils/radeontop/distinfo3
-rw-r--r--sysutils/radeontop/files/patch-Makefile51
-rw-r--r--sysutils/radeontop/files/patch-translations_Makefile10
-rw-r--r--sysutils/radeontop/pkg-descr7
6 files changed, 115 insertions, 1 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 18360906f901..b700e3859272 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -9,6 +9,7 @@
SUBDIR += DTraceToolkit
SUBDIR += LPRng
SUBDIR += LPRngTool
+ SUBDIR += UEFITool
SUBDIR += abck
SUBDIR += abduco
SUBDIR += abgx360
@@ -913,6 +914,7 @@
SUBDIR += qzeitgeist
SUBDIR += racktables
SUBDIR += radeontool
+ SUBDIR += radeontop
SUBDIR += radmind
SUBDIR += rainbarf
SUBDIR += raincoat
@@ -1181,7 +1183,6 @@
SUBDIR += udfclient
SUBDIR += uefi-edk2-bhyve
SUBDIR += uefi-edk2-bhyve-csm
- SUBDIR += UEFITool
SUBDIR += ufs_copy
SUBDIR += uhidd
SUBDIR += uif2iso
diff --git a/sysutils/radeontop/Makefile b/sysutils/radeontop/Makefile
new file mode 100644
index 000000000000..dc606e95bdb5
--- /dev/null
+++ b/sysutils/radeontop/Makefile
@@ -0,0 +1,42 @@
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= radeontop
+PORTVERSION= 1.0
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Program that shows AMD Radeon GPU resource utilization
+
+LICENSE= GPLv3
+
+LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \
+ libdrm.so:graphics/libdrm
+
+USE_GITHUB= yes
+GH_ACCOUNT= clbr
+
+USES= gmake pkgconfig
+USE_XORG= xcb
+MAKE_ARGS= amdgpu=1
+
+PLIST_FILES= lib/libradeontop_xcb.so \
+ man/man1/radeontop.1.gz \
+ sbin/radeontop
+
+OPTIONS_DEFINE= NLS
+
+NLS_USES= gettext
+NLS_MAKE_ARGS_OFF= nls=0
+NLS_PLIST_FILES= share/locale/ru/LC_MESSAGES/radeontop.mo
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,unknown,v${PORTVERSION}, ; \
+ s,-n,"$$ver" = unknown -a &,' ${WRKSRC}/getver.sh
+ @${REINPLACE_CMD} -e 's,/usr,${PREFIX},' ${WRKSRC}/radeontop.c
+# cdevs do not provide private mappings of any kind
+ @${REINPLACE_CMD} -e 's,MAP_PRIVATE,MAP_SHARED,' \
+ ${WRKSRC}/detect.c
+
+.include <bsd.port.mk>
diff --git a/sysutils/radeontop/distinfo b/sysutils/radeontop/distinfo
new file mode 100644
index 000000000000..542027dafdf6
--- /dev/null
+++ b/sysutils/radeontop/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1477640465
+SHA256 (clbr-radeontop-v1.0_GH0.tar.gz) = a997ea92f38a53d59db4d8e846aec4cc04cee8b79939e89d5eb9e31c57b468fc
+SIZE (clbr-radeontop-v1.0_GH0.tar.gz) = 32677
diff --git a/sysutils/radeontop/files/patch-Makefile b/sysutils/radeontop/files/patch-Makefile
new file mode 100644
index 000000000000..c57d59406e3f
--- /dev/null
+++ b/sysutils/radeontop/files/patch-Makefile
@@ -0,0 +1,51 @@
+--- Makefile.orig 2016-10-28 07:41:05 UTC
++++ Makefile
+@@ -12,7 +12,7 @@
+
+ PREFIX ?= /usr
+ INSTALL ?= install
+-LIBDIR ?= lib
++LIBDIR = lib
+
+ nls ?= 1
+ xcb ?= 1
+@@ -42,6 +42,7 @@ CFLAGS += $(shell pkg-config --cflags nc
+ # Comment this if you don't want translations
+ ifeq ($(nls), 1)
+ CFLAGS += -DENABLE_NLS=1
++ LIBS += -lintl
+ endif
+
+ ifeq ($(amdgpu), 1)
+@@ -62,13 +63,12 @@ LIBS += $(shell pkg-config --libs pciacc
+ LIBS += $(shell pkg-config --libs libdrm)
+ ifeq ($(xcb), 1)
+ xcb_LIBS += $(shell pkg-config --libs xcb xcb-dri2)
+- LIBS += -ldl
+ endif
+
+ # On some distros, you might have to change this to ncursesw
+ LIBS += $(shell pkg-config --libs ncursesw 2>/dev/null || \
+ shell pkg-config --libs ncurses 2>/dev/null || \
+- echo "-lncurses")
++ echo "-lncursesw")
+
+ .PHONY: all clean install man dist
+
+@@ -98,12 +98,12 @@ trans:
+ xgettext -o translations/radeontop.pot -k_ *.c \
+ --package-name radeontop
+
+-install: all
+- $(INSTALL) -D -m755 $(bin) $(DESTDIR)/$(PREFIX)/sbin/$(bin)
++install:
++ $(INSTALL) -m755 $(bin) $(DESTDIR)/$(PREFIX)/sbin
+ ifeq ($(xcb), 1)
+- $(INSTALL) -D -m755 $(xcblib) $(DESTDIR)/$(PREFIX)/$(LIBDIR)/$(xcblib)
++ $(INSTALL) -m755 $(xcblib) $(DESTDIR)/$(PREFIX)/$(LIBDIR)
+ endif
+- $(INSTALL) -D -m644 radeontop.1 $(DESTDIR)/$(PREFIX)/share/man/man1/radeontop.1
++ $(INSTALL) -m644 radeontop.1 $(DESTDIR)/$(MANPREFIX)/man/man1
+ ifeq ($(nls), 1)
+ $(MAKE) -C translations install PREFIX=$(PREFIX)
+ endif
diff --git a/sysutils/radeontop/files/patch-translations_Makefile b/sysutils/radeontop/files/patch-translations_Makefile
new file mode 100644
index 000000000000..74f3b68d6ece
--- /dev/null
+++ b/sysutils/radeontop/files/patch-translations_Makefile
@@ -0,0 +1,10 @@
+--- translations/Makefile.orig 2016-10-28 07:41:05 UTC
++++ translations/Makefile
+@@ -15,6 +15,6 @@ $(obj): $(src)
+ $(MSGFMT) -o $@ $<
+
+ %.inst: %.mo
+- $(INSTALL) -D -m 644 $< $(DESTDIR)/$(PREFIX)/share/locale/$*/LC_MESSAGES/radeontop.mo
++ $(INSTALL) -m 644 $< $(DESTDIR)/$(PREFIX)/share/locale/$*/LC_MESSAGES/radeontop.mo
+
+ install: all $(inst)
diff --git a/sysutils/radeontop/pkg-descr b/sysutils/radeontop/pkg-descr
new file mode 100644
index 000000000000..448ed27e2da6
--- /dev/null
+++ b/sysutils/radeontop/pkg-descr
@@ -0,0 +1,7 @@
+RadeonTop allows one to view AMD Radeon GPU utilization, both for the total
+activity percent and individual blocks.
+
+Total GPU utilization is also valid for OpenCL loads; other blocks are only
+useful in GL loads.
+
+WWW: https://github.com/clbr/radeontop