summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/ppc64-diag/Manifest1
-rw-r--r--sys-apps/ppc64-diag/ppc64-diag-2.7.9.ebuild79
2 files changed, 80 insertions, 0 deletions
diff --git a/sys-apps/ppc64-diag/Manifest b/sys-apps/ppc64-diag/Manifest
index 8b239cdba2e3..e1241cc4023f 100644
--- a/sys-apps/ppc64-diag/Manifest
+++ b/sys-apps/ppc64-diag/Manifest
@@ -1,2 +1,3 @@
DIST ppc64-diag-2.7.7.tar.gz 423357 BLAKE2B b32def540811f383e401d352d17f2edce6a998a91a7b27bcab981e42469f44aaa505104ed2d2ced8a85485c0886525ff5128b36cdbad3a8eed90e8002877498c SHA512 42d94214345ab8deb7bd9ee8b145052fc2f733ba13d1567dbe6592fe9306670e3cd0ab6122e515464f7050753a992061c056e009673c7f8f6e554e9eaf75c550
DIST ppc64-diag-2.7.8.tar.gz 424366 BLAKE2B e5e4791dffba4ede725051682019f0b75c2ee718fd33170912ccf228946fa56b4e63930a9b9c8d7e58ce27f0a18b03ea7c58ba259b781d4c40eed945e2d895a9 SHA512 1a8890624609f64eb412cabb690f30a67b7f714260de14acc195268ecbda79d6c5e7d80694dabb3ab148fc74a4df6b8e147750e869ab49f40d04742ef284398e
+DIST ppc64-diag-2.7.9.tar.gz 439622 BLAKE2B a30a94359227812254d7ae9a571e524e88eb136fad9567cc5670d85dd66fb3a0f761a58da7eeeabe22434b959fa0d73a8c5213379184432c2a5efe8f8d9c2a47 SHA512 b6756c17e67e876ad3a945d05dbd2c2523cbf121c4aa658a4edaf33775c8165ff26a252bdf812600e2d47ae69cd68f6e22c0de6f2d3994856adcd3d949322673
diff --git a/sys-apps/ppc64-diag/ppc64-diag-2.7.9.ebuild b/sys-apps/ppc64-diag/ppc64-diag-2.7.9.ebuild
new file mode 100644
index 000000000000..57a0b0068a7e
--- /dev/null
+++ b/sys-apps/ppc64-diag/ppc64-diag-2.7.9.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Diagnostic tools for PowerLinux"
+HOMEPAGE="https://github.com/power-ras/ppc64-diag"
+SRC_URI="https://github.com/power-ras/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~ppc64"
+IUSE="rtas"
+
+DEPEND="virtual/libudev:=
+ rtas? (
+ sys-libs/ncurses:0=
+ sys-libs/librtas
+ sys-libs/libservicelog
+ >=sys-libs/libvpd-2.2.9:=
+ )
+"
+
+RDEPEND="${DEPEND}
+ dev-lang/perl
+ rtas? ( sys-apps/servicelog )
+"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/fix-systemd-unit-path.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with rtas librtas)
+ # handle ncurses[tinfo]
+ sed -e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" \
+ -i Makefile || die
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}/opal_errd.initd" opal_errd
+
+ if use rtas; then
+ newinitd "${FILESDIR}/rtas_errd.initd" rtas_errd
+ keepdir /var/log/ppc64-diag/diag_disk
+ else
+ # makefile installs it unconditionally
+ rm -rf "${ED}/lib/systemd/system/rtas_errd.service" || die
+ rm -rf "${ED}/usr/lib/systemd/system/rtas_errd.service" || die
+ fi
+
+ keepdir /etc/${PN}/ses_pages
+ keepdir /var/log/ppc64_diag/diag_disk
+ keepdir /var/log/ppc64_diag
+ keepdir /var/log/opal-elog
+ keepdir /var/log/dump
+}
+
+src_test() {
+ # it assumes MKTEMP created dir in /tmp, add /var to the string.
+ # /varplatform.0x01 becomes platform.0x01, just as test expects
+ # so we sed a sed expression, don't judge me
+ sed -i 's%\/tmp/%\/var\/tmp\/%' opal_errd/tests/test-extract_opal_dump-000 || die
+ emake check
+}