Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/dmidecode/
Date: Wed, 15 Mar 2023 05:45:54
Message-Id: 1678859098.240c51a78863d454e416c3bdb96acde20e91ca56.sam@gentoo
1 commit: 240c51a78863d454e416c3bdb96acde20e91ca56
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 15 05:11:03 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 15 05:44:58 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=240c51a7
7
8 sys-apps/dmidecode: add 3.5
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-apps/dmidecode/Manifest | 1 +
13 sys-apps/dmidecode/dmidecode-3.5.ebuild | 45 +++++++++++++++++++++++++++++++++
14 2 files changed, 46 insertions(+)
15
16 diff --git a/sys-apps/dmidecode/Manifest b/sys-apps/dmidecode/Manifest
17 index c411b41d00d9..7a7bd062f49f 100644
18 --- a/sys-apps/dmidecode/Manifest
19 +++ b/sys-apps/dmidecode/Manifest
20 @@ -1 +1,2 @@
21 DIST dmidecode-3.4.tar.xz 61420 BLAKE2B f9f0429c5128692c2d1d560580552285ea900c1c9ef6f68f0e2133ae1ef05b85a943e882f915d3ef969b7a7e3f3f6bbc4ec391e7bd3d98092976ddbf02421c49 SHA512 62990b6159e5a7c8688d37e44957e7948391d2c6afeabaa4514ba9dad2d08b020297676e2dbbfcb6471efc6fb6f3682750422931a953f78f358bb3dd3745e95b
22 +DIST dmidecode-3.5.tar.xz 65068 BLAKE2B 07cc4c069dc1cba36160de158c4d0390df9b77b4192f5847df0756f9e097a7fbc751cd7b5b073df7661267ab78ea0d9be2831d70ddda8d1981c628f3cfee8802 SHA512 690c9bea391f6bbfc8cd48e8db408a61d5b551a07a2823c29d03a09607fc2043cc1bea44ee9fd27fd0e7bc0b287bf9de9f22a1a66053f5b1e63d77c03d93e1ae
23
24 diff --git a/sys-apps/dmidecode/dmidecode-3.5.ebuild b/sys-apps/dmidecode/dmidecode-3.5.ebuild
25 new file mode 100644
26 index 000000000000..fd9962c60623
27 --- /dev/null
28 +++ b/sys-apps/dmidecode/dmidecode-3.5.ebuild
29 @@ -0,0 +1,45 @@
30 +# Copyright 1999-2023 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +# Upstream often give "recommended patches" at https://www.nongnu.org/dmidecode/
36 +# Check regularly after releases!
37 +inherit toolchain-funcs
38 +
39 +DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
40 +HOMEPAGE="https://www.nongnu.org/dmidecode/"
41 +SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.xz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="-* ~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~x86-solaris"
46 +IUSE="selinux"
47 +
48 +RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
49 +
50 +src_prepare() {
51 + default
52 +
53 + sed -i \
54 + -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
55 + -e "/^docdir/s:dmidecode:${PF}:" \
56 + -e '/^PROGRAMS !=/d' \
57 + Makefile || die
58 +}
59 +
60 +src_compile() {
61 + emake \
62 + CFLAGS="${CFLAGS} ${CPPFLAGS}" \
63 + LDFLAGS="${LDFLAGS}" \
64 + CC="$(tc-getCC)"
65 +}
66 +
67 +pkg_postinst() {
68 + if [[ ${CHOST} == *-solaris* ]] ; then
69 + einfo "dmidecode needs root privileges to read /dev/xsvc"
70 + einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
71 + einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
72 + einfo "information without requiring root privileges."
73 + fi
74 +}