commit:     8c5842f9cd4372cf3f77c39e4408a4d0a319c3fd
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Sat Jun 13 15:36:18 2020 +0000
Commit:     Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Sat Jun 13 15:36:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8c5842f9

sys-process/nvtop: change IUSE order and move CMAKE_CONF to local

Optimize the ebuild file

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>

 sys-process/nvtop/nvtop-9999.ebuild | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/sys-process/nvtop/nvtop-9999.ebuild 
b/sys-process/nvtop/nvtop-9999.ebuild
index 9ef08c8..594d987 100644
--- a/sys-process/nvtop/nvtop-9999.ebuild
+++ b/sys-process/nvtop/nvtop-9999.ebuild
@@ -19,7 +19,7 @@ fi
 LICENSE="GPL-3"
 SLOT="0"
 
-IUSE="unicode debug"
+IUSE="debug unicode"
 
 RDEPEND="
        sys-libs/ncurses:0=[unicode?]
@@ -32,19 +32,16 @@ BDEPEND="
        virtual/pkgconfig
 "
 
-BUILD_DIR="${WORKDIR}/build"
-
-CMAKE_CONF="
-       !debug? ( -DCMAKE_BUILD_TYPE=Release )
-       debug? ( -DCMAKE_BUILD_TYPE=Debug )
-       unicode? ( -DCURSES_NEED_WIDE=TRUE )
-"
-
 PATCHES=(
        "${FILESDIR}"/${PN}-1.0.0-add-nvml.patch
 )
 
 src_configure() {
+       local CMAKE_CONF="
+               !debug? ( -DCMAKE_BUILD_TYPE=Release )
+               debug? ( -DCMAKE_BUILD_TYPE=Debug )
+               unicode? ( -DCURSES_NEED_WIDE=TRUE )
+       "
        local mycmakeargs=(
                -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
                -DNVML_INCLUDE_DIRS="${S}/include"

Reply via email to