[mutter] plugin: Rename the .so file from plugin.so to libplugin.so
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] plugin: Rename the .so file from plugin.so to libplugin.so
- Date: Tue, 6 Nov 2018 18:07:25 +0000 (UTC)
commit 0afaf5262bd3fc39fe8d9ae971c1f042bde8bed0
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Jul 12 22:20:20 2018 +0200
plugin: Rename the .so file from plugin.so to libplugin.so
This is the filename convention you get when you define a shared module
in meson, and since there is no particular reason to not include the
"lib" prefix, lets make it easier to port it over. While at it,
de-duplicate the retrieval of the plugin name.
src/Makefile-tests.am | 2 ++
src/compositor/plugins/Makefile.am | 12 ++++++------
src/core/mutter.c | 2 +-
src/tests/headless-start-test.c | 3 ++-
src/tests/test-runner.c | 2 +-
src/tests/test-utils.c | 6 ++++++
src/tests/test-utils.h | 2 ++
src/tests/unit-tests.c | 2 +-
8 files changed, 21 insertions(+), 10 deletions(-)
---
diff --git a/src/Makefile-tests.am b/src/Makefile-tests.am
index 45b2d6bfe..b38f9a57d 100644
--- a/src/Makefile-tests.am
+++ b/src/Makefile-tests.am
@@ -66,6 +66,8 @@ mutter_test_unit_tests_SOURCES = \
mutter_test_unit_tests_LDADD = $(MUTTER_LIBS) libmutter-$(LIBMUTTER_API_VERSION).la
mutter_test_headless_start_test_SOURCES = \
+ tests/test-utils.c \
+ tests/test-utils.h \
tests/headless-start-test.c \
tests/meta-backend-test.c \
tests/meta-backend-test.h \
diff --git a/src/compositor/plugins/Makefile.am b/src/compositor/plugins/Makefile.am
index 99ed08d99..811bcba92 100644
--- a/src/compositor/plugins/Makefile.am
+++ b/src/compositor/plugins/Makefile.am
@@ -19,12 +19,12 @@ AM_CPPFLAGS = \
-DSN_API_NOT_YET_FROZEN=1 \
-DMUTTER_PLUGIN_DIR=\"$(MUTTER_PLUGIN_DIR)\"
-default_la_CFLAGS = -fPIC
-default_la_SOURCES = default.c
-default_la_LDFLAGS = -module -avoid-version -no-undefined
-default_la_LIBADD = $(CLUTTER_LIBS)
+libdefault_la_CFLAGS = -fPIC
+libdefault_la_SOURCES = default.c
+libdefault_la_LDFLAGS = -module -avoid-version -no-undefined
+libdefault_la_LIBADD = $(CLUTTER_LIBS)
-pkglib_LTLIBRARIES = default.la
+pkglib_LTLIBRARIES = libdefault.la
# post-install hook to remove the .la and .a files we are not interested in
# (There is no way to stop libtool generating static libs locally, and we
@@ -37,4 +37,4 @@ install-exec-hook:
# since it counts on libtool to remove the .la files, so just kill the
# .so file manually.
uninstall-local:
- -rm -f $(DESTDIR)$(pkglibdir)/default.so
+ -rm -f $(DESTDIR)$(pkglibdir)/libdefault.so
diff --git a/src/core/mutter.c b/src/core/mutter.c
index 23cbf7c8e..389d99199 100644
--- a/src/core/mutter.c
+++ b/src/core/mutter.c
@@ -43,7 +43,7 @@ print_version (const gchar *option_name,
exit (0);
}
-static const char *plugin = "default";
+static const char *plugin = "libdefault";
GOptionEntry mutter_options[] = {
{
diff --git a/src/tests/headless-start-test.c b/src/tests/headless-start-test.c
index 1efff74ae..eb50b1a33 100644
--- a/src/tests/headless-start-test.c
+++ b/src/tests/headless-start-test.c
@@ -28,6 +28,7 @@
#include "meta/main.h"
#include "tests/meta-backend-test.h"
#include "tests/meta-monitor-manager-test.h"
+#include "tests/test-utils.h"
#include "wayland/meta-wayland.h"
#define ALL_TRANSFORMS ((1 << (META_MONITOR_TRANSFORM_FLIPPED_270 + 1)) - 1)
@@ -186,7 +187,7 @@ main (int argc, char *argv[])
{
init_tests (argc, argv);
- meta_plugin_manager_load ("default");
+ meta_plugin_manager_load (test_get_plugin_name ());
meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND,
META_TYPE_BACKEND_TEST);
diff --git a/src/tests/test-runner.c b/src/tests/test-runner.c
index be3b4197e..84c3f8a84 100644
--- a/src/tests/test-runner.c
+++ b/src/tests/test-runner.c
@@ -840,7 +840,7 @@ main (int argc, char **argv)
}
g_option_context_free (ctx);
- meta_plugin_manager_load ("default");
+ meta_plugin_manager_load (test_get_plugin_name ());
meta_wayland_override_display_name ("mutter-test-display");
meta_init ();
diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c
index 04b4c501e..ebc076a52 100644
--- a/src/tests/test-utils.c
+++ b/src/tests/test-utils.c
@@ -443,3 +443,9 @@ test_client_destroy (TestClient *client)
g_free (client->id);
g_free (client);
}
+
+const char *
+test_get_plugin_name (void)
+{
+ return "libdefault";
+}
diff --git a/src/tests/test-utils.h b/src/tests/test-utils.h
index 9280e7ead..db11fea6e 100644
--- a/src/tests/test-utils.h
+++ b/src/tests/test-utils.h
@@ -79,4 +79,6 @@ TestClient * test_client_new (const char *id,
void test_client_destroy (TestClient *client);
+const char * test_get_plugin_name (void);
+
#endif /* TEST_UTILS_H */
diff --git a/src/tests/unit-tests.c b/src/tests/unit-tests.c
index f933ff9ba..ade759948 100644
--- a/src/tests/unit-tests.c
+++ b/src/tests/unit-tests.c
@@ -262,7 +262,7 @@ main (int argc, char *argv[])
test_init (argc, argv);
init_tests (argc, argv);
- meta_plugin_manager_load ("default");
+ meta_plugin_manager_load (test_get_plugin_name ());
meta_override_compositor_configuration (META_COMPOSITOR_TYPE_WAYLAND,
META_TYPE_BACKEND_TEST);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]