commit:     3d1884f8742df14e64f5abd4a0bd84ced7ddbea6
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Fri Dec 26 13:41:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 30 13:43:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d1884f8

net-misc/wol: fix build on musl gcc 15

Closes: https://bugs.gentoo.org/945522
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/45166
Closes: https://github.com/gentoo/gentoo/pull/45166
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/wol/files/wol-0.7.1-intl.patch | 44 ++++++++++++++++++++++++++++++
 net-misc/wol/wol-0.7.1-r5.ebuild        | 48 +++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)

diff --git a/net-misc/wol/files/wol-0.7.1-intl.patch 
b/net-misc/wol/files/wol-0.7.1-intl.patch
new file mode 100644
index 000000000000..7475a012aa9e
--- /dev/null
+++ b/net-misc/wol/files/wol-0.7.1-intl.patch
@@ -0,0 +1,44 @@
+Don't bundle outdated parts of glibc
+https://bugs.gentoo.org/945522
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,7 +3,7 @@ ACLOCAL_AMFLAGS = -I m4
+ 
+ EXTRA_DIST = config.rpath mkinstalldirs autogen.sh debian wol.spec
+ 
+-SUBDIRS = intl demo doc include lib src m4 po
++SUBDIRS = demo doc include lib src m4 po
+ 
+ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in config.h.in~ \
+ config.log config.status configure depcomp install-sh ltconfig ltmain.sh \
+--- a/configure.ac
++++ b/configure.ac
+@@ -115,7 +115,7 @@ fi
+ dnl i18n
+ ALL_LINGUAS="de fr it es sv"
+ dnl don't pass symbol [external] since it will disable local intl directory
+-AM_GNU_GETTEXT
++AM_GNU_GETTEXT([external])
+ 
+ 
+ dnl
+@@ -253,7 +253,7 @@ CFLAGS="$CFLAGS -W -Wall -Wpointer-arith 
-Wimplicit-function-declaration"
+ 
+ 
+ dnl create the Makefiles
+-AC_OUTPUT([intl/Makefile po/Makefile.in
++AC_OUTPUT([po/Makefile.in
+ Makefile
+ demo/Makefile
+ doc/Makefile
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -1,7 +1,6 @@
+ noinst_LIBRARIES = libwrappers.a
+ 
+ libwrappers_a_SOURCES = wrappers.h \
+-getopt_int.h getopt.h getopt1.c getopt.c \
+ usleep.c usleep.h \
+ xmalloc.c xalloc.h \
+ getstr.c getstr.h getline.c getline.h \

diff --git a/net-misc/wol/wol-0.7.1-r5.ebuild b/net-misc/wol/wol-0.7.1-r5.ebuild
new file mode 100644
index 000000000000..4a4d9139ad4f
--- /dev/null
+++ b/net-misc/wol/wol-0.7.1-r5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Implements Wake On LAN (Magic Paket) functionality in a small 
program"
+HOMEPAGE="http://ahh.sourceforge.net/wol/";
+SRC_URI="https://downloads.sourceforge.net/ahh/${P}.tar.gz";
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="nls"
+
+PATCHES=(
+       "${FILESDIR}/${P}-musl.patch"
+       "${FILESDIR}/${P}-Fix-config.h-test-consumption.patch"
+       "${FILESDIR}/${P}-Fix-malloc-detection.patch"
+       "${FILESDIR}/${P}-linux-headers.patch"
+       "${FILESDIR}/${P}-intl.patch"
+)
+
+src_prepare() {
+       default
+
+       # https://bugs.gentoo.org/945522
+       rm -r intl/ lib/getopt.h || die
+
+       # bug #874420
+       eautoreconf
+}
+
+src_configure() {
+       export jm_cv_func_working_{re,m}alloc=yes
+
+       local myeconfargs=(
+               --disable-rpath
+               $(use_enable nls)
+       )
+
+       econf ${myeconfargs[@]}
+}
+
+src_compile() {
+       emake AR="$(tc-getAR)"
+}

Reply via email to