flow: Promoted 'trunk' (f36cec1b6b4a) to 'feature/tcc-loader'.
--- a/CMakeLists.txt Thu Jan 28 23:15:55 2016 -0600
+++ b/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -17,6 +17,9 @@
# don't force target names to match a pattern
cmake_policy(SET CMP0037 OLD)
+ cmake_policy(SET CMP0042 NEW) endif(${CMAKE_VERSION} VERSION_GREATER "3.0.0")
###############################################################################
@@ -25,9 +28,9 @@
set(GPLUGIN_MAJOR_VERSION 0)
-set(GPLUGIN_MINOR_VERSION 24)
-set(GPLUGIN_MICRO_VERSION 1)
-set(GPLUGIN_EXTRA_VERSION)
+set(GPLUGIN_MINOR_VERSION 28) +set(GPLUGIN_MICRO_VERSION 0) +set(GPLUGIN_EXTRA_VERSION dev) set(GPLUGIN_VERSION ${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.${GPLUGIN_MICRO_VERSION}${GPLUGIN_EXTRA_VERSION})
@@ -106,27 +109,13 @@
-set(REQ_GLIB_VER 2.20.0)
-pkg_check_modules(GLIB REQUIRED
- glib-2.0>=${REQ_GLIB_VER}
- gobject-2.0>=${REQ_GLIB_VER}
+pkg_check_modules(GLIB REQUIRED glib-2.0>=2.34.0 gobject-2.0) # we separate gmodule out so our test aren't linked to it
-pkg_check_modules(GMODULE REQUIRED
- gmodule-2.0>=${REQ_GLIB_VER}
+pkg_check_modules(GMODULE REQUIRED gmodule-2.0) pkg_config_variable(glib-2.0 glib_genmarshal GLIB_GENMARSHAL)
-if(${GLIB_gobject-2.0_VERSION} LESS 2.32.0)
- set(GLIB_MKENUMS ${CMAKE_SOURCE_DIR}/tools/glib-mkenums
- CACHE FILEPATH "glib-mkenums executable"
-else(${GLIB_gobject-2.0_VERSION} LESS 2.32.0)
- pkg_config_variable(glib-2.0 glib_mkenums GLIB_MKENUMS)
-endif(${GLIB_gobject-2.0_VERSION} LESS 2.32.0)
+pkg_config_variable(glib-2.0 glib_mkenums GLIB_MKENUMS) @@ -159,6 +148,7 @@
-DPREFIX="${CMAKE_INSTALL_PREFIX}"
-DLIBDIR="${CMAKE_INSTALL_LIBDIR}"
-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"
@@ -169,16 +159,16 @@
# check if we're using gcc
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC OR APPLE) -DGPLUGIN_UNUSED=__attribute__\(\(unused\)\)
-else(CMAKE_COMPILER_IS_GNUCC)
+else(CMAKE_COMPILER_IS_GNUCC OR APPLE) -endif(CMAKE_COMPILER_IS_GNUCC)
+endif(CMAKE_COMPILER_IS_GNUCC OR APPLE) @@ -198,6 +188,7 @@
###############################################################################
add_subdirectory(gplugin)
add_subdirectory(gplugin-gtk)
+add_subdirectory(packaging) add_subdirectory(plugins)
--- a/ChangeLog Thu Jan 28 23:15:55 2016 -0600
+++ b/ChangeLog Sun Aug 21 23:56:03 2016 -0500
@@ -1,3 +1,17 @@
+ * Bumped the glib requirement to 2.34.0 + * Fix some error reporting with the native loader + * Added a load-failed signal which is emitted when a plugin fails to load + * Removed pre glib 2.32.0 code + * Fix a regression where the GIR file did not have a predictable name. + * Fix the glib requirement. It was set at 2.20, but we require 2.32. * Fixed the version numbering finally
* Updated the version in CMakeLists.txt
--- a/Debian.md Thu Jan 28 23:15:55 2016 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-Installing from Packages
-========================
-There are packages available (more to come) via our debian mirror. You can
-access it with the following commands.
- sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 75FE259AA8AC8032
- echo "deb http://gplug.in/debian jessie main" | sudo tee /etc/apt/sources.list.d/gplugin.list
- sudo apt-get install libgplugin0 libgplugin-loaders
-You can use `apt-cache search gplugin` to see the other packages that are available
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/HACKING.OSX Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,28 @@
+There are a few notes about building on OSX. +First off, building has *ONLY* been tested against homebrew. If you want to +support fink or macports, please let me know and I will merge your pull +For the Lua loader to work, you need to install lgi from luarocks either +systemwide or to a virtual environment created by LuaDist, vert, or something +When you're building lgi against homebrew you'll have to set the +PKG_CONFIG_PATH environment variable since homebrew does not install libffi +systemwide. This is easily done via: + export PKG_CONFIG_PATH=$(brew --prefix libffi)/lib/pkgconfig +and then running "luarocks install lgi" +If you're using homebrew, you need to install pygobject3 with + brew install pygobject3 --with-python3 --- a/gplugin/CMakeLists.txt Thu Jan 28 23:15:55 2016 -0600
+++ b/gplugin/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -222,30 +222,25 @@
###############################################################################
- message("The GObject Introspection build always fails on OS X, "
- include(GObjectIntrospection)
+ include(GObjectIntrospection) - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_BINARY_DIR}")
+ set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_BINARY_DIR}")
- FILENAME GPlugin-${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.gir
- PACKAGES glib-2.0 gmodule-2.0 gobject-2.0
- SCANNER_ARGS --add-include-path=${CMAKE_CURRENT_SOURCE_DIR}
- --include=GModule-2.0 --include=GObject-2.0
- COMPILER_ARGS --includedir=${CMAKE_CURRENT_SOURCE_DIR}
- SYMBOL_PREFIXES gplugin
- SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_HEADERS}
- BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES}
- ${GPLUGIN_PUBLIC_BUILT_HEADERS}
- # For loader plugin tests dependencies
- set(GPLUGIN_GIR_TARGETS ${GPLUGIN_GIR_TARGETS} PARENT_SCOPE)
+ FILENAME GPlugin-${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.gir + PACKAGES glib-2.0 gmodule-2.0 gobject-2.0 + SCANNER_ARGS --add-include-path=${CMAKE_CURRENT_SOURCE_DIR} + --include=GModule-2.0 --include=GObject-2.0 + COMPILER_ARGS --includedir=${CMAKE_CURRENT_SOURCE_DIR} + SYMBOL_PREFIXES gplugin + SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_HEADERS} + BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES} + ${GPLUGIN_PUBLIC_BUILT_HEADERS} + # For loader plugin tests dependencies + set(GPLUGIN_GIR_TARGETS ${GPLUGIN_GIR_TARGETS} PARENT_SCOPE) ###############################################################################
--- a/gplugin/gplugin-manager.c Thu Jan 28 23:15:55 2016 -0600
+++ b/gplugin/gplugin-manager.c Sun Aug 21 23:56:03 2016 -0500
@@ -37,6 +37,7 @@
@@ -89,6 +90,7 @@
void (*loaded_plugin)(GObject *manager,
+ void (*load_failed)(GObject *manager, GPluginPlugin *plugin); gboolean (*unloading_plugin)(GObject *manager,
@@ -149,7 +151,7 @@
*****************************************************************************/
gplugin_manager_real_append_path(GPluginManager *manager,
@@ -165,7 +167,7 @@
gplugin_manager_real_prepend_path(GPluginManager *manager,
@@ -181,7 +183,7 @@
gplugin_manager_real_remove_path(GPluginManager *manager,
GList *l = NULL, *link = NULL;
@@ -209,7 +211,7 @@
gplugin_manager_real_register_loader(GPluginManager *manager,
GPluginLoader *loader = NULL;
GPluginLoaderClass *lo_class = NULL;
@@ -273,7 +275,7 @@
gplugin_manager_real_unregister_loader(GPluginManager *manager,
GPluginLoaderClass *klass = NULL;
@@ -550,7 +552,7 @@
gplugin_manager_real_find_plugins(GPluginManager *manager,
GSList *plugins_list = NULL, *l;
@@ -767,15 +769,18 @@
gplugin_plugin_set_state(plugin, (ret) ? GPLUGIN_PLUGIN_STATE_LOADED :
GPLUGIN_PLUGIN_STATE_LOAD_FAILED);
- g_signal_emit(manager, signals[SIG_LOADED], 0, plugin);
+ g_signal_emit(manager, signals[SIG_LOADED], 0, plugin); + g_signal_emit(manager, signals[SIG_LOAD_FAILED], 0, plugin); gplugin_manager_real_unload_plugin(GPluginManager *manager,
GPluginLoader *loader = NULL;
@@ -832,16 +837,7 @@
gplugin_manager_finalize(GObject *obj) {
GPluginManager *manager = GPLUGIN_MANAGER(obj);
-#if GLIB_CHECK_VERSION(2,32,0)
g_queue_free_full(manager->paths, g_free);
- for(iter = manager->paths->head; iter; iter = iter->next)
- g_queue_free(manager->paths);
-#endif /* GLIB_CHECK_VERSION(2,32,0) */
/* free all the data in the plugins hash table and destroy it */
g_hash_table_foreach_remove(manager->plugins,
@@ -937,10 +933,28 @@
+ * GPluginManager::load-failed: + * @manager: The #GPluginPluginManager instance. + * @plugin: The #GPluginPlugin that failed to load. + * emitted after a plugin fails to load. + signals[SIG_LOAD_FAILED] = + g_signal_new("load-failed", + G_OBJECT_CLASS_TYPE(manager_class), + G_STRUCT_OFFSET(GPluginManagerClass, load_failed), + gplugin_marshal_VOID__OBJECT, * GPluginManager::unloading-plugin:
- * @manager: the #gpluginpluginmanager instance. treat as a #gobject.
- * @plugin: the #gpluginplugin that's about to be loaded.
- * @error: return address for a #gerror.
+ * @manager: the #GPluginPluginManager instance. treat as a #GObject. + * @plugin: the #GPluginPlugin that's about to be loaded. * emitted before a plugin is unloaded.
--- a/gplugin/gplugin-native-loader.c Thu Jan 28 23:15:55 2016 -0600
+++ b/gplugin/gplugin-native-loader.c Sun Aug 21 23:56:03 2016 -0500
@@ -132,7 +132,7 @@
*error = g_error_new(GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
"GPluginPluginInfo instance"));
@@ -151,7 +151,7 @@
if(!GPLUGIN_IS_PLUGIN_INFO(info)) {
*error = g_error_new(GPLUGIN_DOMAIN, 0,
_("the query function did not return a "
"GPluginPluginInfo instance"));
--- a/gplugin/tests/CMakeLists.txt Thu Jan 28 23:15:55 2016 -0600
+++ b/gplugin/tests/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -3,7 +3,15 @@
###############################################################################
macro(add_test_plugin plugin)
add_library(${plugin} MODULE ${plugin}.c)
- set_target_properties(${plugin} PROPERTIES PREFIX "")
+ if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(LINK_FLAGS "-undefined dynamic_lookup") + endif(CMAKE_C_COMPILER_ID MATCHES "Clang") + set_target_properties(${plugin} PROPERTIES + LINK_FLAGS "${LINK_FLAGS}" target_link_libraries(${plugin} ${GLIB_LIBRARIES} gplugin)
endmacro(add_test_plugin)
@@ -31,6 +39,7 @@
add_subdirectory(load-on-query-fail)
add_subdirectory(versioned-dependencies)
add_subdirectory(bind-local)
+add_subdirectory(unresolved-symbol) ###############################################################################
@@ -116,6 +125,15 @@
add_dependencies(test-bind-local bind-local)
add_definitions(-DTEST_BIND_LOCAL_DIR="${CMAKE_CURRENT_BINARY_DIR}/bind-local/")
+####################################### +####################################### +add_gtest(test-unresolved-symbol) +add_dependencies(test-unresolved-symbol unresolved-symbol) + -DPLUGIN_DIR="${CMAKE_CURRENT_BINARY_DIR}/unresolved-symbol" ###############################################################################
###############################################################################
--- a/gplugin/tests/test-signals.c Thu Jan 28 23:15:55 2016 -0600
+++ b/gplugin/tests/test-signals.c Sun Aug 21 23:56:03 2016 -0500
@@ -24,6 +24,7 @@
} TestGPluginManagerSignalsData;
/******************************************************************************
@@ -105,6 +106,16 @@
+test_gplugin_manager_signals_load_failed(GPLUGIN_UNUSED GObject *manager, + GPLUGIN_UNUSED GPluginPlugin *plugin, + TestGPluginManagerSignalsData *data = (TestGPluginManagerSignalsData *)d; + data->load_failed = TRUE; /******************************************************************************
*****************************************************************************/
@@ -113,7 +124,7 @@
GPluginPlugin *plugin = NULL;
GObject *manager = gplugin_manager_get_instance();
- TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
+ TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE }; gulong signals[] = { 0, 0, 0, 0};
@@ -158,7 +169,7 @@
GPluginPlugin *plugin = NULL;
GObject *manager = gplugin_manager_get_instance();
- TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
+ TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE }; gulong signals[] = { 0, 0, 0, 0};
@@ -200,7 +211,7 @@
GPluginPlugin *plugin = NULL;
GObject *manager = gplugin_manager_get_instance();
- TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
+ TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE }; gulong signals[] = { 0, 0, 0, 0};
@@ -240,6 +251,36 @@
g_signal_handler_disconnect(manager, signals[3]);
+test_gplugin_manager_signals_load_failure(void) { + GPluginPlugin *plugin = NULL; + GObject *manager = gplugin_manager_get_instance(); + TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE }; + gulong signals[] = { 0, 0, 0, 0, 0}; + g_signal_connect(manager, "loading-plugin", + G_CALLBACK(test_gplugin_manager_signals_normal_loading), + g_signal_connect(manager, "load-failed", + G_CALLBACK(test_gplugin_manager_signals_load_failed), + gplugin_manager_append_path(TEST_DIR); + gplugin_manager_refresh(); + plugin = gplugin_manager_find_plugin("gplugin/native-load-failed"); + gplugin_manager_load_plugin(plugin, &error); + g_assert_error(error, GPLUGIN_DOMAIN, 0); + g_assert(data.loading); + g_assert(data.load_failed); + g_signal_handler_disconnect(manager, signals[0]); + g_signal_handler_disconnect(manager, signals[1]); /******************************************************************************
*****************************************************************************/
@@ -256,6 +297,8 @@
test_gplugin_manager_signals_loading_stopped);
g_test_add_func("/manager/signals/unloading-stopped",
test_gplugin_manager_signals_unloading_stopped);
+ g_test_add_func("/manager/signals/load-failed", + test_gplugin_manager_signals_load_failure); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/test-unresolved-symbol.c Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,60 @@
+ * Copyright (C) 2011-2016 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +/****************************************************************************** + *****************************************************************************/ +test_unresolved_symbol(void) { + "*some_unresolved_symbol*" + gplugin_manager_remove_paths(); + gplugin_manager_append_path(PLUGIN_DIR); + gplugin_manager_refresh(); + g_test_assert_expected_messages(); +/****************************************************************************** + *****************************************************************************/ +main(gint argc, gchar **argv) { + g_test_init(&argc, &argv, NULL); + /* test the load on query flag */ + g_test_add_func("/loaders/native/unresolved-symbol", + test_unresolved_symbol); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,1 @@
+add_test_plugin(unresolved-symbol) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/unresolved-symbol.c Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,41 @@
+ * Copyright (C) 2011-2016 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + some_unresolved_symbol(); +G_MODULE_EXPORT gboolean +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) +G_MODULE_EXPORT gboolean +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) --- a/lua/CMakeLists.txt Thu Jan 28 23:15:55 2016 -0600
+++ b/lua/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -33,6 +33,8 @@
include_directories(${LUA_INCLUDE_DIRS})
+ link_directories(${LUA_LIBRARY_DIRS}) message(STATUS "checking for lua module 'lgi'")
# compile our lua-lgi test program
@@ -42,6 +44,7 @@
-DINCLUDE_DIRECTORIES:STRING=${LUA_INCLUDE_DIRS}
-DLINK_LIBRARIES:STRING=${LUA_LIBRARIES}
+ -DLINK_DIRECTORIES:STRING=${LUA_LIBRARY_DIRS} COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/gplugin-lua-test-lgi
--- a/lua/gplugin-lua-test-lgi.c Thu Jan 28 23:15:55 2016 -0600
+++ b/lua/gplugin-lua-test-lgi.c Sun Aug 21 23:56:03 2016 -0500
@@ -16,18 +16,46 @@
+_add_require_path(lua_State *L, const char *path) { + const char *pkg_path = NULL; + lua_getglobal(L, "package"); + lua_getfield(L, -1, "path"); // get field "path" from table at top of stack (-1) + pkg_path = lua_tostring(L, -1); // grab path string from top of stack + memset(buff, 0, sizeof(buff)); + snprintf(buff, sizeof(buff), "%s;%s", pkg_path, path); + lua_pop(L, 1); // pop off the path field + lua_pushstring(L, buff); // push the new one + lua_setfield(L, -2, "path"); // set the field "path" in table at -2 with value at top of stack + lua_pop( L, 1 ); // get rid of package table from top of stack main(int argc, char *argv[]) {
- lua_State *L = luaL_newstate();
+ /* add some additional paths to package.path */ + //_add_require_path(L, "/usr/local/lib/luarocks/rocks"); + /* now try to do the require */ lua_getglobal(L, "require");
lua_pushstring(L, "lgi");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,1 @@
+configure_file(gplugin.spec.in gplugin.spec @ONLY) --- a/packaging/debian/changelog Thu Jan 28 23:15:55 2016 -0600
+++ b/packaging/debian/changelog Sun Aug 21 23:56:03 2016 -0500
@@ -1,8 +1,26 @@
+gplugin (0.27) unstable; urgency=medium + * New upstream release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Mon, 18 Apr 2016 22:31:45 -0500 +gplugin (0.26) unstable; urgency=medium + * New upstream release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Mon, 18 Apr 2016 22:31:30 -0500 +gplugin (0.25) unstable; urgency=medium + * New upstream release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Sat, 06 Feb 2016 20:28:53 -0600 gplugin (0.24.1) unstable; urgency=medium
* New upstream release, see official changelog
- -- Gary Kramlich <grim@reaperworld.com> Thu, 28 Jan 2016 22:49:30 -0600
+ -- Gary Kramlich <grim@reaperworld.com> Sat, 06 Feb 2016 20:28:47 -0600 gplugin (0.0.24) unstable; urgency=medium
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/gplugin.spec.in Sun Aug 21 23:56:03 2016 -0500
@@ -0,0 +1,245 @@
+Version: @GPLUGIN_VERSION@ +Release: %{?build_number}%{?!build_number:1} +Summary: A GObject based library that implements a reusable plugin system +Url: https://bitbucket.org/rw_grim/gplugin/overview +Group: Development/Libraries +BuildRequires: cmake >= 2.8 +BuildRequires: glib2-devel >= 2.20.0 +BuildRequires: gobject-introspection-devel +BuildRequires: gtk3-devel +BuildRequires: lua-devel +BuildRequires: python3-devel +BuildRequires: python3-gobject +BuildRequires: /usr/lib64/pkgconfig/pygobject-3.0.pc +%if 0%{?suse_version} > 0 +# avoid "directories not owned by a package" error +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +Requires: %{name}-gtk3%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +Summary: A GObject based library that implements a reusable plugin system +Group: Development/Libraries +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +%description -n libgplugin0 +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +This package contains all necessary include files and libraries needed +to develop applications that require these. +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +This package contains additional GTK3 dependencies for %{name} library. +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +This package contains all necessary include files and libraries needed +to develop GTK3 applications that require these. +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +This package contains the Lua Loader for %{name} library. +GPlugin is a GObject based library that implements a reusable plugin system +that supports loading plugins in other languages via loaders. GPlugin also +implements dependencies among the plugins. +It was started due to the infamous "Plugin Problem" for Guifications 3, which +was that I needed plugins that could depend on each other, be able to be +written in other languages, have plugins that are loaded before the main load +phase, and allow plugins to register types into the GObject type system. +This package contains Python 3 loader for %{name} library. +CFLAGS="%{optflags}" cmake \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ +make install DESTDIR=%{buildroot} +rm -rf %{buildroot}%{_datadir}/doc/gplugin/ +%if %{notownedhack} == 1 +rm -rf %{buildroot}%{_datadir}/gplugin/ +%post -n libgplugin0 -p /sbin/ldconfig +%postun -n libgplugin0 -p /sbin/ldconfig +%post -n gplugin-gtk3 -p /sbin/ldconfig +%postun -n gplugin-gtk3 -p /sbin/ldconfig +%if %{notownedhack} == 0 +%{_bindir}/gplugin-query +%{_mandir}/man1/gplugin-query.1* +%{_libdir}/libgplugin.so.0.1.0 +%if %{notownedhack} == 0 +%{_includedir}/gplugin-1.0/ +%{_libdir}/libgplugin.so +%{_libdir}/libgplugin.so.0 +%{_libdir}/pkgconfig/gplugin.pc +%{_libdir}/pkgconfig/gplugin-gtk.pc +%{_libdir}/girepository-1.0/GPlugin-0.0.typelib +%{_datadir}/gir-1.0/GPlugin-0.0.gir +%if %{notownedhack} == 0 +%{_bindir}/gplugin-gtk-viewer +%{_libdir}/libgplugin-gtk.so.0.1.0 +%if %{notownedhack} == 0 +%{_datadir}/gplugin/gplugin-gtk/ +%{_mandir}/man1/gplugin-gtk-viewer.1* +%if %{notownedhack} == 0 +%{_libdir}/libgplugin-gtk.so +%{_libdir}/libgplugin-gtk.so.0 +%{_libdir}/gplugin/gplugin-lua.so +%if %{notownedhack} == 0 +%{_libdir}/gplugin/gplugin-python.so +* Sun May 15 2016 Gary Kramlich <grim@reaperworld.com> +- Updates and pulled upstream +* Mon May 4 2015 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.0.18-1 +- Initial package release --- a/python/CMakeLists.txt Thu Jan 28 23:15:55 2016 -0600
+++ b/python/CMakeLists.txt Sun Aug 21 23:56:03 2016 -0500
@@ -32,6 +32,8 @@
${PYGOBJECT_INCLUDE_DIRS}
+ link_directories(${PYTHON3_LIBRARY_DIRS}) message(STATUS "checking if pygobject works with python3")
set(GPLUGIN_PYTHON_TEST_PYGOBJECT_INCLUDES)
--- a/tools/glib-mkenums Thu Jan 28 23:15:55 2016 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,565 +0,0 @@
-# Information about the current enumeration
-my $flags; # Is enumeration a bitmask?
-my $option_underscore_name; # Overriden underscore variant of the enum name
- # for example to fix the cases we don't get the
- # mixed-case -> underscorized transform right.
-my $option_lowercase_name; # DEPRECATED. A lower case name to use as part
- # of the *_get_type() function, instead of the
- # one that we guess. For instance, when an enum
- # uses abnormal capitalization and we can not
- # guess where to put the underscores.
-my $seenbitshift; # Have we seen bitshift operators?
-my $enum_prefix; # Prefix for this enumeration
-my $enumname; # Name for this enumeration
-my $enumshort; # $enumname without prefix
-my $enumname_prefix; # prefix of $enumname
-my $enumindex = 0; # Global enum counter
-my $firstenum = 1; # Is this the first enumeration per file?
-my @entries; # [ $name, $val ] for each entry
-my $sandbox = Safe->new; # sandbox for safe evaluation of expressions
- for $opt (split /\s*,\s*/, $opts) {
- my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/;
- defined $val or $val = 1;
- push @opts, $key, $val;
- my $looking_for_name = 0;
- # read lines until we have no open comments
- while (m@/\*([^*]|\*(?!/))*$@) {
- defined ($new = <$file>) || die "Unmatched comment in $ARGV";
- # strip comments w/o options
- if ($looking_for_name) {
- if (/^\#include\s*<([^>]*)>/ ) {
- open NEWFILE, $file or die "Cannot open include file $file: $!\n";
- if (parse_entries (\*NEWFILE, $NEWFILE)) {
- if (/^\s*\}\s*(\w+)/) {
- \s*\w+\s*\(.*\)\s* # macro with multiple args
- (?:[^,/]|/(?!\*))* # anything but a comma or comment
- my ($name, $value, $options) = ($1,$2,$3);
- if (!defined $flags && defined $value && $value =~ /<</) {
- if (defined $options) {
- my %options = parse_trigraph($options);
- if (!defined $options{skip}) {
- push @entries, [ $name, $value, $options{nick} ];
- push @entries, [ $name, $value ];
- # ignore preprocessor directives
- print STDERR "$0: $file_name:$.: Failed to parse `$_'\n";
- print "glib-mkenums version glib-2.36.3\n";
- print "glib-mkenums comes with ABSOLUTELY NO WARRANTY.\n";
- print "You may redistribute copies of glib-mkenums under the terms of\n";
- print "the GNU General Public License which can be found in the\n";
- print "GLib source package. Sources, examples and contact\n";
- print "information are available at http://www.gtk.org\n";
- print " glib-mkenums [OPTION...] [FILES...]\n\n";
- print "Help Options:\n";
- print " -h, --help Show this help message\n\n";
- print "Utility Options:\n";
- print " --identifier-prefix <text> Identifier prefix\n";
- print " --symbol-prefix <text> Symbol prefix\n";
- print " --fhead <text> Output file header\n";
- print " --fprod <text> Per input file production\n";
- print " --ftail <text> Output file trailer\n";
- print " --eprod <text> Per enum text (produced prior to value itarations)\n";
- print " --vhead <text> Value header, produced before iterating over enum values\n";
- print " --vprod <text> Value text, produced for each enum value\n";
- print " --vtail <text> Value tail, produced after iterating over enum values\n";
- print " --comments <text> Comment structure\n";
- print " --template file Template file\n";
- print " -v, --version Print version informations\n\n";
- print "Production text substitutions:\n";
- print " \@EnumName\@ PrefixTheXEnum\n";
- print " \@enum_name\@ prefix_the_xenum\n";
- print " \@ENUMNAME\@ PREFIX_THE_XENUM\n";
- print " \@ENUMSHORT\@ THE_XENUM\n";
- print " \@ENUMPREFIX\@ PREFIX\n";
- print " \@VALUENAME\@ PREFIX_THE_XVALUE\n";
- print " \@valuenick\@ the-xvalue\n";
- print " \@valuenum\@ the integer value (limited support, Since: 2.26)\n";
- print " \@type\@ either enum or flags\n";
- print " \@Type\@ either Enum or Flags\n";
- print " \@TYPE\@ either ENUM or FLAGS\n";
- print " \@filename\@ name of current input file\n";
- print " \@basename\@ base name of the current input file (Since: 2.22)\n";
-my $idprefix = ""; # "G", "Gtk", etc
-my $symprefix = ""; # "g", "gtk", etc, if not just lc($idprefix)
-my $fhead = ""; # output file header
-my $fprod = ""; # per input file production
-my $ftail = ""; # output file trailer
-my $eprod = ""; # per enum text (produced prior to value itarations)
-my $vhead = ""; # value header, produced before iterating over enum values
-my $vprod = ""; # value text, produced for each enum value
-my $vtail = ""; # value tail, produced after iterating over enum values
-my $comment_tmpl = ""; # comment template
-sub read_template_file {
- my %tmpl = ('file-header', $fhead,
- 'file-production', $fprod,
- 'enumeration-production', $eprod,
- 'value-header', $vhead,
- 'value-production', $vprod,
- 'comment', $comment_tmpl);
- open (FILE, $file) || die "Can't open $file: $!\n";
- if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) {
- if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) {
- elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) {
- die "Malformed template file $file\n";
- if (!($in eq 'junk')) {
- if (!($in eq 'junk')) {
- die "Malformed template file $file\n";
- $fhead = $tmpl{'file-header'};
- $fprod = $tmpl{'file-production'};
- $ftail = $tmpl{'file-tail'};
- $eprod = $tmpl{'enumeration-production'};
- $vhead = $tmpl{'value-header'};
- $vprod = $tmpl{'value-production'};
- $vtail = $tmpl{'value-tail'};
- $comment_tmpl = $tmpl{'comment'};
- # default to C-style comments
- $comment_tmpl = "/* \@comment\@ */" if $comment_tmpl eq "";
-if (!defined $ARGV[0]) {
-while ($_=$ARGV[0],/^-/) {
- if (/^--template$/) { read_template_file (shift); }
- elsif (/^--identifier-prefix$/) { $idprefix = shift }
- elsif (/^--symbol-prefix$/) { $symprefix = shift }
- elsif (/^--fhead$/) { $fhead = $fhead . shift }
- elsif (/^--fprod$/) { $fprod = $fprod . shift }
- elsif (/^--ftail$/) { $ftail = $ftail . shift }
- elsif (/^--eprod$/) { $eprod = $eprod . shift }
- elsif (/^--vhead$/) { $vhead = $vhead . shift }
- elsif (/^--vprod$/) { $vprod = $vprod . shift }
- elsif (/^--vtail$/) { $vtail = $vtail . shift }
- elsif (/^--comments$/) { $comment_tmpl = shift }
- elsif (/^--help$/ || /^-h$/ || /^-\?$/) { usage; }
- elsif (/^--version$/ || /^-v$/) { version; }
- last if not defined($ARGV[0]);
-# put auto-generation comment
- my $comment = $comment_tmpl;
- $comment =~ s/\@comment\@/Generated data (by glib-mkenums)/;
- print "\n" . $comment . "\n\n";
- my $base = basename ($ARGV[0]);
- $prod =~ s/\@filename\@/$ARGV[0]/g;
- $prod =~ s/\@basename\@/$base/g;
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- close (ARGV); # reset line numbering
- $firstenum = 1; # Flag to print filename at next enum
- # read lines until we have no open comments
- while (m@/\*([^*]|\*(?!/))*$@) {
- defined ($new = <>) || die "Unmatched comment in $ARGV";
- # strip comments w/o options
- # ignore forward declarations
- next if /^\s*typedef\s+enum.*;/;
- if (m@^\s*typedef\s+enum\s*
- my %options = parse_trigraph ($2);
- next if defined $options{skip};
- $enum_prefix = $options{prefix};
- $flags = $options{flags};
- $option_lowercase_name = $options{lowercase_name};
- $option_underscore_name = $options{underscore_name};
- $option_lowercase_name = undef;
- $option_underscore_name = undef;
- if (defined $option_lowercase_name) {
- if (defined $option_underscore_name) {
- print STDERR "$0: $ARGV:$.: lowercase_name overriden with underscore_name\n";
- $option_lowercase_name = undef;
- print STDERR "$0: $ARGV:$.: lowercase_name is deprecated, use underscore_name\n";
- # Didn't have trailing '{' look on next lines
- if (!defined $1 && !defined $4) {
- die "Hit end of file while parsing enum in $ARGV";
- # Now parse the entries
- parse_entries (\*ARGV, $ARGV);
- # figure out if this was a flags or enums enumeration
- $flags = $seenbitshift;
- # Autogenerate a prefix
- if (!defined $enum_prefix) {
- if (defined $enum_prefix) {
- my $tmp = ~ ($name ^ $enum_prefix);
- ($tmp) = $tmp =~ /(^\xff*)/;
- $enum_prefix = $enum_prefix & $tmp;
- if (!defined $enum_prefix) {
- # Trim so that it ends in an underscore
- $enum_prefix =~ s/_[^_]*$/_/;
- # canonicalize user defined prefixes
- $enum_prefix = uc($enum_prefix);
- $enum_prefix =~ s/-/_/g;
- $enum_prefix =~ s/(.*)([^_])$/$1$2_/;
- for $entry (@entries) {
- my ($name,$num,$nick) = @{$entry};
- ($nick = $name) =~ s/^$enum_prefix//;
- @{$entry} = ($name, $num, $nick);
- if (defined $option_underscore_name) {
- $enumlong = uc $option_underscore_name;
- $enumsym = lc $option_underscore_name;
- $enumshort = $enumlong;
- $enumshort =~ s/^[A-Z][A-Z0-9]*_//;
- $enumname_prefix = $enumlong;
- $enumname_prefix =~ s/_$enumshort$//;
- } elsif (!$symprefix && !$idprefix) {
- # enumname is e.g. GMatchType
- $enspace =~ s/^([A-Z][a-z]*).*$/$1/;
- $enumshort = $enumname;
- $enumshort =~ s/^[A-Z][a-z]*//;
- $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
- $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
- $enumshort = uc($enumshort);
- $enumname_prefix = $enumname;
- $enumname_prefix =~ s/^([A-Z][a-z]*).*$/$1/;
- $enumname_prefix = uc($enumname_prefix);
- $enumlong = uc($enspace) . "_" . $enumshort;
- $enumsym = lc($enspace) . "_" . lc($enumshort);
- if (defined($option_lowercase_name)) {
- $enumsym = $option_lowercase_name;
- $enumshort = $enumname;
- $enumshort =~ s/^${idprefix}//;
- $enumshort =~ s/^[A-Z][a-z]*//;
- $enumshort =~ s/([^A-Z])([A-Z])/$1_$2/g;
- $enumshort =~ s/([A-Z][A-Z])([A-Z][0-9a-z])/$1_$2/g;
- $enumshort = uc($enumshort);
- $enumname_prefix = $symprefix && uc($symprefix) || uc($idprefix);
- $enumlong = $enumname_prefix . "_" . $enumshort;
- $enumsym = lc($enumlong);
- my $base = basename ($ARGV);
- $prod =~ s/\@filename\@/$ARGV/g;
- $prod =~ s/\@basename\@/$base/g;
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- $prod =~ s/\@enum_name\@/$enumsym/g;
- $prod =~ s/\@EnumName\@/$enumname/g;
- $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
- $prod =~ s/\@ENUMNAME\@/$enumlong/g;
- $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
- if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
- if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
- if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- $prod =~ s/\@enum_name\@/$enumsym/g;
- $prod =~ s/\@EnumName\@/$enumname/g;
- $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
- $prod =~ s/\@ENUMNAME\@/$enumlong/g;
- $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
- if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
- if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
- if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- my ($name,$num,$nick) = @{$_};
- if ($prod =~ /\@valuenum\@/) {
- # only attempt to eval the value if it is requested
- # this prevents us from throwing errors otherwise
- # use sandboxed perl evaluation as a reasonable
- # approximation to C constant folding
- $num = $sandbox->reval ($num);
- # make sure it parsed to an integer
- if (!defined $num or $num !~ /^-?\d+$/) {
- die "Unable to parse enum value '$num'";
- $tmp_prod =~ s/\@valuenum\@/$num/g;
- $tmp_prod =~ s/\@VALUENAME\@/$name/g;
- $tmp_prod =~ s/\@valuenick\@/$nick/g;
- if ($flags) { $tmp_prod =~ s/\@type\@/flags/g; } else { $tmp_prod =~ s/\@type\@/enum/g; }
- if ($flags) { $tmp_prod =~ s/\@Type\@/Flags/g; } else { $tmp_prod =~ s/\@Type\@/Enum/g; }
- if ($flags) { $tmp_prod =~ s/\@TYPE\@/FLAGS/g; } else { $tmp_prod =~ s/\@TYPE\@/ENUM/g; }
- $prod =~ s/\@enum_name\@/$enumsym/g;
- $prod =~ s/\@EnumName\@/$enumname/g;
- $prod =~ s/\@ENUMSHORT\@/$enumshort/g;
- $prod =~ s/\@ENUMNAME\@/$enumlong/g;
- $prod =~ s/\@ENUMPREFIX\@/$enumname_prefix/g;
- if ($flags) { $prod =~ s/\@type\@/flags/g; } else { $prod =~ s/\@type\@/enum/g; }
- if ($flags) { $prod =~ s/\@Type\@/Flags/g; } else { $prod =~ s/\@Type\@/Enum/g; }
- if ($flags) { $prod =~ s/\@TYPE\@/FLAGS/g; } else { $prod =~ s/\@TYPE\@/ENUM/g; }
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
- my $base = basename ($ARGV);
- $prod =~ s/\@filename\@/$ARGV/g;
- $prod =~ s/\@basename\@/$base/g;
- $prod =~ s/\\a/\a/g; $prod =~ s/\\b/\b/g; $prod =~ s/\\t/\t/g; $prod =~ s/\\n/\n/g;
- $prod =~ s/\\f/\f/g; $prod =~ s/\\r/\r/g;
-# put auto-generation comment
- my $comment = $comment_tmpl;
- $comment =~ s/\@comment\@/Generated data ends here/;
- print "\n" . $comment . "\n\n";