git: 2f8328651233 - 2023Q2 - sysutils/cpu-x: try to further improve the port (part one)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Apr 2023 15:23:49 UTC
The branch 2023Q2 has been updated by jrm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=2f8328651233b3c95b59b952fadf6b09b9ca3618
commit 2f8328651233b3c95b59b952fadf6b09b9ca3618
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-04-07 14:23:10 +0000
Commit: Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2023-04-12 15:23:04 +0000
sysutils/cpu-x: try to further improve the port (part one)
- Setting PKGNAMESUFFIX=-${FLAVOR} for all flavors was actually
misleading: graphic version (GTK+) includes ncurses UI as well,
so mark the console-only one as such (`tuionly') while keeping
the full package unsuffixed
- Assembler is only used to translate two x86 files which belong
to the memory bandwidth code, make it conditional based on the
${ARCH} and thus (hopefully) unbreak the build on !x86
PR: 251785
(cherry picked from commit ca9e112b42fdc623acc09e7ec5707249e08fa6ad)
---
sysutils/cpu-x/Makefile | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/sysutils/cpu-x/Makefile b/sysutils/cpu-x/Makefile
index b3ebda4e8be3..811747b4be5d 100644
--- a/sysutils/cpu-x/Makefile
+++ b/sysutils/cpu-x/Makefile
@@ -2,7 +2,6 @@ PORTNAME= cpu-x
PORTVERSION= 4.5.3
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
-PKGNAMESUFFIX= -${FLAVOR}
MAINTAINER= danfe@FreeBSD.org
COMMENT= Gathers information about CPU, motherboard, and more
@@ -10,7 +9,6 @@ WWW= https://thetumultuousunicornofdarkness.github.io/CPU-X/
LICENSE= GPLv3+
-BUILD_DEPENDS= nasm:devel/nasm
LIB_DEPENDS= libcpuid.so:sysutils/libcpuid \
libpci.so:devel/libpci \
libstatgrab.so:devel/libstatgrab
@@ -34,6 +32,7 @@ FLAVORS= gtk3 ncurses
CONFLICTS_INSTALL= ${FLAVORS:N${FLAVOR}:S/^/${PORTNAME}-/}
.if ${FLAVOR:U} == ncurses
+PKGNAMESUFFIX= -tuionly
USES+= ncurses
CMAKE_ARGS+= -DWITH_GTK:BOOL=OFF
PLIST_SUB+= X11="@comment "
@@ -44,8 +43,16 @@ GLIB_SCHEMAS= org.cpu-x.gschema.xml
PLIST_SUB+= X11=""
.endif
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == i386 || ${ARCH} == amd64
+BUILD_DEPENDS+= nasm:devel/nasm
+.else
+CMAKE_OFF+= WITH_BANDWIDTH
+.endif
+
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>