commit: f06c026637c9e42deb6e8b0efe45fe3634475d6e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 16:43:52 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 16:43:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f06c0266
net-libs/libsmi: fix configure tests with Clang 15
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libsmi-0.5.0-clang-15-configure.patch | 42 ++++++++++++++++++++++
...bsmi-0.5.0-r2.ebuild => libsmi-0.5.0-r3.ebuild} | 8 +++++
2 files changed, 50 insertions(+)
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
new file mode 100644
index 000000000000..7955c4a36f6a
--- /dev/null
+++ b/net-libs/libsmi/files/libsmi-0.5.0-clang-15-configure.patch
@@ -0,0 +1,42 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,8 @@ CC="$withval")
+
+ AC_MSG_CHECKING([for additional required compiler flags])
+ AC_TRY_RUN([#include <stdio.h>
+- main() {
++ #include <stdlib.h>
++ int main() {
+ #ifdef __SUNPRO_C
+ exit(0);
+ #else
+@@ -105,7 +106,8 @@ dirseparator="$withval", dirseparator="")
+ AC_MSG_CHECKING([for path separator character])
+ if test "$pathseparator" = "" ; then
+ AC_TRY_RUN([#include <stdio.h>
+- main() {
++ #include <stdlib.h>
++ int main() {
+ #ifdef _WIN32
+ exit(0);
+ #else
+@@ -119,7 +121,8 @@ echo $pathseparator
+ AC_MSG_CHECKING([for dir separator character])
+ if test "$dirseparator" = "" ; then
+ AC_TRY_RUN([#include <stdio.h>
+- main() {
++ #include <stdlib.h>
++ int main() {
+ #ifdef _WIN32
+ exit(0);
+ #else
+@@ -145,7 +148,8 @@ AC_MSG_CHECKING([for 64 bit types])
+ # if used with the (correct) value -9223372036854775808LL.
+ #
+ AC_TRY_RUN([#include <stdio.h>
+- main() {
++ #include <stdlib.h>
++ int main() {
+ long long ll;
+ unsigned long long ull;
+ exit(0);
diff --git a/net-libs/libsmi/libsmi-0.5.0-r2.ebuild
b/net-libs/libsmi/libsmi-0.5.0-r3.ebuild
similarity index 90%
rename from net-libs/libsmi/libsmi-0.5.0-r2.ebuild
rename to net-libs/libsmi/libsmi-0.5.0-r3.ebuild
index 92b2580e9492..ef7935dddac7 100644
--- a/net-libs/libsmi/libsmi-0.5.0-r2.ebuild
+++ b/net-libs/libsmi/libsmi-0.5.0-r3.ebuild
@@ -3,6 +3,8 @@
EAPI=8
+inherit autotools
+
DESCRIPTION="A Library to Access SMI MIB Information"
HOMEPAGE="https://www.ibr.cs.tu-bs.de/projects/libsmi/
https://gitlab.ibr.cs.tu-bs.de/nm/libsmi"
SRC_URI="https://www.ibr.cs.tu-bs.de/projects/libsmi/download/${P}.tar.gz"
@@ -20,8 +22,14 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.5.0-implicit-function-declarations.patch
+ "${FILESDIR}"/${PN}-0.5.0-clang-15-configure.patch
)
+src_prepare() {
+ default
+ eautoreconf
+}
+
src_test() {
# sming test is known to fail and some other fail if LC_ALL!=C:
# https://mail.ibr.cs.tu-bs.de/pipermail/libsmi/2008-March/001014.html