public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/ipmiutil/, sys-apps/ipmiutil/files/
Date: Sun, 26 Jan 2020 07:05:19 +0000 (UTC)	[thread overview]
Message-ID: <1580022317.c993d81e783d0ba769c341e67e7f0419131d3d3a.robbat2@gentoo> (raw)

commit:     c993d81e783d0ba769c341e67e7f0419131d3d3a
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 07:02:39 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 07:05:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c993d81e

sys-apps/ipmiutil: bump & fix broken upstream configure for lanplus

Upstream 2.1.4 release broke the lanplus selection in configure.ac, this
is fixed patch ipmiutil-3.1.5-fix-configure.patch which has been
submitted upstream.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 .../files/ipmiutil-3.1.5-fix-configure.patch       | 180 +++++++++++++++++++++
 sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild         |  66 ++++++++
 2 files changed, 246 insertions(+)

diff --git a/sys-apps/ipmiutil/files/ipmiutil-3.1.5-fix-configure.patch b/sys-apps/ipmiutil/files/ipmiutil-3.1.5-fix-configure.patch
new file mode 100644
index 00000000000..8748256be5f
--- /dev/null
+++ b/sys-apps/ipmiutil/files/ipmiutil-3.1.5-fix-configure.patch
@@ -0,0 +1,180 @@
+--- ipmiutil-3.1.5.orig/configure.ac	2019-11-25 06:53:08.000000000 -0800
++++ ipmiutil-3.1.5/configure.ac	2020-01-25 22:55:20.577345441 -0800
+@@ -80,40 +80,46 @@
+ #  fi]
+ 
+ drv_landesk=0
++LANDESK_CFLAGS=""
++LANDESK_LDADD=""
+ dnl configure for LANDESK libipmiapi or not
+ AC_ARG_ENABLE([landesk],
+-    [  --enable-landesk       adds landesk library support [[default=no]]],
+-    [if test "x$enableval" = "xyes"; then
+-	    drv_landesk=1
+-            LANDESK_CFLAGS="-DLINK_LANDESK"
+-            LANDESK_LDADD="-lipmiapi -L../lib"
+-            AC_SUBST(LANDESK_CFLAGS)
+-            AC_SUBST(LANDESK_LDADD)
+-    fi]
+-    )
++	AS_HELP_STRING([--enable-landesk], [enable landesk support (default=no)]),
++	[],
++	[enable_landesk=no])
++
++AS_IF([test "x$enable_landesk" = "xyes"], [
++	drv_landesk=1
++	LANDESK_CFLAGS="-DLINK_LANDESK"
++	LANDESK_LDADD="-lipmiapi -L../lib"
++	AC_SUBST(LANDESK_CFLAGS)
++	AC_SUBST(LANDESK_LDADD)
++    ])
+ 
+ dnl Configure ipmiutil for lanplus (libipmi_lanplus.a) or not (default yes)
+ AC_ARG_ENABLE([lanplus],
+-    [  --enable-lanplus      enable lanplus support (default=yes)],[default=yes],
+-[if test "x$enableval" = "xno"; then
+-	drv_lanplus=""
+-	LANPLUS_CFLAGS=""
+-	LANPLUS_LDADD=""
+-        LANPLUS_LIB="" 
+-	LANPLUS_CRYPTO=""
+-	LANPLUS_SAM="no"
+-	LD_SAMX=""
+-else
++	AS_HELP_STRING([--disable-lanplus], [enable lanplus support (default=yes)]),
++	[],
++	[enable_lanplus=yes])
++
++drv_lanplus=""
++LANPLUS_CFLAGS=""
++LANPLUS_LDADD=""
++LANPLUS_LIB="" 
++LANPLUS_CRYPTO=""
++LANPLUS_SAM="no"
++LD_SAMX=""
++AS_IF([test "x$enable_lanplus" = "xyes"], [
+ 	drv_lanplus="lanplus"
+ 	LANPLUS_CFLAGS="-DHAVE_LANPLUS"
+ 	# LANPLUS_CFLAGS="-DHAVE_LANPLUS -I${projdir}/lib/lanplus/inc"
+ 	# LANPLUS_LDADD="-L../lib -lintf_lanplus -L/usr/local/lib -lcrypto"
+ 	LANPLUS_LDADD="-L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto"
+-        LANPLUS_LIB="../lib/libipmi_lanplus.a" 
++	LANPLUS_LIB="../lib/libipmi_lanplus.a" 
+ 	LANPLUS_CRYPTO="-lcrypto"
+ 	LANPLUS_SAM="yes"
+ 	LD_SAMX="../lib/libipmi_lanplus.a -lcrypto"
+-fi ])
++])
+ 
+ dnl Configure libipmiutil.a for lanplus or not
+ dnl Only SOL requires lanplus, so usually build libipmiutil.a without lanplus
+@@ -128,21 +134,28 @@
+ #fi
+ 
+ # strings /lib/libssl.so* |grep EVP_sha256 
+-dnl configure for SHA256, build lanplus with SHA256 support, uses later openssl.
++dnl configure for SHA256, build lanplus with SHA256 support
++dnl requires openssl-1.0.1 which was released in 2012/03
+ AC_ARG_ENABLE([sha256],
+-    [  --enable-sha256        build with SHA256 support, requires later openssl.],
+-    [if test "x$enableval" = "xyes"; then
+-	LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
+-    fi]
+-    )
++    AS_HELP_STRING([--disable-sha256], [build with SHA256 support (default=yes)]),
++	dnl action if passed
++	[],
++	dnl action if not passed
++	[enable_sha256=yes]
++	)
++AS_IF([test "x$enable_sha256" = "xyes"], [
++  LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
++])
+ 
+ dnl configure for EKANALYZER, build with ekanalyzer function enabled
+ AC_ARG_ENABLE([ekanalyzer],
+-    [  --enable-ekanalyzer        build with ekanalyzer function enabled.],
+-    [if test "x$enableval" = "xyes"; then
++	AS_HELP_STRING([--enable-ekanalyzer], [build with ekanalyzer function enabled.]),
++	[],
++	[enable_ekanalyzer=no]
++	)
++AS_IF([test "x$enable_ekanalyzer" = "xyes"], [
+ 	OS_CFLAGS="$OS_CFLAGS -DHAVE_EKANAL"
+-    fi]
+-    )
++    ])
+ 
+ GPL_CFLAGS=""
+ CROSS_LFLAGS=""
+@@ -152,17 +165,20 @@
+ SYSTEMD_DIR=/usr/share/ipmiutil
+ 
+ AC_ARG_ENABLE([useflags],
+-    [  --enable-useflags    include environment CFLAGS and LDFLAGS.],
+-    [if test "x$enableval" = "xyes"; then
++	AS_HELP_STRING([--enable-useflags], [include environment CFLAGS and LDFLAGS.]),
++	[],
++	[enable_useflags=no])
++AS_IF([test "x$enable_useflags" = "xyes"], [
+ 	   CROSS_CFLAGS="$CFLAGS"
+ 	   CROSS_LFLAGS="$LDFLAGS"
+-    fi]
+-    )
++])
+ 
+ dnl configure for standalone, with no lanplus or GPL libs 
+ AC_ARG_ENABLE([standalone],
+-    [  --enable-standalone    build standalone, with no GPL or LanPlus libs.],
+-    [if test "x$enableval" = "xyes"; then
++	AS_HELP_STRING([--enable-standalone], [build standalone, with no GPL or LanPlus libs.]),
++	[],
++	[enable_standalone=no])
++AS_IF([test "x$enable_standalone" = "xyes"], [
+         GPL_CFLAGS=""
+ 	LANPLUS_CFLAGS=""
+ 	LANPLUS_LDADD=""
+@@ -176,27 +192,30 @@
+ 	   # cross-compiling, so link with -static (e.g. Android ARM)
+ 	   CROSS_LFLAGS="-static"
+ 	   CROSS_CFLAGS="-DCROSS_COMPILE"
++	   # TODO: how can this be effective? Configure only converts Makefile.in -> Makefile
++	   # Configure does not convert Makefile.am->Makefile.in
+ 	   sed -i -e 's/^# ipmiutil:	$(METASOURCE:.c=.o)/ipmiutil:\t$(METASOURCE:.c=.o)\n\t$(CC) $(CFLAGS) $(LDFLAGS) -o ipmiutil $(METASOURCE:.c=.o) $(LDADD)/'  util/Makefile.am
+ 	fi
+-    fi]
+-    )
++    ])
+ 
+ dnl build libipmiutil with sensor modules
+ AC_ARG_ENABLE([libsensors],
+-    [  --enable-libsensors	 build libipmiutil with sensor modules [[default=no]]],
+-    [if test "x$enableval" = "xyes"; then
+-        LIBSENSORS="isensor2.o ievents2.o"
+-        SAM2OBJ=""
+-    fi]
+-    )
++	AS_HELP_STRING([--enable-libsensors], [build libipmiutil with sensor modules (default=no)]),
++	[],
++	[enable_libsensors=no])
++AS_IF([test "x$enable_libsensors" = "xyes"], [
++	   LIBSENSORS="isensor2.o ievents2.o"
++	   SAM2OBJ=""
++    ])
+ 
+ dnl configure for GPL build or not (GPL files: md2.h, ipmi_ioctl.h)
+ AC_ARG_ENABLE([gpl],
+-    [  --enable-gpl           build with some GPL code [[default=no]]],
+-    [if test "x$enableval" = "xyes"; then
+-        GPL_CFLAGS="-DALLOW_GPL"
+-    fi]
+-    )
++	AS_HELP_STRING([--enable-gpl], [build with some GPL code (default=no)]),
++	[],
++	[enable_gpl=no])
++AS_IF([test "x$enable_gpl" = "xyes"], [
++	   GPL_CFLAGS="-DALLOW_GPL"
++	])
+ 
+ dnl Does this Linux have systemd enabled?  Otherwise use sysv init.
+ AC_ARG_ENABLE([systemd],

diff --git a/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild b/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild
new file mode 100644
index 00000000000..dd9d9ba74e6
--- /dev/null
+++ b/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools systemd
+
+DESCRIPTION="IPMI Management Utilities"
+HOMEPAGE="http://ipmiutil.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=dev-libs/openssl-1:0="
+DEPEND="${RDEPEND}
+	virtual/os-headers"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.9.8-flags.patch
+	"${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
+	"${FILESDIR}"/${PN}-3.1.5-fix-configure.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
+	sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
+
+	# Don't compress man pages
+	sed '/gzip -f/d' -i doc/Makefile.am || die
+
+	eautoreconf
+}
+
+src_configure() {
+	econf --disable-systemd --enable-sha256 --enable-lanplus
+}
+
+src_compile() {
+	# Ulgy workaround. Upstream is misusing the make system here
+	# and it doesn't even work.
+	# Please check on each bump if this workaround is still required.
+	pushd lib/lanplus &>/dev/null || die
+	emake
+	cp libipmi_lanplus.a .. || die
+	popd &>/dev/null || die
+
+	emake
+}
+
+src_install() {
+	emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
+	dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
+
+	# Init scripts are only for Fedora
+	rm -r "${ED}"/etc/init.d || die 'remove initscripts failed'
+
+	if ! use static-libs ; then
+		find "${ED}" -type f -name '*.a' -delete || die
+	fi
+
+	keepdir /var/lib/ipmiutil
+}


             reply	other threads:[~2020-01-26  7:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26  7:05 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-06  4:11 [gentoo-commits] repo/gentoo:master commit in: sys-apps/ipmiutil/, sys-apps/ipmiutil/files/ Robin H. Johnson
2016-07-31  8:33 Lars Wendler
2016-07-31  8:33 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580022317.c993d81e783d0ba769c341e67e7f0419131d3d3a.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox