Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/ipmiutil/, sys-apps/ipmiutil/files/
Date: Sun, 26 Jan 2020 07:05:25
Message-Id: 1580022317.c993d81e783d0ba769c341e67e7f0419131d3d3a.robbat2@gentoo
1 commit: c993d81e783d0ba769c341e67e7f0419131d3d3a
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 26 07:02:39 2020 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 26 07:05:17 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c993d81e
7
8 sys-apps/ipmiutil: bump & fix broken upstream configure for lanplus
9
10 Upstream 2.1.4 release broke the lanplus selection in configure.ac, this
11 is fixed patch ipmiutil-3.1.5-fix-configure.patch which has been
12 submitted upstream.
13
14 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
15
16 .../files/ipmiutil-3.1.5-fix-configure.patch | 180 +++++++++++++++++++++
17 sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild | 66 ++++++++
18 2 files changed, 246 insertions(+)
19
20 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
21 new file mode 100644
22 index 00000000000..8748256be5f
23 --- /dev/null
24 +++ b/sys-apps/ipmiutil/files/ipmiutil-3.1.5-fix-configure.patch
25 @@ -0,0 +1,180 @@
26 +--- ipmiutil-3.1.5.orig/configure.ac 2019-11-25 06:53:08.000000000 -0800
27 ++++ ipmiutil-3.1.5/configure.ac 2020-01-25 22:55:20.577345441 -0800
28 +@@ -80,40 +80,46 @@
29 + # fi]
30 +
31 + drv_landesk=0
32 ++LANDESK_CFLAGS=""
33 ++LANDESK_LDADD=""
34 + dnl configure for LANDESK libipmiapi or not
35 + AC_ARG_ENABLE([landesk],
36 +- [ --enable-landesk adds landesk library support [[default=no]]],
37 +- [if test "x$enableval" = "xyes"; then
38 +- drv_landesk=1
39 +- LANDESK_CFLAGS="-DLINK_LANDESK"
40 +- LANDESK_LDADD="-lipmiapi -L../lib"
41 +- AC_SUBST(LANDESK_CFLAGS)
42 +- AC_SUBST(LANDESK_LDADD)
43 +- fi]
44 +- )
45 ++ AS_HELP_STRING([--enable-landesk], [enable landesk support (default=no)]),
46 ++ [],
47 ++ [enable_landesk=no])
48 ++
49 ++AS_IF([test "x$enable_landesk" = "xyes"], [
50 ++ drv_landesk=1
51 ++ LANDESK_CFLAGS="-DLINK_LANDESK"
52 ++ LANDESK_LDADD="-lipmiapi -L../lib"
53 ++ AC_SUBST(LANDESK_CFLAGS)
54 ++ AC_SUBST(LANDESK_LDADD)
55 ++ ])
56 +
57 + dnl Configure ipmiutil for lanplus (libipmi_lanplus.a) or not (default yes)
58 + AC_ARG_ENABLE([lanplus],
59 +- [ --enable-lanplus enable lanplus support (default=yes)],[default=yes],
60 +-[if test "x$enableval" = "xno"; then
61 +- drv_lanplus=""
62 +- LANPLUS_CFLAGS=""
63 +- LANPLUS_LDADD=""
64 +- LANPLUS_LIB=""
65 +- LANPLUS_CRYPTO=""
66 +- LANPLUS_SAM="no"
67 +- LD_SAMX=""
68 +-else
69 ++ AS_HELP_STRING([--disable-lanplus], [enable lanplus support (default=yes)]),
70 ++ [],
71 ++ [enable_lanplus=yes])
72 ++
73 ++drv_lanplus=""
74 ++LANPLUS_CFLAGS=""
75 ++LANPLUS_LDADD=""
76 ++LANPLUS_LIB=""
77 ++LANPLUS_CRYPTO=""
78 ++LANPLUS_SAM="no"
79 ++LD_SAMX=""
80 ++AS_IF([test "x$enable_lanplus" = "xyes"], [
81 + drv_lanplus="lanplus"
82 + LANPLUS_CFLAGS="-DHAVE_LANPLUS"
83 + # LANPLUS_CFLAGS="-DHAVE_LANPLUS -I${projdir}/lib/lanplus/inc"
84 + # LANPLUS_LDADD="-L../lib -lintf_lanplus -L/usr/local/lib -lcrypto"
85 + LANPLUS_LDADD="-L../lib -lipmi_lanplus -L/usr/local/lib -lcrypto"
86 +- LANPLUS_LIB="../lib/libipmi_lanplus.a"
87 ++ LANPLUS_LIB="../lib/libipmi_lanplus.a"
88 + LANPLUS_CRYPTO="-lcrypto"
89 + LANPLUS_SAM="yes"
90 + LD_SAMX="../lib/libipmi_lanplus.a -lcrypto"
91 +-fi ])
92 ++])
93 +
94 + dnl Configure libipmiutil.a for lanplus or not
95 + dnl Only SOL requires lanplus, so usually build libipmiutil.a without lanplus
96 +@@ -128,21 +134,28 @@
97 + #fi
98 +
99 + # strings /lib/libssl.so* |grep EVP_sha256
100 +-dnl configure for SHA256, build lanplus with SHA256 support, uses later openssl.
101 ++dnl configure for SHA256, build lanplus with SHA256 support
102 ++dnl requires openssl-1.0.1 which was released in 2012/03
103 + AC_ARG_ENABLE([sha256],
104 +- [ --enable-sha256 build with SHA256 support, requires later openssl.],
105 +- [if test "x$enableval" = "xyes"; then
106 +- LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
107 +- fi]
108 +- )
109 ++ AS_HELP_STRING([--disable-sha256], [build with SHA256 support (default=yes)]),
110 ++ dnl action if passed
111 ++ [],
112 ++ dnl action if not passed
113 ++ [enable_sha256=yes]
114 ++ )
115 ++AS_IF([test "x$enable_sha256" = "xyes"], [
116 ++ LANPLUS_CFLAGS="$LANPLUS_CFLAGS -DHAVE_SHA256"
117 ++])
118 +
119 + dnl configure for EKANALYZER, build with ekanalyzer function enabled
120 + AC_ARG_ENABLE([ekanalyzer],
121 +- [ --enable-ekanalyzer build with ekanalyzer function enabled.],
122 +- [if test "x$enableval" = "xyes"; then
123 ++ AS_HELP_STRING([--enable-ekanalyzer], [build with ekanalyzer function enabled.]),
124 ++ [],
125 ++ [enable_ekanalyzer=no]
126 ++ )
127 ++AS_IF([test "x$enable_ekanalyzer" = "xyes"], [
128 + OS_CFLAGS="$OS_CFLAGS -DHAVE_EKANAL"
129 +- fi]
130 +- )
131 ++ ])
132 +
133 + GPL_CFLAGS=""
134 + CROSS_LFLAGS=""
135 +@@ -152,17 +165,20 @@
136 + SYSTEMD_DIR=/usr/share/ipmiutil
137 +
138 + AC_ARG_ENABLE([useflags],
139 +- [ --enable-useflags include environment CFLAGS and LDFLAGS.],
140 +- [if test "x$enableval" = "xyes"; then
141 ++ AS_HELP_STRING([--enable-useflags], [include environment CFLAGS and LDFLAGS.]),
142 ++ [],
143 ++ [enable_useflags=no])
144 ++AS_IF([test "x$enable_useflags" = "xyes"], [
145 + CROSS_CFLAGS="$CFLAGS"
146 + CROSS_LFLAGS="$LDFLAGS"
147 +- fi]
148 +- )
149 ++])
150 +
151 + dnl configure for standalone, with no lanplus or GPL libs
152 + AC_ARG_ENABLE([standalone],
153 +- [ --enable-standalone build standalone, with no GPL or LanPlus libs.],
154 +- [if test "x$enableval" = "xyes"; then
155 ++ AS_HELP_STRING([--enable-standalone], [build standalone, with no GPL or LanPlus libs.]),
156 ++ [],
157 ++ [enable_standalone=no])
158 ++AS_IF([test "x$enable_standalone" = "xyes"], [
159 + GPL_CFLAGS=""
160 + LANPLUS_CFLAGS=""
161 + LANPLUS_LDADD=""
162 +@@ -176,27 +192,30 @@
163 + # cross-compiling, so link with -static (e.g. Android ARM)
164 + CROSS_LFLAGS="-static"
165 + CROSS_CFLAGS="-DCROSS_COMPILE"
166 ++ # TODO: how can this be effective? Configure only converts Makefile.in -> Makefile
167 ++ # Configure does not convert Makefile.am->Makefile.in
168 + 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
169 + fi
170 +- fi]
171 +- )
172 ++ ])
173 +
174 + dnl build libipmiutil with sensor modules
175 + AC_ARG_ENABLE([libsensors],
176 +- [ --enable-libsensors build libipmiutil with sensor modules [[default=no]]],
177 +- [if test "x$enableval" = "xyes"; then
178 +- LIBSENSORS="isensor2.o ievents2.o"
179 +- SAM2OBJ=""
180 +- fi]
181 +- )
182 ++ AS_HELP_STRING([--enable-libsensors], [build libipmiutil with sensor modules (default=no)]),
183 ++ [],
184 ++ [enable_libsensors=no])
185 ++AS_IF([test "x$enable_libsensors" = "xyes"], [
186 ++ LIBSENSORS="isensor2.o ievents2.o"
187 ++ SAM2OBJ=""
188 ++ ])
189 +
190 + dnl configure for GPL build or not (GPL files: md2.h, ipmi_ioctl.h)
191 + AC_ARG_ENABLE([gpl],
192 +- [ --enable-gpl build with some GPL code [[default=no]]],
193 +- [if test "x$enableval" = "xyes"; then
194 +- GPL_CFLAGS="-DALLOW_GPL"
195 +- fi]
196 +- )
197 ++ AS_HELP_STRING([--enable-gpl], [build with some GPL code (default=no)]),
198 ++ [],
199 ++ [enable_gpl=no])
200 ++AS_IF([test "x$enable_gpl" = "xyes"], [
201 ++ GPL_CFLAGS="-DALLOW_GPL"
202 ++ ])
203 +
204 + dnl Does this Linux have systemd enabled? Otherwise use sysv init.
205 + AC_ARG_ENABLE([systemd],
206
207 diff --git a/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild b/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild
208 new file mode 100644
209 index 00000000000..dd9d9ba74e6
210 --- /dev/null
211 +++ b/sys-apps/ipmiutil/ipmiutil-3.1.5-r1.ebuild
212 @@ -0,0 +1,66 @@
213 +# Copyright 1999-2019 Gentoo Authors
214 +# Distributed under the terms of the GNU General Public License v2
215 +
216 +EAPI=7
217 +inherit autotools systemd
218 +
219 +DESCRIPTION="IPMI Management Utilities"
220 +HOMEPAGE="http://ipmiutil.sourceforge.net/"
221 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
222 +
223 +LICENSE="BSD"
224 +SLOT="0"
225 +KEYWORDS="~amd64 ~hppa ~ppc ~x86"
226 +IUSE="static-libs"
227 +
228 +RDEPEND=">=dev-libs/openssl-1:0="
229 +DEPEND="${RDEPEND}
230 + virtual/os-headers"
231 +
232 +PATCHES=(
233 + "${FILESDIR}"/${PN}-2.9.8-flags.patch
234 + "${FILESDIR}"/${PN}-2.9.9-lib_symlink.patch
235 + "${FILESDIR}"/${PN}-3.1.5-fix-configure.patch
236 +)
237 +
238 +src_prepare() {
239 + default
240 +
241 + sed -i -e 's|-O2 -g|$(CFLAGS)|g;s|-g -O2|$(CFLAGS)|g' util/Makefile.am* || die
242 + sed -i -e 's|which rpm |which we_are_gentoo_rpm_is_a_guest |' configure.ac || die
243 +
244 + # Don't compress man pages
245 + sed '/gzip -f/d' -i doc/Makefile.am || die
246 +
247 + eautoreconf
248 +}
249 +
250 +src_configure() {
251 + econf --disable-systemd --enable-sha256 --enable-lanplus
252 +}
253 +
254 +src_compile() {
255 + # Ulgy workaround. Upstream is misusing the make system here
256 + # and it doesn't even work.
257 + # Please check on each bump if this workaround is still required.
258 + pushd lib/lanplus &>/dev/null || die
259 + emake
260 + cp libipmi_lanplus.a .. || die
261 + popd &>/dev/null || die
262 +
263 + emake
264 +}
265 +
266 +src_install() {
267 + emake DESTDIR="${D}" sysdto="${D}/$(systemd_get_systemunitdir)" install
268 + dodoc -r AUTHORS ChangeLog NEWS README TODO doc/UserGuide
269 +
270 + # Init scripts are only for Fedora
271 + rm -r "${ED}"/etc/init.d || die 'remove initscripts failed'
272 +
273 + if ! use static-libs ; then
274 + find "${ED}" -type f -name '*.a' -delete || die
275 + fi
276 +
277 + keepdir /var/lib/ipmiutil
278 +}