From 085daf474330276ac0b45b1c49ffc601830f4906 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 20 Apr 2022 09:28:18 +0200 Subject: [PATCH] nm: Remove old libnm-glib compat stuff This shouldn't be necessary anymore. --- src/frontends/gnome/Makefile.am | 17 ----------- src/frontends/gnome/configure.ac | 29 ++++--------------- .../gnome/nm-strongswan-service.name.in | 1 - src/frontends/gnome/properties/Makefile.am | 21 -------------- .../gnome/properties/nm-strongswan.c | 8 ----- 5 files changed, 5 insertions(+), 71 deletions(-) diff --git a/src/frontends/gnome/Makefile.am b/src/frontends/gnome/Makefile.am index 646d913a24..3dd41a3bc7 100644 --- a/src/frontends/gnome/Makefile.am +++ b/src/frontends/gnome/Makefile.am @@ -11,23 +11,6 @@ metainfo_DATA = $(metainfo_in_files:.xml.in=.xml) metainfo_in_files = NetworkManager-strongswan.metainfo.xml.in @INTLTOOL_XML_RULE@ -if WITH_LIBNM_GLIB -# Install a file with full path to plugins for an old gnome-shell -# https://bugzilla.gnome.org/show_bug.cgi?id=693590 -install-data-hook: - mkdir -p $(DESTDIR)$(sysconfdir)/NetworkManager/VPN - sed -e "1s|^|# This file is obsoleted by a file in $(nmvpnservicedir)\n\n|" \ - -e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|g' \ - -e 's|[@]NM_PLUGINDIR[@]|$(nm_plugindir)|g' \ - -e 's|[@]NM_PLUGINDIR_ABS[@]|$(nm_plugindir)|g' \ - -e 's|[@]CHARON[@]|$(charon)|' \ - <$(srcdir)/nm-strongswan-service.name.in \ - >$(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-strongswan-service.name - -uninstall-hook: - rm -f $(DESTDIR)$(sysconfdir)/NetworkManager/VPN/nm-strongswan-service.name -endif - nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in $(AM_V_GEN) \ sed -e 's|[@]NM_LIBEXECDIR[@]|$(nm_libexecdir)|' \ diff --git a/src/frontends/gnome/configure.ac b/src/frontends/gnome/configure.ac index f92049bf58..8dd57ed882 100644 --- a/src/frontends/gnome/configure.ac +++ b/src/frontends/gnome/configure.ac @@ -66,36 +66,17 @@ AC_ARG_ENABLE( [nm-absolute-paths], AS_HELP_STRING([--enable-nm-absolute-paths],[use absolute paths for NM plugins in the .name file]) ) -AC_ARG_WITH( - [libnm-glib], - AS_HELP_STRING([--without-libnm-glib], [build NetworkManager-strongswan without libnm-glib compatibility]), - [with_libnm_glib=no], - [with_libnm_glib=yes] -) - -AM_CONDITIONAL(WITH_LIBNM_GLIB, test "$with_libnm_glib" != no) PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0) LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2" LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2" PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0) -if test x"$with_libnm_glib" != xno; then - PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn) - PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.1.0) - if test -z "$nm_libexecdir"; then - nm_libexecdir=$($PKG_CONFIG --variable=libgnome_serverdir NetworkManager) - fi - if test -z "$nm_plugindir"; then - nm_plugindir=$($PKG_CONFIG --variable=plugindir NetworkManager) - fi -else - if test -z "$nm_libexecdir"; then - nm_libexecdir=$($PKG_CONFIG --variable=exec_prefix libnm)/lib/NetworkManager - fi - if test -z "$nm_plugindir"; then - nm_plugindir=$($PKG_CONFIG --variable=libdir libnm)/NetworkManager - fi +if test -z "$nm_libexecdir"; then + nm_libexecdir=$($PKG_CONFIG --variable=exec_prefix libnm)/lib/NetworkManager +fi +if test -z "$nm_plugindir"; then + nm_plugindir=$($PKG_CONFIG --variable=libdir libnm)/NetworkManager fi AC_SUBST(nm_libexecdir) diff --git a/src/frontends/gnome/nm-strongswan-service.name.in b/src/frontends/gnome/nm-strongswan-service.name.in index f52eec26df..373262a41a 100644 --- a/src/frontends/gnome/nm-strongswan-service.name.in +++ b/src/frontends/gnome/nm-strongswan-service.name.in @@ -8,5 +8,4 @@ plugin=@NM_PLUGINDIR@/libnm-vpn-plugin-strongswan.so [GNOME] auth-dialog=@NM_LIBEXECDIR@/nm-strongswan-auth-dialog -properties=@NM_PLUGINDIR_ABS@/libnm-strongswan-properties supports-external-ui-mode=true diff --git a/src/frontends/gnome/properties/Makefile.am b/src/frontends/gnome/properties/Makefile.am index 317305d6fa..3906872527 100644 --- a/src/frontends/gnome/properties/Makefile.am +++ b/src/frontends/gnome/properties/Makefile.am @@ -1,16 +1,9 @@ nm_plugin_LTLIBRARIES = libnm-vpn-plugin-strongswan.la -if WITH_LIBNM_GLIB -nm_plugin_LTLIBRARIES += libnm-strongswan-properties.la -endif - libnm_vpn_plugin_strongswan_la_SOURCES = \ nm-strongswan.c \ nm-strongswan.h -libnm_strongswan_properties_la_SOURCES = \ - $(libnm_vpn_plugin_strongswan_la_SOURCES) - uidir = $(datadir)/gnome-vpn-properties/strongswan ui_DATA = nm-strongswan-dialog.ui @@ -25,26 +18,12 @@ libnm_vpn_plugin_strongswan_la_CFLAGS = \ $(LIBNMA_CFLAGS) \ $(common_CFLAGS) -libnm_strongswan_properties_la_CFLAGS = \ - -DNM_STRONGSWAN_OLD \ - $(LIBNM_GTK_CFLAGS) \ - $(LIBNM_GLIB_CFLAGS) \ - $(common_CFLAGS) - libnm_vpn_plugin_strongswan_la_LIBADD = \ $(GTK_LIBS) \ $(LIBNMA_LIBS) \ $(LIBNM_LIBS) -libnm_strongswan_properties_la_LIBADD = \ - $(GTK_LIBS) \ - $(LIBNM_GTK_LIBS) \ - $(LIBNM_GLIB_LIBS) - libnm_vpn_plugin_strongswan_la_LDFLAGS = \ -avoid-version -libnm_strongswan_properties_la_LDFLAGS = \ - $(libnm_vpn_plugin_strongswan_la_LDFLAGS) - EXTRA_DIST = $(ui_DATA) diff --git a/src/frontends/gnome/properties/nm-strongswan.c b/src/frontends/gnome/properties/nm-strongswan.c index 07bfb1c563..e42074ab64 100644 --- a/src/frontends/gnome/properties/nm-strongswan.c +++ b/src/frontends/gnome/properties/nm-strongswan.c @@ -27,16 +27,8 @@ #include #include -#ifdef NM_STRONGSWAN_OLD -#define NM_VPN_LIBNM_COMPAT -#include -#include -#include -#include -#else #include #include -#endif #include "nm-strongswan.h" -- 2.47.2