* [gentoo-commits] repo/gentoo:master commit in: net-libs/libsmi/, net-libs/libsmi/files/
@ 2022-10-30 20:41 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-30 20:41 UTC (permalink / raw
To: gentoo-commits
commit: 7c1ddcdd1824b74e6b051d3ac4b1f3c1096b8603
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 30 18:04:22 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 20:41:32 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1ddcdd
net-libs/libsmi: fix libsmi.m4 for clang 16
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../libsmi/files/libsmi-0.5.0-fix-macro-clang16.patch | 16 ++++++++++++++++
.../{libsmi-0.5.0-r3.ebuild => libsmi-0.5.0-r4.ebuild} | 1 +
2 files changed, 17 insertions(+)
diff --git a/net-libs/libsmi/files/libsmi-0.5.0-fix-macro-clang16.patch b/net-libs/libsmi/files/libsmi-0.5.0-fix-macro-clang16.patch
new file mode 100644
index 000000000000..0ffe6dd92606
--- /dev/null
+++ b/net-libs/libsmi/files/libsmi-0.5.0-fix-macro-clang16.patch
@@ -0,0 +1,16 @@
+stdio needed for sscanf(), stdlib is included by smi.h but let's include it
+anyway for exit().
+--- a/libsmi.m4
++++ b/libsmi.m4
+@@ -12,7 +12,10 @@ AC_DEFUN([AM_PATH_LIBSMI],
+ AC_MSG_CHECKING([whether to enable libsmi])
+ AC_TRY_RUN([ /* libsmi available check */
+ #include <smi.h>
+-main()
++#include <stdlib.h>
++#include <stdio.h>
++#include <string.h>
++int main(void)
+ {
+ int current, revision, age, n;
+ const int required = 2;
diff --git a/net-libs/libsmi/libsmi-0.5.0-r3.ebuild b/net-libs/libsmi/libsmi-0.5.0-r4.ebuild
similarity index 95%
rename from net-libs/libsmi/libsmi-0.5.0-r3.ebuild
rename to net-libs/libsmi/libsmi-0.5.0-r4.ebuild
index ef7935dddac7..6f190736f93a 100644
--- a/net-libs/libsmi/libsmi-0.5.0-r3.ebuild
+++ b/net-libs/libsmi/libsmi-0.5.0-r4.ebuild
@@ -23,6 +23,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.5.0-implicit-function-declarations.patch
"${FILESDIR}"/${PN}-0.5.0-clang-15-configure.patch
+ #"${FILESDIR}"/${PN}-0.5.0-fix-macro-clang16.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libsmi/, net-libs/libsmi/files/
@ 2025-08-30 14:42 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-08-30 14:42 UTC (permalink / raw
To: gentoo-commits
commit: 312f5758b03134bf9282e0f5ea8b19373b0afb8f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 30 14:40:24 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 30 14:41:07 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=312f5758
net-libs/libsmi: fix parallel build
For bug #869149, we patch the parser which means files get regenerated
but there were missing Makefile dependencies.
Bug: https://bugs.gentoo.org/869149
Closes: https://bugs.gentoo.org/921929
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-libs/libsmi/files/libsmi-0.5.0-fix-bison-race.patch | 16 ++++++++++++++++
net-libs/libsmi/libsmi-0.5.0-r5.ebuild | 10 +++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/net-libs/libsmi/files/libsmi-0.5.0-fix-bison-race.patch b/net-libs/libsmi/files/libsmi-0.5.0-fix-bison-race.patch
new file mode 100644
index 000000000000..ccd0f9f8b820
--- /dev/null
+++ b/net-libs/libsmi/files/libsmi-0.5.0-fix-bison-race.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/921929
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -48,10 +48,10 @@ libsmi_la_LDFLAGS = -version-info @VERSION_LIBTOOL@
+ parser-smi.c parser-smi.tab.h: parser-smi.y scanner-smi.h parser-smi.h error.h
+ $(BISON) --defines=parser-smi.tab.h -t -psmi -o parser-smi.c parser-smi.y
+
+-parser-sming.c: parser-sming.y scanner-sming.h parser-sming.h error.h
++parser-sming.c parser-sming.tab.h: parser-sming.y scanner-sming.h parser-sming.h error.h
+ $(BISON) --defines=parser-sming.tab.h -t -psming -o parser-sming.c parser-sming.y
+
+-parser-yang.c: parser-yang.y scanner-yang.h parser-yang.h error.h
++parser-yang.c parser-yang.tab.h: parser-yang.y scanner-yang.h parser-yang.h error.h
+ $(BISON) --defines=parser-yang.tab.h -t -pyang -o parser-yang.c parser-yang.y
+
+ scanner-smi.c: scanner-smi.l scanner-smi.h parser-smi.tab.h
diff --git a/net-libs/libsmi/libsmi-0.5.0-r5.ebuild b/net-libs/libsmi/libsmi-0.5.0-r5.ebuild
index ceb218402dd4..f40acb59ceb4 100644
--- a/net-libs/libsmi/libsmi-0.5.0-r5.ebuild
+++ b/net-libs/libsmi/libsmi-0.5.0-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -24,10 +24,18 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.5.0-implicit-function-declarations.patch
"${FILESDIR}"/${PN}-0.5.0-clang-15-configure.patch
"${FILESDIR}"/${PN}-0.5.0-fix-macro-clang16.patch
+ "${FILESDIR}"/${PN}-0.5.0-fix-bison-race.patch
)
src_prepare() {
default
+
+ # Make sure to flush out all pre-generated parsers as patch them
+ # for bug #869149.
+ rm lib/{parser-smi.c,parser-smi.tab.h,parser-sming.c,parser-sming.tab.h} || die
+ rm lib/{parser-yang.c,parser-yang.tab.h} || die
+ rm lib/{scanner-smi.c,scanner-sming.c,scanner-yang.c} || die
+
eautoreconf
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-30 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-30 20:41 [gentoo-commits] repo/gentoo:master commit in: net-libs/libsmi/, net-libs/libsmi/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2025-08-30 14:42 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox