summaryrefslogtreecommitdiff
path: root/sys-libs/openipmi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-08 18:59:30 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-08 18:59:30 +0000
commit1e1e7636b59380beebd325e8d256875e4f824230 (patch)
treecac3706b236cea47f66f8d45afc943890cd4375e /sys-libs/openipmi
parent5cbf14acf23c82626389931f64cfe3ef12a1c29f (diff)
gentoo auto-resync : 08:01:2024 - 18:59:30
Diffstat (limited to 'sys-libs/openipmi')
-rw-r--r--sys-libs/openipmi/Manifest2
-rw-r--r--sys-libs/openipmi/files/openipmi-2.0.33-c99.patch56
-rw-r--r--sys-libs/openipmi/openipmi-2.0.33-r1.ebuild98
3 files changed, 156 insertions, 0 deletions
diff --git a/sys-libs/openipmi/Manifest b/sys-libs/openipmi/Manifest
index 2910ccb41617..41778911701f 100644
--- a/sys-libs/openipmi/Manifest
+++ b/sys-libs/openipmi/Manifest
@@ -1,4 +1,6 @@
AUX openipmi-2.0.26-tinfo.patch 808 BLAKE2B fc7545b3610c9ba6a2d8d7075a8db3384659945bd7d85758342438f261fedce67bace7795a74ff6010f68d04d8ae33936b6c60780986c9e0d66e93061577132f SHA512 2deae71fd039126cb3dd0a348658ddbf568345c782c2467a4712d36006217f86eaf86950c821d36a400aea4cf18409684e8abd3b1e504928f5bc6d4cf943c4bb
+AUX openipmi-2.0.33-c99.patch 2031 BLAKE2B 0a84beca0c7cefef2f690a99dd99ee8bf6213b8399f27154e4377f1f343f576557977e7f61b421d67aadab8bb087e8ba09b21b31dbe194ef464fd0e393b0b0d5 SHA512 695d2c89aca9bcaef732e8541e37129240be21d164be38c0fedd6e34d111b6cee0649eb2e265dc468502f592d286b7ea5048fccb94ab547e9c1e0ccd373f6d68
DIST OpenIPMI-2.0.33.tar.gz 3141439 BLAKE2B 02634ac8e17abf6a95f37e1b6825fe1f493e1990d7a5b0f6e87f7d9527f2a778f9faf0b12566529a3c87ecce893346e5125c51da988b95fbb56145282194ed16 SHA512 615fccd1ffd4af18584c1b0e54667ba2de60b6d42b44e7448f27808114180fa3b31b4834276bdf69c3df1e5210df871fd888deec8186377524838390fe41e641
+EBUILD openipmi-2.0.33-r1.ebuild 2115 BLAKE2B f15af3a0448c9d13eb76d69c4807b03ad23036ee8aa4a6a1ffad30f0ed4f96fbf41d257191f35d369ca1e201c98d30b8bbfcf5d2542f6cde2f3e3e2e8548817c SHA512 99fd5798dc7b3382f48a630128f880aa5d95f19b09565ac96678e98bb8964d79e7fa735a97bf052b8755eb3f13c15d98487066095bf4ca3f0e7927c31fa28e07
EBUILD openipmi-2.0.33.ebuild 2071 BLAKE2B a225bed55cd4805e48007b9ba5bc37bce1906de4562131793c0792d829e9d1273786e68e9c84f43463beb7b028b2ab83d1164656ce464f04c35972ed68ca9069 SHA512 ad221796044d777f83f93ce96c7e926e46cba86c4b10a09fe67446eeaa9f0f7bf4ea5fd382bf2f82cf6717fcd102a52b70fc2559218cba3a60fbb9a1d4442023
MISC metadata.xml 348 BLAKE2B 845b9eadd51770ff89268871a3cbb7befb724efeaa28b891e510f34f3bb80b8c72f937505b31646440da9581fa37a38f6272b37f424e78b9ff5c832c255e9bfc SHA512 c13f3458e198f1d4da1cf5be846df5d2cc2ca3ef3fecd5959f7fed0979f10d0eff326da380793dc4471d64e622a415ca60b144b92bb2889a0f870e0c2767f917
diff --git a/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch b/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch
new file mode 100644
index 000000000000..b7786c3ceab1
--- /dev/null
+++ b/sys-libs/openipmi/files/openipmi-2.0.33-c99.patch
@@ -0,0 +1,56 @@
+https://sourceforge.net/p/openipmi/patches/38/
+
+C type errors in the SWIG-generated Perl bindings
+
+The first change fixes an error with newer compilers:
+
+OpenIPMI_wrap.c: In function ‘_wrap_strconstarray_val_set’:
+OpenIPMI_wrap.c:10491:27: error: assignment to ‘const char **’ from incompatible pointer type ‘char **’
+10491 | if (arg1) (arg1)->val = arg2;
+ | ^
+
+The second change is also about a compiler error:
+
+In file included from /usr/lib64/perl5/CORE/perl.h:4530,
+ from OpenIPMI_wrap.c:751:
+OpenIPMI_wrap.c: In function ‘_wrap_ipmi_sol_conn_t_write’:
+/usr/lib64/perl5/CORE/sv.h:1952:31: error: passing argument 3 of ‘Perl_SvPV_helper’ from incompatible pointer type
+ 1952 | Perl_SvPV_helper(aTHX_ sv, &len, flags, SvPVnormal_type_, \
+/usr/lib64/perl5/CORE/sv.h:1972:37: note: in expansion of macro ‘SvPV_flags’
+ 1972 | #define SvPV(sv, len) SvPV_flags(sv, len, SV_GMAGIC)
+ | ^~~~~~~~~~
+OpenIPMI_wrap.c:27664:24: note: in expansion of macro ‘SvPV’
+27664 | (&arg2)->val = SvPV(tempsv, (&arg2)->len);
+ | ^~~~
+In file included from /usr/lib64/perl5/CORE/perl.h:7812:
+/usr/lib64/perl5/CORE/sv_inline.h:908:33: note: expected ‘STRLEN * const’ {aka ‘long unsigned int * const’} but argument is of type ‘int *’
+ 908 | STRLEN * const lp,
+ | ~~~~~~~~~~~~~~~^~
+
+But the existing code looks broken on big-endian 64-bit architectures,
+too.
+
+--- a/swig/OpenIPMI.i
++++ b/swig/OpenIPMI.i
+@@ -359,7 +359,7 @@ typedef struct iargarray
+ %}
+ typedef struct strconstarray
+ {
+- char **val;
++ const char **val;
+ int len;
+ } strconstarray;
+ typedef struct argarray
+--- a/swig/perl/OpenIPMI_lang.i
++++ b/swig/perl/OpenIPMI_lang.i
+@@ -292,7 +292,9 @@
+ $1.val = NULL;
+ $1.len = 0;
+ } else {
+- $1.val = SvPV(tempsv, $1.len);
++ STRLEN len;
++ $1.val = SvPV(tempsv, len);
++ $1.len = len;
+ }
+ }
+
diff --git a/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
new file mode 100644
index 000000000000..26db37796649
--- /dev/null
+++ b/sys-libs/openipmi/openipmi-2.0.33-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit autotools python-single-r1
+
+MY_PN="OpenIPMI"
+MY_P="${MY_PN}-${PV/_/-}"
+DESCRIPTION="Library interface to IPMI"
+HOMEPAGE="https://sourceforge.net/projects/openipmi/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="crypt snmp perl python static-libs tcl"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/popt
+ sys-libs/gdbm:=
+ sys-libs/ncurses:=
+ sys-libs/readline:=
+ crypt? ( dev-libs/openssl:= )
+ snmp? ( net-analyzer/net-snmp )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ tcl? ( dev-lang/tcl:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ >=dev-lang/swig-1.3.21
+ virtual/pkgconfig
+"
+
+# Gui is broken!
+# python? ( tcl? ( tk? ( dev-lang/tk dev-tcltk/tix ) ) )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0.26-tinfo.patch" # bug #501510
+ "${FILESDIR}/${PN}-2.0.33-c99.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # For tinfo patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ # These binaries are for root!
+ --bindir="${EPREFIX}"/usr/sbin
+ --with-glib
+ --with-glibver=2.0
+ --with-swig
+ --without-tkinter
+ $(use_with snmp ucdsnmp yes)
+ $(use_with crypt openssl yes)
+ $(use_with perl perl yes)
+ $(use_with tcl tcl yes)
+ $(use_with python python yes)
+ )
+
+ # GUI is broken
+ #use tk && use python && use !tcl && \
+ # ewarn "Not building Tk GUI because it needs both Python AND Tcl"
+ #if use python && use tcl; then
+ # myconf+=( $(use_with tk tkinter) )
+ #else
+ # myconf+=( --without-tkinter )
+ #fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README* FAQ ChangeLog TODO doc/IPMI.pdf lanserv/README.vm
+ newdoc cmdlang/README README.cmdlang
+
+ use python && python_optimize
+
+ find "${ED}" -name "*.la" -delete || die
+
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}