From nobody Wed Apr 5 19:04:56 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PsDbD2myfz441Tf; Wed, 5 Apr 2023 19:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PsDbD2HVFz4DnF; Wed, 5 Apr 2023 19:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680721496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oYfle12TL3Wnhof0e7O5+lDvpnJZNKzcQ//wQ7pac8Q=; b=d5XbWheOmz1YSaYp3mLoupwBO/mJS2pemHNVOETkauS5WBP9tum1//lgEv4V27uxX0O1At gTffiSBHKyoQ/JhczutYh+R6qkjoaw3OFDINcKCMzqQhVL8JkyV9ryRsq0Viak5c6AwTHJ PCF38hZw3byqEpuYVyZJ07fkq7MvjEIq34GALZ25nmO7XIpPQBz0RvDVTHtFlY82aSOs5H S2VXnsaEcIJhgRM+X61hOuhaWYcluqgJ1EeMQbxLJpkmuJn1ELi+rKvq6xD6BSodUzU4ZR tKnb5VTRMyfxu5oaSOElWwve4cwJO6xIjBJxHHB2g8OdoYU2hh+uxX5gHPKDIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680721496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oYfle12TL3Wnhof0e7O5+lDvpnJZNKzcQ//wQ7pac8Q=; b=k7+9+pgzPl43lX8YYuz87D7eSHZq0wqF0KMBII2usSGA2I/28oMuS3hO67xYn6xZSoBroj kQYthvuymV+WOB29B9n/ZM8PzJPXeC3m+diateo2rcFw/bSIlJsAOilOunqUC3iCEEYzIK C7imQ12WZCau9U9a+8zCRqCF3ml6Jjs6GmsOYWQErjryoM3C++42O5O4f5E/hnGJtlHqNw pDVAugRaGRZhM1eiSjSezJV4s9NoxUa/57lPQ8RR0aQJ3TlLQ0Lb6Ke3fKUpOdWMwshMxC /eiVkhgm1qRAMkDNr5wBCRBahWUURIo/19QM1imSbDj4OTcdtmq74MZT+JYlLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680721496; a=rsa-sha256; cv=none; b=LHaqNjEKcLArKm6YidWZeGm+eAp8N5U+B/he89hkf/+nf0wcfd3TEWR5z7nFyeNC21/zUQ HxOpcvn5WjePcvigmVcjIOeLQL1CLx3C/nrjOCGk3MDRWmbwQFyaB9lnUDxLBNxu5uv1ko w+hBBHEzLtixpIr/tUXozoEoOoJJcz1bCsvltVjVINCS/IG8L/FBJRlP6XIzBX7Ex1SSuJ UX1p4W76ug0HHeuL0JQztyeq37BJ5ns4cee7bxGqlxY8niuNtizsZxVPX/x7TvoaZzHoPu /JsDLUjZCuRd1xU622k36l3niDDDtkri/zi67J/SldiJN49w87OLWNn/ayLhaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PsDbD1LHvzZSw; Wed, 5 Apr 2023 19:04:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 335J4uuj045595; Wed, 5 Apr 2023 19:04:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 335J4uhU045594; Wed, 5 Apr 2023 19:04:56 GMT (envelope-from git) Date: Wed, 5 Apr 2023 19:04:56 GMT Message-Id: <202304051904.335J4uhU045594@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: b0a0b0d7211d - main - sysutils/cpu-x: flavorize the port (by popular demand) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0a0b0d7211d557fd8242ca38877e5ce4db97306 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=b0a0b0d7211d557fd8242ca38877e5ce4db97306 commit b0a0b0d7211d557fd8242ca38877e5ce4db97306 Author: Alexey Dokuchaev AuthorDate: 2023-04-05 19:02:36 +0000 Commit: Alexey Dokuchaev 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}