diff mbox series

[PATCHv2] autoconf-archive: add backport patch to fix gl detection

Message ID 20250730092958.383275-1-f_l_k@t-online.de
State New
Headers show
Series [PATCHv2] autoconf-archive: add backport patch to fix gl detection | expand

Commit Message

Markus Volk July 30, 2025, 9:29 a.m. UTC
Detecting opengl using autoconf-archive currently fails:
| aclocal: warning: couldn't open directory 'm4': No such file or directory
| configure.ac:306: error: _AX_CHECK_GL_MANUAL_LIBS_GENERIC: argument must not be empty
| ../sources/autoconf-2.72/lib/m4sugar/m4sh.m4:690: _AS_IF_ELSE is expanded from...
| ../sources/autoconf-2.72/lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
| /home/flk/poky/build/tmp/work/corei7-64-poky-linux/cava/0.10.4/recipe-sysroot-native/usr/share/aclocal/ax_check_gl.m4:187: _AX_CHECK_GL_MANUAL_LIBS_GENERIC is expanded from...
| ../sources/autoconf-2.72/lib/m4sugar/m4sh.m4:595: AS_CASE is expanded from...
| /home/flk/poky/build/tmp/work/corei7-64-poky-linux/cava/0.10.4/recipe-sysroot-native/usr/share/aclocal/ax_check_gl.m4:253: AX_CHECK_GL is expanded from...
| ../sources/autoconf-2.72/lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
| ../sources/autoconf-2.72/lib/m4sugar/m4sh.m4:697: AS_IF is expanded from...
| configure.ac:306: the top level
| autom4te: error: m4 failed with exit status: 1

This issue has already been fixed upstream, but there has been no new release since then.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 ...226a2fe3980388abffd6de25ed6b9591cce3.patch | 39 +++++++++++++++++++
 .../autoconf-archive_2024.10.16.bb            |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 meta/recipes-devtools/autoconf-archive/autoconf-archive/427e226a2fe3980388abffd6de25ed6b9591cce3.patch
diff mbox series

Patch

diff --git a/meta/recipes-devtools/autoconf-archive/autoconf-archive/427e226a2fe3980388abffd6de25ed6b9591cce3.patch b/meta/recipes-devtools/autoconf-archive/autoconf-archive/427e226a2fe3980388abffd6de25ed6b9591cce3.patch
new file mode 100644
index 0000000000..99c6ae0aec
--- /dev/null
+++ b/meta/recipes-devtools/autoconf-archive/autoconf-archive/427e226a2fe3980388abffd6de25ed6b9591cce3.patch
@@ -0,0 +1,39 @@ 
+From 427e226a2fe3980388abffd6de25ed6b9591cce3 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Sat, 19 Oct 2024 21:51:30 -0400
+Subject: [PATCH] ax_check_gl.m4: properly quote m4_fatal
+
+It needs to only run as an argument of m4_if, not all the time.
+
+Fixes: 753493bf7e251997f02559b98fc599d4a337d8cd
+Bug: https://bugs.gentoo.org/941845
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+
+Upstream-Status: Backport [https://github.com/autoconf-archive/autoconf-archive/commit/427e226a2fe3980388abffd6de25ed6b9591cce3]
+---
+ m4/ax_check_gl.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/m4/ax_check_gl.m4 b/m4/ax_check_gl.m4
+index 850d407d..4c2e4efb 100644
+--- a/m4/ax_check_gl.m4
++++ b/m4/ax_check_gl.m4
+@@ -85,7 +85,7 @@
+ #   modified version of the Autoconf Macro, you may extend this special
+ #   exception to the GPL to apply to your modified version as well.
+ 
+-#serial 23
++#serial 24
+ 
+ # example gl program
+ m4_define([_AX_CHECK_GL_PROGRAM],
+@@ -187,7 +187,7 @@ AC_DEFUN([_AX_CHECK_GL_LINK_CV],
+ AC_DEFUN([_AX_CHECK_GL_MANUAL_LIBS_GENERIC], [
+   AS_IF([test -n "$GL_LIBS"],[], [
+     ax_check_gl_manual_libs_generic_extra_libs="$1"
+-    m4_if($1, [], m4_fatal([$0: argument must not be empty]))
++    m4_if($1, [], [m4_fatal([$0: argument must not be empty])])
+ 
+     _AX_CHECK_GL_SAVE_FLAGS([CFLAGS])
+     AC_SEARCH_LIBS([glBegin],[$ax_check_gl_manual_libs_generic_extra_libs], [
diff --git a/meta/recipes-devtools/autoconf-archive/autoconf-archive_2024.10.16.bb b/meta/recipes-devtools/autoconf-archive/autoconf-archive_2024.10.16.bb
index 11708de1c8..5d780d2f7c 100644
--- a/meta/recipes-devtools/autoconf-archive/autoconf-archive_2024.10.16.bb
+++ b/meta/recipes-devtools/autoconf-archive/autoconf-archive_2024.10.16.bb
@@ -6,6 +6,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=11cc2d3ee574f9d6b7ee797bdce4d423 \
     file://COPYING.EXCEPTION;md5=fdef168ebff3bc2f13664c365a5fb515"
 
 SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+SRC_URI += "file://427e226a2fe3980388abffd6de25ed6b9591cce3.patch"
 SRC_URI[sha256sum] = "7bcd5d001916f3a50ed7436f4f700e3d2b1bade3ed803219c592d62502a57363"
 
 inherit autotools allarch texinfo