commit:     bcc77aef95de5fc30f49f9e05d1864100148f1f7
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  9 21:08:37 2024 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 21:13:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcc77aef

net-analyzer/netdata: autotools removed so use cmake

See: https://github.com/netdata/netdata/pull/15996
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 net-analyzer/netdata/metadata.xml        |  2 +
 net-analyzer/netdata/netdata-9999.ebuild | 79 +++++++++++++-------------------
 2 files changed, 35 insertions(+), 46 deletions(-)

diff --git a/net-analyzer/netdata/metadata.xml 
b/net-analyzer/netdata/metadata.xml
index f1324e58552f..ea8a63a7fd26 100644
--- a/net-analyzer/netdata/metadata.xml
+++ b/net-analyzer/netdata/metadata.xml
@@ -6,6 +6,8 @@
     <name>Craig Andrews</name>
   </maintainer>
   <use>
+    <flag name="aclk">Enable Agent-Cloud Link (ACLK) for securely connecting a 
Netdata Agent to your web browser through Netdata Cloud</flag>
+    <flag name="bpf">Enable the extended Berkeley Packet Filter (eBPF) 
collector to monitor kernel-level metrics about applications with per-second 
granularity</flag>
     <flag name="cloud">Enable Netdata Cloud support</flag>
     <flag name="compression">Enable compression via zlib</flag>
     <flag name="dbengine">Enable the Netdata database engine</flag>

diff --git a/net-analyzer/netdata/netdata-9999.ebuild 
b/net-analyzer/netdata/netdata-9999.ebuild
index 9d37063dbfcd..e6d230c74a3e 100644
--- a/net-analyzer/netdata/netdata-9999.ebuild
+++ b/net-analyzer/netdata/netdata-9999.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 PYTHON_COMPAT=( python{3_9,3_10,3_11} )
 
-inherit autotools fcaps flag-o-matic linux-info optfeature python-single-r1 
systemd toolchain-funcs
+inherit cmake fcaps linux-info optfeature python-single-r1 systemd
 
 if [[ ${PV} == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/netdata/${PN}.git";
@@ -20,7 +20,7 @@ HOMEPAGE="https://github.com/netdata/netdata 
https://my-netdata.io/";
 
 LICENSE="GPL-3+ MIT BSD"
 SLOT="0"
-IUSE="caps cloud +compression cpu_flags_x86_sse2 cups +dbengine ipmi +jsonc 
+lto mongodb mysql nfacct nodejs postgres prometheus +python tor xen"
+IUSE="aclk bpf cloud cups +dbengine ipmi mongodb mysql nfacct nodejs postgres 
prometheus +python tor xen"
 REQUIRED_USE="
        mysql? ( python )
        python? ( ${PYTHON_REQUIRED_USE} )
@@ -41,19 +41,23 @@ RDEPEND="
        net-misc/wget
        sys-apps/util-linux
        app-alternatives/awk
-       caps? ( sys-libs/libcap )
+       sys-libs/libcap
        cups? ( net-print/cups )
+       app-arch/lz4:=
+       app-arch/zstd:=
+       app-arch/brotli:=
        dbengine? (
-               app-arch/lz4:=
                dev-libs/judy
                dev-libs/openssl:=
        )
+       dev-libs/libpcre2:=
        dev-libs/libuv:=
        dev-libs/libyaml
-       cloud? ( dev-libs/protobuf:= )
+       dev-libs/protobuf:=
+       bpf? ( virtual/libelf:= )
        sys-libs/zlib
        ipmi? ( sys-libs/freeipmi )
-       jsonc? ( dev-libs/json-c:= )
+       dev-libs/json-c:=
        mongodb? ( dev-libs/mongo-c-driver )
        nfacct? (
                net-firewall/nfacct
@@ -89,59 +93,42 @@ pkg_setup() {
        linux-info_pkg_setup
 }
 
-src_prepare() {
-       default
-       eautoreconf
-}
-
 src_configure() {
-       if use ppc64; then
-               # bundled dlib does not support vsx on big-endian
-               # https://github.com/davisking/dlib/issues/397
-               [[ $(tc-endian) == big ]] && append-flags -mno-vsx
-       fi
-
-       econf \
-               --localstatedir="${EPREFIX}"/var \
-               --with-user=netdata \
-               --without-bundled-protobuf \
-               $(use_enable cloud) \
-               $(use_enable jsonc) \
-               $(use_enable cups plugin-cups) \
-               $(use_enable dbengine) \
-               $(use_enable nfacct plugin-nfacct) \
-               $(use_enable ipmi plugin-freeipmi) \
-               --disable-exporting-kinesis \
-               $(use_enable lto lto) \
-               $(use_enable mongodb exporting-mongodb) \
-               $(use_enable prometheus exporting-prometheus-remote-write) \
-               $(use_enable xen plugin-xenstat) \
-               $(use_enable cpu_flags_x86_sse2 x86-sse)
-}
-
-src_compile() {
-       emake clean
-       default
+       local mycmakeargs=(
+               -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
+               -DCMAKE_INSTALL_PREFIX=/
+               -DENABLE_ACLK=$(usex aclk)
+               -DENABLE_CLOUD=$(usex cloud)
+               -DENABLE_DBENGINE=$(usex dbengine)
+               -DENABLE_PLUGIN_CUPS=$(usex cups)
+               -DENABLE_PLUGIN_NFACCT=$(usex nfacct)
+               -DENABLE_PLUGIN_FREEIPMI=$(usex ipmi)
+               -DENABLE_EXPORTER_MONGODB=$(usex mongodb)
+               -DENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE=$(usex prometheus)
+               -DENABLE_PLUGIN_XENSTAT=$(usex xen)
+               -DENABLE_PLUGIN_EBPF=$(usex bpf)
+       )
+       cmake_src_configure
 }
 
 src_install() {
-       default
+       cmake_src_install
 
        rm -rf "${D}/var/cache" || die
+       rm -rf "${D}/var/run" || die
 
        keepdir /var/log/netdata
        fowners -Rc netdata:netdata /var/log/netdata
        keepdir /var/lib/netdata
        keepdir /var/lib/netdata/registry
+       keepdir /var/lib/netdata/cloud.d
        fowners -Rc netdata:netdata /var/lib/netdata
 
-       fowners -Rc root:netdata /usr/share/${PN}
-
-       newinitd system/openrc/init.d/netdata ${PN}
-       newconfd system/openrc/conf.d/netdata ${PN}
-       systemd_dounit system/systemd/netdata.service
-       systemd_dounit system/systemd/netdata-updater.service
-       systemd_dounit system/systemd/netdata-updater.timer
+       newinitd "${D}/usr/lib/netdata/system/openrc/init.d/netdata" "${PN}"
+       newconfd "${D}/usr/lib/netdata/system/openrc/conf.d/netdata" "${PN}"
+       systemd_newunit 
"${D}/usr/lib/netdata/system/systemd/netdata.service.v235" netdata.service
+       systemd_dounit 
"${D}/usr/lib/netdata/system/systemd/netdata-updater.service"
+       systemd_dounit 
"${D}/usr/lib/netdata/system/systemd/netdata-updater.timer"
        insinto /etc/netdata
        doins system/netdata.conf
 }

Reply via email to