From 0be45b334ced4fd10ab90485bf40b64bda5165e6 Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Sun, 25 Jun 2023 15:36:28 -0500 Subject: [PATCH] vala: patch to circumvent apparent pkgconf bug There is an apparent bug in pkgconf 1.9 that broke building the OpenWrt Vala package. This adds a patch to circumvent the bug. For the related discussion, see: https://github.com/openwrt/packages/issues/21359 The pkgconf bug appears similar to the one discussed here: https://github.com/pkgconf/pkgconf/issues/268 Signed-off-by: W. Michael Petullo (cherry picked from commit a7e1ba32fdf4b736a44d467b0f79b7f4665ce32d) --- .../001-circumvent-glib-pkgconf-bug.patch | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lang/vala/patches/001-circumvent-glib-pkgconf-bug.patch diff --git a/lang/vala/patches/001-circumvent-glib-pkgconf-bug.patch b/lang/vala/patches/001-circumvent-glib-pkgconf-bug.patch new file mode 100644 index 0000000000..fb60992355 --- /dev/null +++ b/lang/vala/patches/001-circumvent-glib-pkgconf-bug.patch @@ -0,0 +1,73 @@ +This patch circumvents an apparent bug in pkgconf 1.9 that prevents +building the OpenWrt Vala package. For a discussion of this, see: + +https://github.com/openwrt/packages/issues/21359 + +The pkgconf bug seems similar to the one discussed here: + +https://github.com/pkgconf/pkgconf/issues/268 + +--- a/configure ++++ b/configure +@@ -13598,11 +13598,11 @@ if test -n "$GLIB_CFLAGS"; then + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5 ++ ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null` ++ pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -13615,11 +13615,11 @@ if test -n "$GLIB_LIBS"; then + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 >= \$GLIB_REQUIRED\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED") 2>&5 ++ ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>/dev/null` ++ pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -13640,9 +13640,9 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>&1` ++ GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>&1` + else +- GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED" 2>&1` ++ GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0 >= $GLIB_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 +--- a/gobject-introspection/Makefile.in ++++ b/gobject-introspection/Makefile.in +@@ -383,8 +383,8 @@ libgidl_la_SOURCES = \ + $(NULL) + + libgidl_la_LIBADD = \ +- $(GLIB_LIBS) \ + $(GMODULE_LIBS) \ ++ $(GLIB_LIBS) \ + $(NULL) + + BUILT_SOURCES = scannerparser.h +@@ -400,8 +400,8 @@ gen_introspect_SOURCES = \ + $(NULL) + + gen_introspect_LDADD = \ +- $(GLIB_LIBS) \ + $(GMODULE_LIBS) \ ++ $(GLIB_LIBS) \ + libgidl.la \ + $(NULL) + -- 2.30.2