commit: 4ae59afd8535ce2d3992378c34f2a548640d664f
Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Jun 12 22:33:25 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 13 15:11:50 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ae59afd
app-admin/gkrellm: add 2.4.0
SRC_URI/HOMEPAGE : httpS
eclass :
remove plocales, superfluous
remove systemd, unit is installed by build system
remove desktop, no longer required
add xdg and optfeature
useflags :
move hddtemp in optfeature
X is required for ssl/gnutls/ntlm
ssl is required for gnutls
patch for config rebased without timeouts as there's now default values
package still needs -std=gnu99
sed-op :
fix prefix and libdir for paths defined in headers
export PREFIX instead of modify each path with ${INSTALLROOT}
src_compile and src_install slightly reworked and commented
Closes: https://bugs.gentoo.org/948445
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42575
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-admin/gkrellm/Manifest | 1 +
app-admin/gkrellm/files/gkrellm-2.4.0-config.patch | 28 +++++
app-admin/gkrellm/gkrellm-2.4.0.ebuild | 131 +++++++++++++++++++++
3 files changed, 160 insertions(+)
diff --git a/app-admin/gkrellm/Manifest b/app-admin/gkrellm/Manifest
index 11f0505b9ad8..e8c26d1cc143 100644
--- a/app-admin/gkrellm/Manifest
+++ b/app-admin/gkrellm/Manifest
@@ -1 +1,2 @@
DIST gkrellm-2.3.11.tar.bz2 783123 BLAKE2B
b68c60477e4994e9508a8e5ea39fd09ab5cf0f019fc6b4567b9482b3b1fd315dd2548daed262095b42dda43ac068295d5c3c375c5cb80c91fda76ef8b9834df2
SHA512
e4147aa90e09925b9672728f287880bde26632d77d83d3f0b9458a201593a57158d9eb8cbb31e569e0d71d91a08c9bceba29814f59e542315775663ef9fd27a9
+DIST gkrellm-2.4.0.tar.bz2 790070 BLAKE2B
3396896bd7b125c1d0abfb9bfa974daa7764969db04c14bc45f1d1d4b2e638ef5eed360e30c71c47f5bb78c21aaaba3f34cd9deaf485310d16184bcfb87c4196
SHA512
770acfe5ee23b74ffe5becc89d3735e9e8688ac338b052e1c2f86cb722b7867b1f8c262a969ef3140eb32912cf0426ac13bf3743e2a9149eec2a962655e05a9f
diff --git a/app-admin/gkrellm/files/gkrellm-2.4.0-config.patch
b/app-admin/gkrellm/files/gkrellm-2.4.0-config.patch
new file mode 100644
index 000000000000..6e306f1ef141
--- /dev/null
+++ b/app-admin/gkrellm/files/gkrellm-2.4.0-config.patch
@@ -0,0 +1,28 @@
+Avoid all hosts allowed to connect
+Drop privileges after startup
+diff --git a/server/gkrellmd.conf b/server/gkrellmd.conf
+index dd8bac3..aa9500d 100644
+--- a/server/gkrellmd.conf
++++ b/server/gkrellmd.conf
+@@ -22,16 +22,17 @@
+ # List of hosts allowed to connect. If no hosts are specified in a
+ # gkrellmd.conf file or on the command line, all hosts will be allowed.
+ #
+-#allow-host localhost
+-#allow-host 127.0.0.1
++allow-host localhost
++allow-host 127.0.0.1
++allow-host ::ffff:127.0.0.1
+ #allow-host ::1
+ #allow-host 192.168.0.*
+
+ # Drop privileges after startup (you must start gkrellmd as root to do it).
+ # NOTE: Option ignored on Windows
+ #
+-#user nobody
+-#group proc
++user gkrellmd
++group gkrellmd
+
+ # Create a PID file for the running gkrellmd. Default is no PID file.
+ # NOTE: Option ignored on Windows
diff --git a/app-admin/gkrellm/gkrellm-2.4.0.ebuild
b/app-admin/gkrellm/gkrellm-2.4.0.ebuild
new file mode 100644
index 000000000000..265ca828b77c
--- /dev/null
+++ b/app-admin/gkrellm/gkrellm-2.4.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic optfeature toolchain-funcs xdg
+
+DESCRIPTION="Single process stack of various system monitors"
+HOMEPAGE="http://gkrellm.srcbox.net/"
+if [[ "${PV}" == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.srcbox.net/gkrellm/gkrellm.git"
+else
+ SRC_URI="http://gkrellm.srcbox.net/releases/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv
~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+LICENSE="GPL-3+"
+SLOT="2"
+IUSE="gnutls lm-sensors nls ntlm ssl X"
+REQUIRED_USE="
+ gnutls? ( ssl )
+ ntlm? ( X )
+ ssl? ( X )
+"
+
+RDEPEND="
+ acct-group/gkrellmd
+ acct-user/gkrellmd
+ dev-libs/glib:2
+ ssl? (
+ gnutls? ( net-libs/gnutls:= )
+ !gnutls? ( dev-libs/openssl:0= )
+ )
+ lm-sensors? ( sys-apps/lm-sensors:= )
+ nls? ( virtual/libintl )
+ ntlm? ( net-libs/libntlm )
+ X? (
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/pango
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+ nls? ( sys-devel/gettext )
+"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.4.0-config.patch"
+ "${FILESDIR}/${PN}-2.3.5-width.patch"
+)
+
+src_prepare() {
+ # Fix paths defined in headers for etc, themes, plugins
+ sed -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):" \
+ -e "s:/usr/local/lib:${EPREFIX}/usr/local/$(get_libdir):" \
+ -i server/gkrellmd.h \
+ -i src/gkrellm.h || die
+ # avoid no-op warning
+ if [[ -n ${EPREFIX} ]]; then
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:" \
+ -e "s:/etc/:${EPREFIX}/etc/:" \
+ -i server/gkrellmd.h \
+ -i src/gkrellm.h || die
+ fi
+
+ # filter -O2 set by default
+ sed -e 's:-O2::' \
+ -i src/Makefile \
+ -i server/Makefile || die
+
+ default
+}
+
+src_compile() {
+ # see #943935
+ append-cflags -std=gnu99
+
+ # in addition to adding EPREFIX, avoid /usr/local
+ # export in src_compile for gkrellm.pc and then used during installation
+ export PREFIX="${EPREFIX}/usr"
+
+ export TARGET=$(usex X . server)
+ local emakeargs=(
+ CC=$(tc-getCC)
+ AR=$(tc-getAR)
+
+ # used for gtk/glib
+ PKG_CONFIG="$(tc-getPKG_CONFIG)"
+ # fix X11 path
+ X11_LIBS="$($(tc-getPKG_CONFIG) --libs x11 sm ice)"
+
+ # useflags
+ enable_nls=$(usex nls)
+ without-libsensors=$(usex !lm-sensors)
+ without-ntlm=$(usex !ntlm)
+ without-ssl=$(usex ssl $(usex gnutls) yes)
+ without-gnutls=$(usex !gnutls)
+ )
+ emake "${emakeargs[@]}" -C ${TARGET}
+}
+
+src_install() {
+ local emakeargs=(
+ STRIP=
+ DESTDIR="${D}"
+ PKGCONFIGDIR="${ED}/usr/$(get_libdir)/pkgconfig"
+ CFGDIR="${ED}/etc"
+ )
+ emake "${emakeargs[@]}" install -C ${TARGET}
+
+ newinitd "${FILESDIR}"/gkrellmd.initd gkrellmd
+ newconfd "${FILESDIR}"/gkrellmd.conf gkrellmd
+
+ local DOCS=( CHANGELOG.md CREDITS README )
+ local HTML_DOCS=( *.html )
+ einstalldocs
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "disk temperatures monitoring" app-admin/hddtemp
+}