svn commit: r436717 - in head/sysutils: . radeontop radeontop/files

Alexey Dokuchaev danfe at FreeBSD.org
Wed Mar 22 18:56:31 UTC 2017


Author: danfe
Date: Wed Mar 22 18:56:29 2017
New Revision: 436717
URL: https://svnweb.freebsd.org/changeset/ports/436717

Log:
  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.

Added:
  head/sysutils/radeontop/
  head/sysutils/radeontop/Makefile   (contents, props changed)
  head/sysutils/radeontop/distinfo   (contents, props changed)
  head/sysutils/radeontop/files/
  head/sysutils/radeontop/files/patch-Makefile   (contents, props changed)
  head/sysutils/radeontop/files/patch-translations_Makefile   (contents, props changed)
  head/sysutils/radeontop/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Wed Mar 22 18:56:28 2017	(r436716)
+++ head/sysutils/Makefile	Wed Mar 22 18:56:29 2017	(r436717)
@@ -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

Added: head/sysutils/radeontop/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/radeontop/Makefile	Wed Mar 22 18:56:29 2017	(r436717)
@@ -0,0 +1,42 @@
+# Created by: Alexey Dokuchaev <danfe at FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	radeontop
+PORTVERSION=	1.0
+DISTVERSIONPREFIX=	v
+CATEGORIES=	sysutils
+
+MAINTAINER=	danfe at 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>

Added: head/sysutils/radeontop/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/radeontop/distinfo	Wed Mar 22 18:56:29 2017	(r436717)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1477640465
+SHA256 (clbr-radeontop-v1.0_GH0.tar.gz) = a997ea92f38a53d59db4d8e846aec4cc04cee8b79939e89d5eb9e31c57b468fc
+SIZE (clbr-radeontop-v1.0_GH0.tar.gz) = 32677

Added: head/sysutils/radeontop/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/radeontop/files/patch-Makefile	Wed Mar 22 18:56:29 2017	(r436717)
@@ -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

Added: head/sysutils/radeontop/files/patch-translations_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/radeontop/files/patch-translations_Makefile	Wed Mar 22 18:56:29 2017	(r436717)
@@ -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)

Added: head/sysutils/radeontop/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/radeontop/pkg-descr	Wed Mar 22 18:56:29 2017	(r436717)
@@ -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


More information about the svn-ports-head mailing list