From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1590403-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 1D5E5158451
	for <garchives@archives.gentoo.org>; Sun, 14 Jan 2024 03:40:36 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 09273E29F6;
	Sun, 14 Jan 2024 03:40:35 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E659AE29F6
	for <gentoo-commits@lists.gentoo.org>; Sun, 14 Jan 2024 03:40:34 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 1229F3431D9
	for <gentoo-commits@lists.gentoo.org>; Sun, 14 Jan 2024 03:40:34 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2E5C712C8
	for <gentoo-commits@lists.gentoo.org>; Sun, 14 Jan 2024 03:40:32 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1705202891.8b809da15b1d7008375f2cbfb4658d37df62205e.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/atop/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-process/atop/Manifest sys-process/atop/atop-2.10.0.ebuild
X-VCS-Directories: sys-process/atop/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 8b809da15b1d7008375f2cbfb4658d37df62205e
X-VCS-Branch: master
Date: Sun, 14 Jan 2024 03:40:32 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 9d1a1dc8-3db4-4dc0-8766-100f30ae13fc
X-Archives-Hash: bc161b7dc07c554c35ed56b40b170163

commit:     8b809da15b1d7008375f2cbfb4658d37df62205e
Author:     Michael Vetter <jubalh <AT> iodoru <DOT> org>
AuthorDate: Fri Jan  5 07:35:53 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 03:28:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b809da1

sys-process/atop: add 2.10.0

Signed-off-by: Michael Vetter <jubalh <AT> iodoru.org>
Closes: https://github.com/gentoo/gentoo/pull/34652
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/atop/Manifest           |   1 +
 sys-process/atop/atop-2.10.0.ebuild | 110 ++++++++++++++++++++++++++++++++++++
 2 files changed, 111 insertions(+)

diff --git a/sys-process/atop/Manifest b/sys-process/atop/Manifest
index 9aea42ae1dd6..abd98674fa7a 100644
--- a/sys-process/atop/Manifest
+++ b/sys-process/atop/Manifest
@@ -1,2 +1,3 @@
+DIST atop-2.10.0.tar.gz 296569 BLAKE2B 8c6e56978cb32e4e80c7344f631d6fd3dd034ff785e6b2db1b80556aaea30a0feeb413704128150ba0d7b1b4eaeb6cb5699a1b2661060ac53c10f7025997418e SHA512 22e39799aa7c090c68d8ac2f02646fb9586122bdb83de9d90bc3119bd290c557faa0489cdc8640fc4fd1f1155c231b1d70dae1b22dc6102ba0327fdd4b5f7029
 DIST atop-2.9.0.tar.gz 282412 BLAKE2B 8531eee3bffabfb3cacdb6bea4c4a1b7ea56da878154a86edd80fb20ddffc5f56248d06c679bd8933c203a0174e97515cfce633a2387bf465399d4203ca857c2 SHA512 f055466c076491a54fc45a482209fd3de60013e7b76af46b65dffe82d220fbd96eb11d5f199aa27e2f7a8754fe3c6509c44bf0dbd6e3099d8f5710944e01cb38
 DIST netatop-3.1.tar.gz 22812 BLAKE2B 1b1faebf1392a57db6b4662192f90821289c8fc40c2c1ee0ad61feeeee6477c4d091744a1e82cdd987baf59f8dd71fc6d242d6dd294b8fb29b9447a9d5055996 SHA512 b12fd2287d89d3a8277f8fb540a19e6d26aa26c3f88e7ae2e6601b63f78d642e73b8d16cf351f6979ce7bbf53251b9c1faa76798a87f70cf3dcf51279eb0db68

diff --git a/sys-process/atop/atop-2.10.0.ebuild b/sys-process/atop/atop-2.10.0.ebuild
new file mode 100644
index 000000000000..9bd1a191304c
--- /dev/null
+++ b/sys-process/atop/atop-2.10.0.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Check on bumps of atop
+# https://www.atoptool.nl/downloadnetatop.php
+NETATOP_VER=3.1
+
+# Controls 'netatop' kernel module
+MODULES_OPTIONAL_IUSE="modules"
+NETATOP_P=netatop-${NETATOP_VER}
+NETATOP_S="${WORKDIR}"/${NETATOP_P}
+
+inherit linux-mod-r1 systemd toolchain-funcs
+
+DESCRIPTION="Resource-specific view of processes"
+HOMEPAGE="https://www.atoptool.nl/ https://github.com/Atoptool/atop"
+SRC_URI="https://github.com/Atoptool/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI+=" modules? ( https://www.atoptool.nl/download/${NETATOP_P}.tar.gz )"
+
+# Module is GPL-2 as well
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+	sys-libs/ncurses:=
+	sys-libs/zlib
+	>=sys-process/acct-6.6.4-r1
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.6.0-build.patch
+)
+
+pkg_pretend() {
+	if use kernel_linux ; then
+		CONFIG_CHECK="~BSD_PROCESS_ACCT"
+		check_extra_config
+	fi
+}
+
+src_prepare() {
+	default
+
+	if use modules ; then
+		cd "${WORKDIR}"/${NETATOP_P} || die
+		eapply "${FILESDIR}"/${PN}-2.9.0-netatop-makefile.patch
+		cd "${S}" || die
+	fi
+
+	tc-export CC PKG_CONFIG
+
+	# bug #191926
+	sed -i 's: root : :' atop.cronsysv || die
+
+	# Prefixify
+	sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile || die
+}
+
+src_compile() {
+	default
+
+	local modlist=( "netatop=:../${NETATOP_P}/module::netatop.ko" )
+	linux-mod-r1_src_compile
+
+	if use modules ; then
+		# netatop's Makefile tries to build the kernel module for us
+		# so let's just replicate parts of it here.
+		emake -C "${NETATOP_S}"/daemon all
+	fi
+}
+
+src_install() {
+	linux-mod-r1_src_install
+
+	if use modules ; then
+		dosbin "${NETATOP_S}"/daemon/netatopd
+		doman "${NETATOP_S}"/man/*
+
+		systemd_dounit "${NETATOP_S}"/netatop.service
+
+		# TODO: Release after 2.8.0 may contain this, check!
+		newinitd "${FILESDIR}"/netatop.rc netatop
+	fi
+
+	emake DESTDIR="${D}" genericinstall
+
+	# useless -${PV} copies ?
+	rm "${ED}"/usr/bin/atop*-${PV} || die
+
+	newinitd atop.rc.openrc ${PN}
+	newinitd atopacct.rc.openrc atopacct
+
+	systemd_dounit "${S}"/${PN}.service
+	systemd_dounit "${S}"/atopacct.service
+
+	dodoc atop.cronsysv AUTHORS README
+
+	exeinto /usr/share/${PN}
+	doexe ${PN}.daily
+
+	insinto /etc/default
+	newins ${PN}{.default,}
+
+	keepdir /var/log/${PN}
+}