commit:     d0ab40cc6ba5686a3100be04dd948bbd8f3f69b4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 11 04:18:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 04:19:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0ab40cc

sys-boot/netboot: fix configure w/ clang 16

also force bison+flex.

Closes: https://bugs.gentoo.org/875116
Closes: https://bugs.gentoo.org/881463
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/netboot-0.10.2-configure-clang16.patch   | 37 ++++++++++++++++++++++
 ...t-0.10.2-r3.ebuild => netboot-0.10.2-r4.ebuild} | 15 ++++++---
 2 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/sys-boot/netboot/files/netboot-0.10.2-configure-clang16.patch 
b/sys-boot/netboot/files/netboot-0.10.2-configure-clang16.patch
new file mode 100644
index 000000000000..41c13bb634e2
--- /dev/null
+++ b/sys-boot/netboot/files/netboot-0.10.2-configure-clang16.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/875116
+--- a/configure
++++ b/configure
+@@ -10772,6 +10772,7 @@ else
+ #endif
+ 
+ #include <stdio.h>
++#include <stdlib.h>
+ 
+ #ifdef RTLD_GLOBAL
+ #  define LT_DLGLOBAL         RTLD_GLOBAL
+@@ -25362,7 +25363,7 @@ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+-
++#include <stdlib.h>
+ #pragma pack(1)
+                       struct {
+                               char c[3];
+@@ -25441,7 +25442,7 @@ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+-
++#include <stdlib.h>
+ #pragma options align=packed
+                               struct {
+                                       char c[3];
+@@ -27724,6 +27725,7 @@ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
++#include <stdlib.h>
+ 
+ #ifdef USE_PACKED
+ # define PACKED __attribute__((packed))

diff --git a/sys-boot/netboot/netboot-0.10.2-r3.ebuild 
b/sys-boot/netboot/netboot-0.10.2-r4.ebuild
similarity index 89%
rename from sys-boot/netboot/netboot-0.10.2-r3.ebuild
rename to sys-boot/netboot/netboot-0.10.2-r4.ebuild
index bdaaf75e7d25..1f2eca9cc44b 100644
--- a/sys-boot/netboot/netboot-0.10.2-r3.ebuild
+++ b/sys-boot/netboot/netboot-0.10.2-r4.ebuild
@@ -1,10 +1,8 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit toolchain-funcs
-
 DESCRIPTION="Allows to remote boot a computer over an IP network"
 HOMEPAGE="http://netboot.sourceforge.net/";
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
@@ -19,12 +17,16 @@ DEPEND="
        lzo? ( dev-libs/lzo:2= )
        odbc? ( dev-db/unixODBC:= )
 "
-
 RDEPEND="${DEPEND}"
+BDEPEND="
+       sys-devel/bison
+       sys-devel/flex
+"
 
 PATCHES=(
        "${FILESDIR}/${P}-ldflags.patch"
        "${FILESDIR}/${P}-slibtool.patch"
+       "${FILESDIR}/${P}-configure-clang16.patch"
 )
 
 src_prepare() {
@@ -41,6 +43,11 @@ src_prepare() {
 }
 
 src_configure() {
+       # Force Bison
+       unset YACC
+       # Uses yy_fatal_error
+       export LEX=flex
+
        local myeconfargs=(
                --datadir="/usr/share/netboot"
                $(use_with berkdb berkeley-db)

Reply via email to