Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libsmi/files/, net-libs/libsmi/
Date: Mon, 12 Sep 2022 16:51:52
Message-Id: 1663001032.f06c026637c9e42deb6e8b0efe45fe3634475d6e.sam@gentoo
1 commit: f06c026637c9e42deb6e8b0efe45fe3634475d6e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 12 16:43:52 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 12 16:43:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f06c0266
7
8 net-libs/libsmi: fix configure tests with Clang 15
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/libsmi-0.5.0-clang-15-configure.patch | 42 ++++++++++++++++++++++
13 ...bsmi-0.5.0-r2.ebuild => libsmi-0.5.0-r3.ebuild} | 8 +++++
14 2 files changed, 50 insertions(+)
15
16 diff --git a/net-libs/libsmi/files/libsmi-0.5.0-clang-15-configure.patch b/net-libs/libsmi/files/libsmi-0.5.0-clang-15-configure.patch
17 new file mode 100644
18 index 000000000000..7955c4a36f6a
19 --- /dev/null
20 +++ b/net-libs/libsmi/files/libsmi-0.5.0-clang-15-configure.patch
21 @@ -0,0 +1,42 @@
22 +--- a/configure.ac
23 ++++ b/configure.ac
24 +@@ -43,7 +43,8 @@ CC="$withval")
25 +
26 + AC_MSG_CHECKING([for additional required compiler flags])
27 + AC_TRY_RUN([#include <stdio.h>
28 +- main() {
29 ++ #include <stdlib.h>
30 ++ int main() {
31 + #ifdef __SUNPRO_C
32 + exit(0);
33 + #else
34 +@@ -105,7 +106,8 @@ dirseparator="$withval", dirseparator="")
35 + AC_MSG_CHECKING([for path separator character])
36 + if test "$pathseparator" = "" ; then
37 + AC_TRY_RUN([#include <stdio.h>
38 +- main() {
39 ++ #include <stdlib.h>
40 ++ int main() {
41 + #ifdef _WIN32
42 + exit(0);
43 + #else
44 +@@ -119,7 +121,8 @@ echo $pathseparator
45 + AC_MSG_CHECKING([for dir separator character])
46 + if test "$dirseparator" = "" ; then
47 + AC_TRY_RUN([#include <stdio.h>
48 +- main() {
49 ++ #include <stdlib.h>
50 ++ int main() {
51 + #ifdef _WIN32
52 + exit(0);
53 + #else
54 +@@ -145,7 +148,8 @@ AC_MSG_CHECKING([for 64 bit types])
55 + # if used with the (correct) value -9223372036854775808LL.
56 + #
57 + AC_TRY_RUN([#include <stdio.h>
58 +- main() {
59 ++ #include <stdlib.h>
60 ++ int main() {
61 + long long ll;
62 + unsigned long long ull;
63 + exit(0);
64
65 diff --git a/net-libs/libsmi/libsmi-0.5.0-r2.ebuild b/net-libs/libsmi/libsmi-0.5.0-r3.ebuild
66 similarity index 90%
67 rename from net-libs/libsmi/libsmi-0.5.0-r2.ebuild
68 rename to net-libs/libsmi/libsmi-0.5.0-r3.ebuild
69 index 92b2580e9492..ef7935dddac7 100644
70 --- a/net-libs/libsmi/libsmi-0.5.0-r2.ebuild
71 +++ b/net-libs/libsmi/libsmi-0.5.0-r3.ebuild
72 @@ -3,6 +3,8 @@
73
74 EAPI=8
75
76 +inherit autotools
77 +
78 DESCRIPTION="A Library to Access SMI MIB Information"
79 HOMEPAGE="https://www.ibr.cs.tu-bs.de/projects/libsmi/ https://gitlab.ibr.cs.tu-bs.de/nm/libsmi"
80 SRC_URI="https://www.ibr.cs.tu-bs.de/projects/libsmi/download/${P}.tar.gz"
81 @@ -20,8 +22,14 @@ BDEPEND="
82
83 PATCHES=(
84 "${FILESDIR}"/${PN}-0.5.0-implicit-function-declarations.patch
85 + "${FILESDIR}"/${PN}-0.5.0-clang-15-configure.patch
86 )
87
88 +src_prepare() {
89 + default
90 + eautoreconf
91 +}
92 +
93 src_test() {
94 # sming test is known to fail and some other fail if LC_ALL!=C:
95 # https://mail.ibr.cs.tu-bs.de/pipermail/libsmi/2008-March/001014.html