# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit cmake flag-o-matic GIT_COMMIT=e4fe32824ffca45c1fb1c408152094a3d4e486ef DESCRIPTION="System information and benchmark tool for Linux systems" HOMEPAGE="https://github.com/lpereira/hardinfo" SRC_URI="https://github.com/lpereira/hardinfo/archive/${GIT_COMMIT}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="gtk2 debug" RDEPEND="gtk2? ( >=x11-libs/gtk+-2.10:2 ) !gtk2? ( >=x11-libs/gtk+-3.0:3 >=x11-libs/cairo-1.0 ) dev-libs/json-glib >=dev-libs/glib-2.10:2 >=net-libs/libsoup-2.42:2.4 sys-libs/zlib" DEPEND="${RDEPEND} virtual/pkgconfig" S="${WORKDIR}/${PN}-${GIT_COMMIT}" src_configure() { #Matching Debug behaviour in CMakeLists.txt: #if(${CMAKE_BUILD_TYPE} MATCHES [Dd]ebug) # set(HARDINFO_DEBUG 1) # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") #endif() use debug && append-flags -fsanitize=address mycmakeargs=( -DHARDINFO_GTK3=$(usex gtk2 0 1) -DHARDINFO_DEBUG=$(usex debug 1 0) ) cmake_src_configure }