From 99aded83423bc72a951aae9d4b890fe5670ec607 Mon Sep 17 00:00:00 2001 From: Gilles Dartiguelongue Date: Sat, 18 Apr 2020 19:30:28 +0200 Subject: [PATCH] gnome-extra/nm-applet: fix bashisms in autoconf Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Mart Raudsepp --- .../nm-applet/files/1.8.24-fix-bashisms.patch | 130 ++++++++++++++++++ gnome-extra/nm-applet/nm-applet-1.8.24.ebuild | 5 + 2 files changed, 135 insertions(+) create mode 100644 gnome-extra/nm-applet/files/1.8.24-fix-bashisms.patch diff --git a/gnome-extra/nm-applet/files/1.8.24-fix-bashisms.patch b/gnome-extra/nm-applet/files/1.8.24-fix-bashisms.patch new file mode 100644 index 000000000000..36851e1ca3af --- /dev/null +++ b/gnome-extra/nm-applet/files/1.8.24-fix-bashisms.patch @@ -0,0 +1,130 @@ +From 64143dc3da8f04478acc7a875b7e9d6cb0d653b9 Mon Sep 17 00:00:00 2001 +From: Gilles Dartiguelongue +Date: Sun, 19 Apr 2020 15:08:20 +0200 +Subject: [PATCH] Remove subshells and fix invalid test syntax + +--- + configure.ac | 22 +++++++++++----------- + m4/introspection.m4 | 4 ++-- + 2 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 22f34589..56a56fee 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -126,7 +126,7 @@ dnl + GTK_DOC_CHECK(1.0) + + AC_ARG_WITH(libnm-gtk, AS_HELP_STRING([--with-libnm-gtk], [build legacy library libnm-gtk which depends on libnm-glib/libnm-util/dbus-glib (deprecated)])) +-if test "$with_libnm_gtk" == yes; then ++if test "$with_libnm_gtk" = yes; then + PKG_CHECK_MODULES(LIBNM_GLIB, + [gio-2.0 >= 2.38 + NetworkManager >= 1.7 +@@ -145,7 +145,7 @@ Configure without --with-libnm-gtk if you do not need the legacy library])]) + else + with_libnm_gtk=no + fi +-AM_CONDITIONAL(WITH_LIBNM_GTK, test "$with_libnm_gtk" == "yes") ++AM_CONDITIONAL(WITH_LIBNM_GTK, test "$with_libnm_gtk" = "yes") + + PKG_CHECK_MODULES(LIBNM, [libnm >= 1.7 gio-2.0 >= 2.38 gmodule-export-2.0]) + LIBNM_CFLAGS="$LIBNM_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38" +@@ -166,7 +166,7 @@ PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.10) + GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_10" + + AC_ARG_WITH(libnma-gtk4, AS_HELP_STRING([--with-libnma-gtk4], [build EXPERIMENTAL libnma-gtk4 library for use with GTK4])) +-if test "$with_libnma_gtk4" == yes; then ++if test "$with_libnma_gtk4" = yes; then + PKG_CHECK_MODULES(GTK4, gtk4 >= 3.94) + GTK4_CFLAGS="$GTK4_CFLAGS -DGTK_VERSION_MIN_REQUIRED=GTK_VERSION_3_96 -DGTK_VERSION_MAX_ALLOWED=GTK_VERSION_3_96" + else +@@ -214,7 +214,7 @@ AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes") + + dnl ModemManager1 with libmm-glib for WWAN support + AC_ARG_WITH(wwan, AS_HELP_STRING([--with-wwan], [Enable WWAN support (default: yes)])) +-if (test "${with_wwan}" == "no"); then ++if test "${with_wwan}" = "no"; then + AC_DEFINE(WITH_WWAN, 0, [Define if you have ModemManager/WWAN support]) + else + PKG_CHECK_MODULES(MM_GLIB, +@@ -229,7 +229,7 @@ PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 147) + + dnl SELinux + AC_ARG_WITH(selinux, AS_HELP_STRING([--with-selinux], [Enable support for adjusting SELinux labels in configuration editor (default: yes)])) +-if (test "${with_selinux}" == "no"); then ++if test "${with_selinux}" = "no"; then + AC_DEFINE(WITH_SELINUX, 0, [Define if libselinux is available]) + else + PKG_CHECK_MODULES(SELINUX, +@@ -241,7 +241,7 @@ AM_CONDITIONAL(WITH_SELINUX, test "${with_selinux}" != "no") + + dnl Jansson for team configuration editing + AC_ARG_WITH(team, AS_HELP_STRING([--with-team], [Enable team configuration editor (default: yes)])) +-if (test "${with_team}" == "no"); then ++if test "${with_team}" = "no"; then + AC_DEFINE(WITH_JANSSON, 0, [Define if Jansson is available]) + else + PKG_CHECK_MODULES(JANSSON, +@@ -253,7 +253,7 @@ AM_CONDITIONAL(WITH_JANSSON, test "${with_team}" != "no") + + dnl GCR for PKCS#11 enabled certificate chooser + AC_ARG_WITH(gcr, AS_HELP_STRING([--with-gcr], [Enable advanced certificate chooser (default: auto)])) +-if (test "${with_gcr}" == "no"); then ++if test "${with_gcr}" = "no"; then + have_gcr=no + else + PKG_CHECK_MODULES(GCR, +@@ -311,15 +311,15 @@ else + have_gcr=no); + fi + +-if (test "${have_gcr}" == "yes"); then ++if test "${have_gcr}" = "yes"; then + AC_DEFINE(WITH_GCR, 1, [Define if Gcr is available]) + else +- if (test "${with_gcr}" == "yes"); then ++ if test "${with_gcr}" = "yes"; then + AC_MSG_ERROR([gcr support was requested, but the gcr library is not available.]) + fi + AC_DEFINE(WITH_GCR, 0, [Define if Gcr is available]) + fi +-AM_CONDITIONAL(WITH_GCR, test "${have_gcr}" == "yes") ++AM_CONDITIONAL(WITH_GCR, test "${have_gcr}" = "yes") + + dnl Check for gobject introspection + GOBJECT_INTROSPECTION_CHECK([0.9.6]) +@@ -334,7 +334,7 @@ NM_LD_GC + + # Disable extra compiler warning until GTK4 doesn't trigger it via graphene + # https://github.com/ebassi/graphene/issues/134 +-if test "$with_libnma_gtk4" == yes; then ++if test "$with_libnma_gtk4" = yes; then + _CFLAGS_SAVED="$CFLAGS" + CFLAGS="$CFLAGS $GTK4_CFLAGS" + NM_COMPILER_WARNING([_CFLAGS], [float-equal], [#include ]) +diff --git a/m4/introspection.m4 b/m4/introspection.m4 +index f3bda0e7..8c64bd04 100644 +--- a/m4/introspection.m4 ++++ b/m4/introspection.m4 +@@ -31,7 +31,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], + INTROSPECTION_GIRDIR= + INTROSPECTION_TYPELIBDIR= + +- if test "x$enable_introspection" == "xno"; then ++ if test "x$enable_introspection" = "xno"; then + found_introspection="no" + else + PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], [ +@@ -53,7 +53,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], + AC_MSG_RESULT([$found_introspection]) + ], [found_introspection="no (not installed)"]) + +- if test "x$enable_introspection" == "xyes"; then ++ if test "x$enable_introspection" = "xyes"; then + if test "x$found_introspection" != "xyes"; then + AC_MSG_ERROR([introspection enabled but can't be used]) + fi +-- +2.26.0 + diff --git a/gnome-extra/nm-applet/nm-applet-1.8.24.ebuild b/gnome-extra/nm-applet/nm-applet-1.8.24.ebuild index f8af43807f49..09b643ef42f0 100644 --- a/gnome-extra/nm-applet/nm-applet-1.8.24.ebuild +++ b/gnome-extra/nm-applet/nm-applet-1.8.24.ebuild @@ -4,6 +4,7 @@ EAPI=6 GNOME2_LA_PUNT="yes" GNOME_ORG_MODULE="network-manager-applet" +GNOME2_EAUTORECONF="yes" inherit gnome2 @@ -48,6 +49,10 @@ DEPEND="${RDEPEND} PDEPEND="virtual/notification-daemon" #546134 +PATCHES=( + "${FILESDIR}"/${PV}-fix-bashisms.patch +) + src_configure() { local myconf=( --with-appindicator=$(usex ayatana ubuntu no) -- 2.26.2