summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-30 05:11:32 +0100
committerSam James <sam@gentoo.org>2023-05-30 05:15:43 +0100
commit6880f68b7869d8226f29af44195de878f1771c57 (patch)
treef0c23a402b0993c8af192baa026d51171673300b /sys-process/atop
parentapp-doc/eclass-manpages: add 20230530 (diff)
downloadgentoo-6880f68b7869d8226f29af44195de878f1771c57.tar.gz
gentoo-6880f68b7869d8226f29af44195de878f1771c57.tar.bz2
gentoo-6880f68b7869d8226f29af44195de878f1771c57.zip
sys-process/atop: port to linux-mod-r1
...and revbump for zlib dep. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-process/atop')
-rw-r--r--sys-process/atop/atop-2.9.0-r1.ebuild (renamed from sys-process/atop/atop-2.9.0.ebuild)32
-rw-r--r--sys-process/atop/files/atop-2.9.0-netatop-makefile.patch42
2 files changed, 56 insertions, 18 deletions
diff --git a/sys-process/atop/atop-2.9.0.ebuild b/sys-process/atop/atop-2.9.0-r1.ebuild
index 948c12e87582..9bd1a191304c 100644
--- a/sys-process/atop/atop-2.9.0.ebuild
+++ b/sys-process/atop/atop-2.9.0-r1.ebuild
@@ -8,11 +8,11 @@ EAPI=8
NETATOP_VER=3.1
# Controls 'netatop' kernel module
-MODULES_OPTIONAL_USE="modules"
-NETATOP_P=net${PN}-${NETATOP_VER}
+MODULES_OPTIONAL_IUSE="modules"
+NETATOP_P=netatop-${NETATOP_VER}
NETATOP_S="${WORKDIR}"/${NETATOP_P}
-inherit linux-info linux-mod systemd toolchain-funcs
+inherit linux-mod-r1 systemd toolchain-funcs
DESCRIPTION="Resource-specific view of processes"
HOMEPAGE="https://www.atoptool.nl/ https://github.com/Atoptool/atop"
@@ -26,8 +26,8 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~x86 ~amd64-l
RDEPEND="
sys-libs/ncurses:=
+ sys-libs/zlib
>=sys-process/acct-6.6.4-r1
- modules? ( sys-libs/zlib )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
@@ -48,7 +48,7 @@ src_prepare() {
if use modules ; then
cd "${WORKDIR}"/${NETATOP_P} || die
- eapply -p1 "${FILESDIR}"/${PN}-2.7.0-netatop-makefile.patch
+ eapply "${FILESDIR}"/${PN}-2.9.0-netatop-makefile.patch
cd "${S}" || die
fi
@@ -57,31 +57,27 @@ src_prepare() {
# bug #191926
sed -i 's: root : :' atop.cronsysv || die
- # prefixify
+ # Prefixify
sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile || die
}
-src_configure() {
- default
-
- BUILD_TARGETS="netatop.ko"
- MODULE_NAMES="netatop(:${NETATOP_S}/module)"
-}
-
src_compile() {
default
- linux-mod_src_compile
-}
-
-src_install() {
- linux-mod_src_install
+ 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/*
diff --git a/sys-process/atop/files/atop-2.9.0-netatop-makefile.patch b/sys-process/atop/files/atop-2.9.0-netatop-makefile.patch
new file mode 100644
index 000000000000..30710369fd46
--- /dev/null
+++ b/sys-process/atop/files/atop-2.9.0-netatop-makefile.patch
@@ -0,0 +1,42 @@
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -6,7 +6,7 @@
+ all: netatopd
+
+ netatopd: netatopd.o Makefile
+- $(CC) netatopd.o -o netatopd -lz
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) netatopd.o -o netatopd -lz
+
+ clean:
+ rm -f *.o netatopd
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ all:
+ ./mkversion
+- cd module; make
+- cd daemon; make
++ $(MAKE) -C module
++ $(MAKE) -C daemon
+
+ install: module/netatop.ko daemon/netatopd
+ install -d /lib/modules/`uname -r`/extra
+@@ -14,5 +14,5 @@
+ install man/netatopd.8 -t /usr/share/man/man8
+
+ clean:
+- cd module; make clean
+- cd daemon; make clean
++ $(MAKE) -C module clean
++ $(MAKE) -C daemon clean
+--- a/module/Makefile
++++ b/module/Makefile
+@@ -7,7 +7,7 @@
+
+ $(MYMODULE).ko: $(MYMODULE).c
+ echo start the make
+- make -C $(KERNDIR) M=$(THISDIR) modules
++ $(MAKE) -C $(KERNDIR) M=$(THISDIR) modules
+
+ clean:
+ rm -f *.o *.ko