Date: Wed, 5 Apr 2023 19:04:56 GMT From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b0a0b0d7211d - main - sysutils/cpu-x: flavorize the port (by popular demand) Message-ID: <202304051904.335J4uhU045594@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=b0a0b0d7211d557fd8242ca38877e5ce4db97306 commit b0a0b0d7211d557fd8242ca38877e5ce4db97306 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2023-04-05 19:02:36 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2023-04-05 19:02:36 +0000 sysutils/cpu-x: flavorize the port (by popular demand) CPU-X can be used in graphic mode with GTK+3, or in text-based mode with ncurses, subject to build-time configuration. Previously this was controlled via options, but since graphic mode was the default, users who preferred ncurses (console) version had to reconfigure the port and build their own package, which was inconvenient. Now with flavors, everyone should be happy. Requested by: marck et al. --- sysutils/cpu-x/Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/sysutils/cpu-x/Makefile b/sysutils/cpu-x/Makefile index 70041938b6cd..b3ebda4e8be3 100644 --- a/sysutils/cpu-x/Makefile +++ b/sysutils/cpu-x/Makefile @@ -2,6 +2,7 @@ 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 @@ -14,7 +15,7 @@ LIB_DEPENDS= libcpuid.so:sysutils/libcpuid \ libpci.so:devel/libpci \ libstatgrab.so:devel/libstatgrab -USES= cmake ncurses pkgconfig +USES= cmake pkgconfig USE_GITHUB= yes GH_ACCOUNT= TheTumultuousUnicornOfDarkness GH_PROJECT= ${PORTNAME:tu} @@ -22,18 +23,26 @@ CMAKE_OFF= WITH_LIBGLFW WITH_VULKAN WITH_OPENCL PORTDOCS= ChangeLog.md README.md -OPTIONS_DEFINE= DOCS NLS X11 -OPTIONS_DEFAULT= X11 +OPTIONS_DEFINE= DOCS NLS OPTIONS_SUB= yes NLS_USES= gettext NLS_CMAKE_OFF= -DWITH_GETTEXT:BOOL=OFF -X11_DESC= Build GTK+3 frontend in addition to ncurses one -X11_USES= gnome -X11_USE= GNOME=gtk30 -X11_CMAKE_OFF= -DWITH_GTK:BOOL=OFF -X11_VARS= GLIB_SCHEMAS=org.cpu-x.gschema.xml +FLAVORS= gtk3 ncurses + +CONFLICTS_INSTALL= ${FLAVORS:N${FLAVOR}:S/^/${PORTNAME}-/} + +.if ${FLAVOR:U} == ncurses +USES+= ncurses +CMAKE_ARGS+= -DWITH_GTK:BOOL=OFF +PLIST_SUB+= X11="@comment " +.else +USES+= gnome +USE_GNOME= gtk30 +GLIB_SCHEMAS= org.cpu-x.gschema.xml +PLIST_SUB+= X11="" +.endif post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304051904.335J4uhU045594>