aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2023-04-07 14:23:10 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2023-04-07 14:23:10 +0000
commitca9e112b42fdc623acc09e7ec5707249e08fa6ad (patch)
tree817f61a7a421b39bfcc092427c9ed8bfb0401a8e
parent73dbc16c1eb5535765ab7bc9a15e75d6d9b8a0b7 (diff)
downloadports-ca9e112b42fdc623acc09e7ec5707249e08fa6ad.tar.gz
ports-ca9e112b42fdc623acc09e7ec5707249e08fa6ad.zip
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
-rw-r--r--sysutils/cpu-x/Makefile13
1 files 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>