Updating to current develop
--- a/.hgignore Mon Jun 29 22:08:31 2015 -0500
+++ b/.hgignore Sat Jun 03 02:47:28 2017 -0500
@@ -15,4 +15,4 @@
^packaging\/debian\/files$
--- a/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-###############################################################################
-###############################################################################
-set(CMAKE_LEGACY_CYGWIN_WIN32 0)
-cmake_minimum_required(VERSION 2.8.0)
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
-if(${CMAKE_VERSION} VERSION_LESS "2.8.3")
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Compatibility)
-endif(${CMAKE_VERSION} VERSION_LESS "2.8.3")
-if(${CMAKE_VERSION} VERSION_GREATER "3.0.0")
- # allow reading of the LOCATION property
- cmake_policy(SET CMP0026 OLD)
- # don't force target names to match a pattern
- cmake_policy(SET CMP0037 OLD)
-endif(${CMAKE_VERSION} VERSION_GREATER "3.0.0")
-###############################################################################
-###############################################################################
-set(GPLUGIN_MAJOR_VERSION 0)
-set(GPLUGIN_MINOR_VERSION 0)
-set(GPLUGIN_MICRO_VERSION 22)
-set(GPLUGIN_EXTRA_VERSION dev)
-set(GPLUGIN_VERSION ${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.${GPLUGIN_MICRO_VERSION}${GPLUGIN_EXTRA_VERSION})
-set(LOCALE_DIR ${CMAKE_INSTALL_PREFIX}/locale)
-add_definitions(-DLOCALEDIR="${LOCALE_DIR}")
-###############################################################################
-###############################################################################
- "Whether or not to build a GObject Introspection type library"
- "Install translation files"
- "Whether or not to run unit tests while compiling"
-###############################################################################
-###############################################################################
- set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
- # look for homebrew, if it's installed theres so more mucking we need to do
- COMMAND ${BREW} --prefix libffi
- OUTPUT_VARIABLE FFI_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE
- set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${FFI_PREFIX}/lib/pkgconfig")
- COMMAND ${BREW} --prefix cairo
- OUTPUT_VARIABLE CAIRO_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE
- set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CAIRO_PREFIX}/lib/pkgconfig")
- set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/sw/lib/pkgconfig:/opt/local/lib/pkgconfig")
-include(PkgConfigVariable)
-set(REQ_GLIB_VER 2.20.0)
-pkg_check_modules(GLIB REQUIRED
- glib-2.0>=${REQ_GLIB_VER}
- gobject-2.0>=${REQ_GLIB_VER}
-# we separate gmodule out so our test aren't linked to it
-pkg_check_modules(GMODULE REQUIRED
- gmodule-2.0>=${REQ_GLIB_VER}
-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)
- DOC "gtester executable"
- mark_as_advanced(GTESTER)
- DOC "xsltproc executable"
- mark_as_advanced(XSLTPROC)
-###############################################################################
-###############################################################################
-set(GETTEXT_PACKAGE gplugin)
-add_definitions(-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}")
-###############################################################################
-###############################################################################
- -DPREFIX="${CMAKE_INSTALL_PREFIX}"
- -DLIBDIR="${CMAKE_INSTALL_LIBDIR}"
- -DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"
- -Werror=format-security
-# check if we're using gcc
-if(CMAKE_COMPILER_IS_GNUCC)
- -DGPLUGIN_UNUSED=__attribute__\(\(unused\)\)
-else(CMAKE_COMPILER_IS_GNUCC)
-endif(CMAKE_COMPILER_IS_GNUCC)
- ${CMAKE_BINARY_DIR} # for built headers/sources
- ${CMAKE_BINARY_DIR}/gplugin # for gplugin.h
- ${GMODULE_INCLUDE_DIRS}
- ${GMODULE_LIBRARY_DIRS}
-###############################################################################
-###############################################################################
-add_subdirectory(gplugin)
-add_subdirectory(gplugin-gtk)
-add_subdirectory(plugins)
-add_subdirectory(python)
-###############################################################################
-###############################################################################
-install(FILES ChangeLog INSTALL README HACKING DESTINATION ${CMAKE_INSTALL_DOCDIR})
-###############################################################################
-###############################################################################
- gplugin-${GPLUGIN_VERSION}.tar.bz2
- gplugin-${GPLUGIN_VERSION}.tar.gz
- gplugin-${GPLUGIN_VERSION}.zip
-foreach(ARCHIVE ${ARCHIVES})
- COMMAND hg archive ${ARCHIVE}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMAND gpg --yes -abs ${ARCHIVE}
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- list(APPEND SIGNATURES ${ARCHIVE}.asc)
-add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES})
--- a/ChangeLog Mon Jun 29 22:08:31 2015 -0500
+++ b/ChangeLog Sat Jun 03 02:47:28 2017 -0500
@@ -1,4 +1,37 @@
+ * Fixed building on OSX with homebrew + * Added an RPM spec file + * 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 + * Really fixed the debian package this time + * Made help2man optional + * Don't try to build the pot files if NLS is disabled + * Made the moonscript tests option work + * Added Debian.md to explain how to use the Debian repository + * Install man pages in the correct directory on BSD + * Made the moonscripts tests not interfer with the lua tests unless they're + * Set the -ggdb cflag if we're being compiled by gcc * Use the GNUInstallDirs cmake module to install everything to the correct
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/HACKING.OSX Sat Jun 03 02:47:28 2017 -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/INSTALL Mon Jun 29 22:08:31 2015 -0500
+++ b/INSTALL Sat Jun 03 02:47:28 2017 -0500
@@ -1,9 +1,9 @@
GPlugin depends on the following at a bare minimum:
gobject-introspection, libgirepository1.0-dev
@@ -19,23 +19,17 @@
-GPlugin uses CMake (http://www.cmake.org) as its build system. As such
+GPlugin uses meson (http://mesonbuild.com/) as its build system. As such compiling is a little bit different than your typical ./configure, make,
sudo make install. But luckily for you, not too much different.
-While it is not required, it is highly recommended that you use a separate
-build dir. As such, these instructions use a separate build directory.
+Meson requires you to build in a separate directory than your source. As such, these instructions use a separate build directory. To compile you need to run the following commands:
If you want/need to tweak the build system (to enable/disable certain loaders)
-you can do so at any time by using a CMake user interface. For example, if you
-have the CMake curses gui installed, you can do this by running "ccmake .."
-from the build directory.
+you can do so at any time by using mesonconf in the build directory. --- a/cmake/Compatibility/CMakeParseArguments.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
-# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions for
-# parsing the arguments given to that macro or function.
-# It processes the arguments and defines a set of variables which hold the
-# values of the respective options.
-# The <options> argument contains all options for the respective macro,
-# i.e. keywords which can be used when calling the macro without any value
-# following, like e.g. the OPTIONAL keyword of the install() command.
-# The <one_value_keywords> argument contains all keywords for this macro
-# which are followed by one value, like e.g. DESTINATION keyword of the
-# The <multi_value_keywords> argument contains all keywords for this macro
-# which can be followed by more than one value, like e.g. the TARGETS or
-# FILES keywords of the install() command.
-# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the
-# keywords listed in <options>, <one_value_keywords> and
-# <multi_value_keywords> a variable composed of the given <prefix>
-# followed by "_" and the name of the respective keyword.
-# These variables will then hold the respective value from the argument list.
-# For the <options> keywords this will be TRUE or FALSE.
-# All remaining arguments are collected in a variable
-# <prefix>_UNPARSED_ARGUMENTS, this can be checked afterwards to see whether
-# your macro was called with unrecognized parameters.
-# As an example here a my_install() macro, which takes similar arguments as the
-# real install() command:
-# set(options OPTIONAL FAST)
-# set(oneValueArgs DESTINATION RENAME)
-# set(multiValueArgs TARGETS CONFIGURATIONS)
-# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
-# Assume my_install() has been called like this:
-# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub)
-# After the cmake_parse_arguments() call the macro will have set the following
-# MY_INSTALL_OPTIONAL = TRUE
-# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install()
-# MY_INSTALL_DESTINATION = "bin"
-# MY_INSTALL_RENAME = "" (was not used)
-# MY_INSTALL_TARGETS = "foo;bar"
-# MY_INSTALL_CONFIGURATIONS = "" (was not used)
-# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL"
-# You can the continue and process these variables.
-# Keywords terminate lists of values, e.g. if directly after a one_value_keyword
-# another recognized keyword follows, this is interpreted as the beginning of
-# E.g. my_install(TARGETS foo DESTINATION OPTIONAL) would result in
-# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION would
-# be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor.
-#=============================================================================
-# Copyright 2010 Alexander Neundorf <neundorf@kde.org>
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-if(__CMAKE_PARSE_ARGUMENTS_INCLUDED)
-set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE)
-function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames)
- # first set all result variables to empty/FALSE
- foreach(arg_name ${_singleArgNames} ${_multiArgNames})
- set(${prefix}_${arg_name})
- foreach(option ${_optionNames})
- set(${prefix}_${option} FALSE)
- set(${prefix}_UNPARSED_ARGUMENTS)
- set(insideValues FALSE)
- # now iterate over all arguments and fill the result variables
- foreach(currentArg ${ARGN})
- list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword
- list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword
- list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword
- if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1)
- if("${insideValues}" STREQUAL "SINGLE")
- set(${prefix}_${currentArgName} ${currentArg})
- set(insideValues FALSE)
- elseif("${insideValues}" STREQUAL "MULTI")
- list(APPEND ${prefix}_${currentArgName} ${currentArg})
- list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
- if(NOT ${optionIndex} EQUAL -1)
- set(${prefix}_${currentArg} TRUE)
- set(insideValues FALSE)
- elseif(NOT ${singleArgIndex} EQUAL -1)
- set(currentArgName ${currentArg})
- set(${prefix}_${currentArgName})
- set(insideValues "SINGLE")
- elseif(NOT ${multiArgIndex} EQUAL -1)
- set(currentArgName ${currentArg})
- set(${prefix}_${currentArgName})
- set(insideValues "MULTI")
- # propagate the result variables to the caller:
- foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
- set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
- set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
--- a/cmake/Modules/GObjectIntrospection.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-include(CMakeParseArguments)
-set(_PKG_CONFIG_MODULE "gobject-introspection-1.0")
-pkg_check_modules(GOBJECT_INTROSPECTION REQUIRED ${_PKG_CONFIG_MODULE})
-###############################################################################
-###############################################################################
-# this macro will run "pkg-config --variable=VARIABLE ${_PKG_CONFIG_MODULE}"
-# and store the result in OUTPUT_VARIABLE
-macro(_pkg_config_variable VARIABLE OUTPUT_VARIABLE)
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${VARIABLE} ${_PKG_CONFIG_MODULE}
- OUTPUT_VARIABLE ${OUTPUT_VARIABLE}
- OUTPUT_STRIP_TRAILING_WHITESPACE
-endmacro(_pkg_config_variable)
-# this macro will prefix every item in _list with _prefix and return it in
-macro(_gir_list_prefix _newlist _list _prefix)
- foreach(_item IN LISTS ${_list})
- list(APPEND ${_newlist} ${_prefix}${_item})
-endmacro(_gir_list_prefix)
-###############################################################################
-# use the pkg-config to grab a bunch of variables from the
-# gobject-introspection.pc file
-###############################################################################
-_pkg_config_variable(g_ir_scanner GIR_SCANNER)
-_pkg_config_variable(g_ir_compiler GIR_COMPILER)
-# CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT is only set when the variable is
-# actually set, so we need to create another variable to track that.
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE INTERNAL
- "holds the default install path if cmake set it")
- mark_as_advanced(_INSTALL_PREFIX)
-endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-# check if cmake_install_prefix was specified, if so build our paths using that
- _pkg_config_variable(girdir GIR_GIRDIR)
- _pkg_config_variable(typelibdir GIR_TYPELIBDIR)
- set(GIR_GIRDIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/gir-1.0")
- set(GIR_TYPELIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
-###############################################################################
-###############################################################################
-function(gobject_introspection _FIRST_ARG)
- set(options QUIET VERBOSE)
- CMAKE_PARSE_ARGUMENTS(GIR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN})
- if(ADD_GIR_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unknown keys given to ADD_GIR_INTROSPECTION(): \"${ADD_GIR_UNPARSED_ARGUMENTS}\"")
- endif(ADD_GIR_UNPARSED_ARGUMENTS)
- ###########################################################################
- # make sure that the user set some variables...
- ###########################################################################
- message(FATAL_ERROR "No gir filename given")
- endif(NOT GIR_FILENAME)
- # the caller didn't give us a namespace, try to grab it from the filename
- string(REGEX REPLACE "([^-]+)-.*" "\\1" GIR_NAMESPACE "${GIR_FILENAME}")
- message(FATAL_ERROR "No namespace given and couldn't find one in FILENAME")
- endif(NOT GIR_NAMESPACE)
- endif(NOT GIR_NAMESPACE)
- # the caller didn't give us a namespace version, try to grab it from the filemenu
- string(REGEX REPLACE ".*-([^-]+).gir" "\\1" GIR_NSVERSION "${GIR_FILENAME}")
- message(FATAL_ERROR "No namespace version given and couldn't find one in FILENAME")
- endif(NOT GIR_NSVERSION)
- endif(NOT GIR_NSVERSION)
- get_directory_property(GIR_CFLAGS INCLUDE_DIRECTORIES)
- _gir_list_prefix(GIR_REAL_CFLAGS GIR_CFLAGS "-I")
- ###########################################################################
- # Fix up some of our arguments
- ###########################################################################
- set(GIR_VERBOSE "--verbose")
- set(GIR_QUIET "--quiet")
- set(GIR_FORMAT "--format=${GIR_FORMAT}")
- # if library is set, we need to prepend --library= on to it
- set(GIR_REAL_LIBRARY "--library=${GIR_LIBRARY}")
- # if program has been set, we prepend --program= on to it
- set(GIR_PROGRAM "--program=${GIR_PROGRAM}")
- # if program_arg has been set, we prepend --program-arg= on to it
- set(GIR_PROGRAM_ARG "--program-arg=${GIR_PROGRAM_ARG}")
- ###########################################################################
- # Clean up any of the multivalue items that all need to be prefixed
- ###########################################################################
- # if the user specified IDENTIFIER_PREFIXES we need to prefix each with --identifier-prefix
- if(GIR_IDENTIFIER_PREFIXES)
- _gir_list_prefix(GIR_REAL_IDENTIFIER_PREFIXES GIR_IDENTIFIER_PREFIXES "--identifier-prefix=")
- endif(GIR_IDENTIFIER_PREFIXES)
- # if the user specified SYMBOL_PREFIXES we need to prefix each with --symbol-prefix=
- if(GIR_SYMBOL_PREFIXES)
- _gir_list_prefix(GIR_REAL_SYMBOL_PREFIXES GIR_SYMBOL_PREFIXES "--symbol-prefix=")
- endif(GIR_SYMBOL_PREFIXES)
- # if the user specified PACKAGES we need to prefix each with --pkg
- _gir_list_prefix(GIR_REAL_PACKAGES GIR_PACKAGES "--pkg=")
- # if the user specified BUILT_SOURCES, we need to get their paths since
- # they could be in CMAKE_CURRENT_BUILD_DIR
- set(GIR_REAL_BUILT_SOURCES)
- foreach(ITEM ${GIR_BUILT_SOURCES})
- get_source_file_property(LOCATION ${ITEM} LOCATION)
- list(APPEND GIR_REAL_BUILT_SOURCES "${LOCATION}")
- endif(GIR_BUILT_SOURCES)
- ###########################################################################
- # Add the custom commands
- ###########################################################################
- set(ENV{CFLAGS} ${GIR_REAL_CFLAGS})
- COMMAND ${GIR_SCANNER} ${GIR_SCANNER_ARGS}
- --namespace=${GIR_NAMESPACE}
- --nsversion=${GIR_NSVERSION}
- ${GIR_PROGRAM} ${GIR_PROGRAM_ARGS}
- ${GIR_QUIET} ${GIR_VERBOSE}
- ${GIR_REAL_IDENTIFIER_PREFIXES}
- ${GIR_REAL_SYMBOL_PREFIXES}
- -L${CMAKE_CURRENT_BINARY_DIR}
- --output=${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
- ${GIR_REAL_BUILT_SOURCES}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- add_custom_target("gir ${GIR_FILENAME}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
- DESTINATION ${GIR_GIRDIR}
- # create the name of the typelib
- string(REPLACE ".gir" ".typelib" GIR_TYPELIB "${GIR_FILENAME}")
- COMMAND ${GIR_COMPILER} ${GIR_COMPILER_ARGS}
- ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
- --output=${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
- DEPENDS ${GIR_FILENAME}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- add_custom_target("typelib ${GIR_TYPELIB}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME} ${GIR_TYPELIB})
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
- DESTINATION ${GIR_TYPELIBDIR}
- string(TOUPPER ${GIR_LIBRARY} GIR_TARGET)
- set(${GIR_TARGET}_GIR_TARGETS "gir ${GIR_FILENAME}" "typelib ${GIR_TYPELIB}" PARENT_SCOPE)
-endfunction(gobject_introspection)
--- a/cmake/Modules/Gettextize.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-include(CMakeParseArguments)
-###############################################################################
-###############################################################################
-# homebrew's gettext is keyonly, so we need to append it's path
- find_program(BREW brew)
- execute_process(COMMAND ${BREW} --prefix gettext
- OUTPUT_VARIABLE GETTEXT_PREFIX
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(GETTEXT_PATH "${GETTEXT_PREFIX}/bin")
-###############################################################################
-###############################################################################
-find_program(XGETTEXT_EXECUTABLE xgettext ${GETTEXT_PATH})
-if(NOT XGETTEXT_EXECUTABLE)
- message(FATAL_ERROR "Failed to find xgettext")
-endif(NOT XGETTEXT_EXECUTABLE)
-find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt ${GETTEXT_PATH})
-if(NOT GETTEXT_MSGFMT_EXECUTABLE)
- message(FATAL_ERROR "Failed to find msgfmt")
-endif(NOT GETTEXT_MSGFMT_EXECUTABLE)
-find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge ${GETTEXT_PATH})
-if(NOT GETTEXT_MSGMERGE_EXECUTABLE)
- message(FATAL_ERROR "Failed to find msgmerge")
-endif(NOT GETTEXT_MSGMERGE_EXECUTABLE)
-set(DEFAULT_XGETTEXT_OPTIONS
- --package-name=${PROJECT_NAME}
- --package-version=${VERSION}
-if(NOT DEFINED LOCALE_DIR)
- set(LOCALE_DIR ${CMAKE_INSTALL_PREFIX}/share/locale/)
- message(AUTHOR_WARNING "LOCALE_DIR is not set, using ${LOCALE_DIR}")
-endif(NOT DEFINED LOCALE_DIR)
-if(NOT DEFINED GETTEXT_PACKAGE)
- set(GETTEXT_PACKAGE ${PROJECT_NAME})
- message(AUTHOR_WARNING "GETTEXT_PACKAGE is not set, using ${GETTEXT_PACKAGE}")
-endif(NOT DEFINED GETTEXT_PACKAGE)
-###############################################################################
-###############################################################################
-function(GETTEXTIZE_POT_FILE _FIRST_ARG)
- set(options SORT NO_DEFAULT_KEYWORDS NO_ESCAPE NO_COMMENTS)
- set(oneValueArgs FILENAME LANGUAGES)
- set(multiValueArgs SOURCES BUILT_SOURCES KEYWORDS)
- POT "${options}" "${oneValueArgs}" "${multiValueArgs}"
- if(POT_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unknown keys given to pot_file(): "
- "\"${POT_UNPARSED_ARGUMENTS}\"")
- endif(POT_UNPARSED_ARGUMENTS)
- set(POT_FILENAME ${GETTEXT_PACKAGE}.pot)
- message(AUTHOR_WARNING "No filename specified, using ${POT_FILENAME}")
- endif(NOT POT_FILENAME)
- message(FATAL_ERROR "No sources specified")
- set(POT_ESCAPE --escape)
- endif(NOT POT_NO_ESCAPE)
- set(POT_COMMENTS "--add-comments=${POT_COMMENTS}")
- if(NOT POT_NO_DEFAULT_KEYWORDS)
- list(INSERT POT_KEYWORDS 0 _ N_ C_:1c,2 NC_:1c,2)
- endif(NOT POT_NO_DEFAULT_KEYWORDS)
- foreach(_kw ${POT_KEYWORDS})
- list(APPEND _keywords "--keyword=${_kw}")
- set(POT_KEYWORDS ${_keywords})
- foreach(_lang in ${POT_LANGUAGES})
- list(APPEND _languages "--language=${_lang}")
- set(POT_LANGUAGES ${_languages})
- # now tweak the sources
- set(POT_REAL_BUILT_SOURCES)
- foreach(_item ${POT_BUILT_SOURCES})
- get_source_file_property(_location ${_item} LOCATION)
- list(APPEND POT_REAL_BUILT_SOURCES "${_location}")
- endif(POT_BUILT_SOURCES)
- COMMAND ${XGETTEXT_EXECUTABLE}
- ${POT_SORT} ${POT_KEYWORDS} ${POT_LANGUAGES} ${POT_ESCAPE}
- -o ${CMAKE_CURRENT_BINARY_DIR}/${POT_FILENAME}
- ${POT_SOURCES} ${POT_REAL_BUILT_SOURCES}
- DEPENDS ${POT_SOURCES} ${POT_BUILT_SOURCES}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- add_custom_target("${POT_FILENAME} potfile" ALL DEPENDS ${POT_FILENAME})
-endfunction(GETTEXTIZE_POT_FILE)
-function(GETTEXTIZE_TRANSLATIONS)
- PO "${options}" "${oneValueArgs}" "${multiValueArgs}"
- if(PO_UNPARSED_ARGUMENTS)
- FATAL_ERROR "Unknown keys given to GETTEXTIZE_TRANSLATIONS(): "
- "\"${PO_UNPARSED_ARGUMENTS}\""
- endif(PO_UNPARSED_ARGUMENTS)
- set(_update COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_po} ${_po})
- get_filename_component(_base ${_po} NAME_WE)
- set(_install_dir ${LOCALE_DIR}/${_base}/LC_MESSAGES/)
- set(_install_file ${GETTEXT_DOMAIN}.mo)
- list(APPEND _gmos ${_gmo})
- COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmo} ${_po}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${_gmo}
- DESTINATION ${_install_dir}
- RENAME ${_install_file}
- add_custom_target("translations" ALL DEPENDS ${_gmos})
-endfunction(GETTEXTIZE_TRANSLATIONS)
--- a/cmake/Modules/PkgConfigVariable.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-macro(pkg_config_variable MODULE VARIABLE OUTPUT_VARIABLE)
- COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${VARIABLE} ${MODULE}
- OUTPUT_VARIABLE _output
- OUTPUT_STRIP_TRAILING_WHITESPACE
- set(${OUTPUT_VARIABLE} ${_output} CACHE FILEPATH "${MODULE} ${VARIABLE}")
-endmacro(pkg_config_variable)
--- a/cmake/Modules/help2man.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-include(CMakeParseArguments)
- DOC "help2man executable"
- message(FATAL_ERROR "failed to find help2man")
-function(help2man _FIRST_ARG)
- set(oneValueArgs TARGET OUTPUT SECTION NAME HELP_OPTION VERSION_OPTION)
- CMAKE_PARSE_ARGUMENTS(_HELP2MAN "" "${oneValueArgs}" "" ${_FIRST_ARG} ${ARGN})
- if(ADD__HELP2MAN_UNPARSED_ARGUMENTS)
- message(FATAL_ERROR "Unknown keys given to help2man(): \"${ADD__HELP2MAN_UNPARSED_ARGUMENTS}\"")
- endif(ADD__HELP2MAN_UNPARSED_ARGUMENTS)
- if(NOT _HELP2MAN_TARGET)
- message(FATAL_ERROR "No target specified")
- endif(NOT _HELP2MAN_TARGET)
- if(NOT _HELP2MAN_OUTPUT)
- message(FATAL_ERROR "No output specified")
- endif(NOT _HELP2MAN_OUTPUT)
- if(NOT _HELP2MAN_SECTION)
- set(_HELP2MAN_SECTION 1)
- endif(NOT _HELP2MAN_SECTION)
- set(_HELP2MAN_OPTIONS ${_HELP2MAN_OPTIONS} -n "${_HELP2MAN_NAME}")
- if(_HELP2MAN_HELP_OPTION)
- set(_HELP2MAN_OPTIONS ${_HELP2MAN_OPTIONS} -h "${_HELP2MAN_HELP_OPTION}")
- endif(_HELP2MAN_HELP_OPTION)
- if(_HELP2MAN_VERSION_OPTION)
- set(_HELP2MAN_OPTIONS ${_HELP2MAN_OPTIONS} -v "${_HELP2MAN_VERSION_OPTION}")
- endif(_HELP2MAN_VERSION_OPTION)
- # now find the executable
- get_target_property(_HELP2MAN_EXEC ${_HELP2MAN_TARGET} RUNTIME_OUTPUT_NAME)
- get_target_property(_HELP2MAN_EXEC ${_HELP2MAN_TARGET} LOCATION)
- endif(NOT _HELP2MAN_EXEC)
- add_custom_target(${_HELP2MAN_OUTPUT} ALL
- -s ${_HELP2MAN_SECTION}
- --no-info --no-discard-stderr
- DEPENDS ${_HELP2MAN_TARGET}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_HELP2MAN_OUTPUT} DESTINATION share/man/man${_HELP2MAN_SECTION})
--- a/cmake/Toolchains/cygwin-mingw.cmake Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-set(CMAKE_SYSTEM_NAME Windows)
-set(CMAKE_C_COMPILER i686-pc-mingw32-gcc)
-set(CMAKE_CXX_COMPILER i686-pc-mingw32-g++)
-set(CMAKE_RC_COMPILER i686-pc-mingw32-windres)
-set(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32)
--- a/gplugin-gtk/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
- "Whether or not to build the gtk3 library"
-###############################################################################
-###############################################################################
-pkg_check_modules(GTK3 REQUIRED gtk+-3.0>=3.0.0)
-set(GPLUGIN_GTK_LD_CURRENT 0)
-set(GPLUGIN_GTK_LD_REVISION 1)
-set(GPLUGIN_GTK_LD_AGE 0)
-set(GPLUGIN_GTK_LD_VERSION ${GPLUGIN_GTK_LD_CURRENT}.${GPLUGIN_GTK_LD_REVISION}.${GPLUGIN_GTK_LD_AGE})
- -DGPLUGIN_GTK_COMPILATION
- -DG_LOG_DOMAIN="GPluginGtk"
- ${CHAKE_CURRENT_SOURCE_DIR}
- gplugin-gtk-plugin-info.c
- gplugin-gtk-plugin-info.h
-set(GPLUGIN_GTK_PRIVATE_SOURCES
-set(GPLUGIN_GTK_PRIVATE_HEADERS
-set(GPLUGIN_GTK_BUILT_SOURCES
-set(GPLUGIN_GTK_BUILT_HEADERS
-###############################################################################
-###############################################################################
-set(GPLUGIN_GTK_H_INCLUDES "")
-foreach(HEADER ${GPLUGIN_GTK_HEADERS} ${GPLUGIN_GTK_BUILT_HEADERS})
- set(GPLUGIN_GTK_H_INCLUDES "${GPLUGIN_GTK_H_INCLUDES}\n#include <gplugin-gtk/${HEADER}>")
-configure_file(gplugin-gtk.h.in gplugin-gtk.h @ONLY)
-configure_file(gplugin-gtk.pc.in gplugin-gtk.pc @ONLY)
- FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin-gtk.pc
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
-###############################################################################
-###############################################################################
-add_library(gplugin-gtk SHARED
- ${GPLUGIN_GTK_PRIVATE_SOURCES}
- ${GPLUGIN_GTK_PRIVATE_HEADERS}
- ${GPLUGIN_GTK_BUILT_SOURCES}
- ${GPLUGIN_GTK_BUILT_HEADERS}
-set_target_properties(gplugin-gtk PROPERTIES
- SOVERSION ${GPLUGIN_GTK_LD_CURRENT}
- VERSION ${GPLUGIN_GTK_LD_VERSION}
-target_link_libraries(gplugin-gtk
-install(TARGETS gplugin-gtk DESTINATION ${CMAKE_INSTALL_LIBDIR})
-# install the single include into the main directory
- FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin-gtk.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0
-# install the normal includes into the gplugin-gtk subdirectory
-foreach(HEADER ${GPLUGIN_GTK_HEADERS})
- FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin-gtk
-# install the GtkBuilder files
- FILES gplugin-gtk-plugin-info.ui
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gplugin/gplugin-gtk/
-###############################################################################
-###############################################################################
-add_executable(gplugin-gtk-viewer
-target_link_libraries(gplugin-gtk-viewer
- TARGET gplugin-gtk-viewer
- OUTPUT gplugin-gtk-viewer.1
- NAME "View installed plugins"
-install(TARGETS gplugin-gtk-viewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
--- a/gplugin-gtk/gplugin-gtk.pc.in Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-includedir=${prefix}/include/gplugin-1.0/
-Description: Gtk+ widgets for GPlugin
-Version: @GPLUGIN_VERSION@
-Requires: glib-2.0 gobject-2.0 gmodule-2.0 gplugin
-Libs: -L${libdir} -lgplugin-gtk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,125 @@
+############################################################################### +############################################################################### +GTK3 = dependency('gtk+-3.0', version : '>=3.0.0') +GPLUGIN_GTK_LD_CURRENT = 0 +GPLUGIN_GTK_LD_REVISION = 1 +GPLUGIN_GTK_LD_VERSION = '@0@.@1@.@2@'.format( + GPLUGIN_GTK_LD_CURRENT, + GPLUGIN_GTK_LD_REVISION, + 'gplugin-gtk-plugin-info.c', + 'gplugin-gtk-plugin-info.h', +GPLUGIN_GTK_PRIVATE_SOURCES = [ +GPLUGIN_GTK_PRIVATE_HEADERS = [ +GPLUGIN_GTK_BUILT_SOURCES = [ +GPLUGIN_GTK_BUILT_HEADERS = [ +############################################################################### +############################################################################### +GPLUGIN_GTK_H_INCLUDES = '' +foreach header : GPLUGIN_GTK_HEADERS + GPLUGIN_GTK_H_INCLUDES = '@0@\n#include <gplugin-gtk/@1@>'.format( + GPLUGIN_GTK_H_INCLUDES, +conf = configuration_data() +conf.set('GPLUGIN_GTK_H_INCLUDES', GPLUGIN_GTK_H_INCLUDES) +gplugin_gtk_h = configure_file( + input : 'gplugin-gtk.h.in', + output : 'gplugin-gtk.h', + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0')) +############################################################################### +############################################################################### +gplugin_gtk = shared_library('gplugin-gtk', + GPLUGIN_GTK_PRIVATE_SOURCES, + GPLUGIN_GTK_PRIVATE_HEADERS, + GPLUGIN_GTK_BUILT_SOURCES, + GPLUGIN_GTK_BUILT_HEADERS, + c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_DOMAIN="GPluginGtk"'], + include_directories : toplevel_inc, + dependencies : [gplugin_dep, GTK3], + soversion : GPLUGIN_GTK_LD_CURRENT, + version : GPLUGIN_GTK_LD_VERSION, +# install the normal includes into the gplugin-gtk subdirectory + subdir : 'gplugin-1.0/gplugin-gtk' +# install the GtkBuilder files + 'gplugin-gtk-plugin-info.ui', + install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk') + name : 'libgplugin-gtk', + description : 'Gtk+ widgets for GPlugin', + version : meson.project_version(), + filebase : 'gplugin-gtk', + subdirs : 'gplugin-1.0', + libraries : gplugin_gtk, + requires : ['glib-2.0', 'gobject-2.0', 'gmodule-2.0', 'gplugin'], +############################################################################### +############################################################################### +gplugin_gtk_viewer = executable('gplugin-gtk-viewer', + 'gplugin-gtk-viewer.c', + link_with : [gplugin_gtk], + dependencies : [gplugin_dep, GTK3], +if get_option('help2man') + gplugin_gtk_viewer_man = custom_target('gplugin-gtk-viewer.1', + '--name=View installed plugins', '--section=1', + '--help-option=--help-all', '--no-info', + '--output', '@OUTPUT@', + output : 'gplugin-gtk-viewer.1', + install_dir : join_paths(get_option('mandir'), 'man1')) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-version.sh.in Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,1 @@
+export GPLUGIN_VERSION=@GPLUGIN_MAJOR_VERSION@.@GPLUGIN_MINOR_VERSION@.@GPLUGIN_MICRO_VERSION@ --- a/gplugin/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,288 +0,0 @@
-###############################################################################
-###############################################################################
-set(GPLUGIN_LD_CURRENT 0)
-set(GPLUGIN_LD_REVISION 1)
-set(GPLUGIN_LD_VERSION ${GPLUGIN_LD_CURRENT}.${GPLUGIN_LD_REVISION}.${GPLUGIN_LD_AGE})
- -DG_LOG_DOMAIN="GPlugin"
- -DGI_TYPELIB_PATH="${CMAKE_CURRENT_BINARY_DIR}"
-set(GPLUGIN_PUBLIC_BUILT_HEADERS
-set(GPLUGIN_PUBLIC_BUILT_SOURCES
-set(GPLUGIN_PRIVATE_HEADERS
-set(GPLUGIN_PRIVATE_SOURCES
-set(GPLUGIN_PRIVATE_BUILT_HEADERS
-set(GPLUGIN_PRIVATE_BUILT_SOURCES
-set(GPLUGIN_NATIVE_HEADERS
- gplugin-native-plugin.h
- gplugin-native-loader.h
-set(GPLUGIN_NATIVE_SOURCES
- gplugin-native-plugin.c
- gplugin-native-loader.c
-##############################################################################
-###############################################################################
-# don't add gplugin.h to this, EVER!
-list(APPEND PUBLIC_HEADERS
- ${GPLUGIN_HEADERS} ${GPLUGIN_PUBLIC_BUILT_HEADERS}
-list(SORT PUBLIC_HEADERS)
-list(APPEND PRIVATE_HEADERS
- ${GPLUGIN_PRIVATE_HEADERS}
- ${GPLUGIN_PRIVATE_BUILT_HEADERS}
- gplugin-native-private.h
-###############################################################################
-###############################################################################
-configure_file(gplugin-version.h.in gplugin-version.h @ONLY)
-configure_file(gplugin.pc.in ${CMAKE_CURRENT_BINARY_DIR}/gplugin.pc @ONLY)
-configure_file(gplugin-uninstalled.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/gplugin-uninstalled.pc
-set(GPLUGIN_H_INCLUDES "")
-foreach(HEADER ${PUBLIC_HEADERS})
- set(GPLUGIN_H_INCLUDES "${GPLUGIN_H_INCLUDES}\n#include <gplugin/${HEADER}>")
-configure_file(gplugin.h.in gplugin.h @ONLY)
-# build gplugin-native.h
-set(GPLUGIN_NATIVE_H_INCLUDES "")
-foreach(HEADER ${GPLUGIN_NATIVE_HEADERS})
- set(GPLUGIN_NATIVE_H_INCLUDES "${GPLUGIN_NATIVE_H_INCLUDES}\n#include <gplugin/${HEADER}>")
-configure_file(gplugin-native.h.in gplugin-native.h @ONLY)
-###############################################################################
-# gplugin-enum.[ch] generation
-###############################################################################
- DEPENDS ${ENUM_HEADERS} gplugin-enums.h.tmpl
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${GLIB_MKENUMS} --template gplugin-enums.h.tmpl
- --identifier-prefix GPlugin ${ENUM_HEADERS} >
- ${CMAKE_CURRENT_BINARY_DIR}/gplugin-enums.h
- DEPENDS ${ENUM_HEADERS} gplugin-enums.c.tmpl gplugin-enums.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${GLIB_MKENUMS} --template gplugin-enums.c.tmpl
- --identifier-prefix GPlugin ${ENUM_HEADERS} >
- ${CMAKE_CURRENT_BINARY_DIR}/gplugin-enums.c
-###############################################################################
-# gplugin-marshallers.[ch] generation
-###############################################################################
- OUTPUT gplugin-marshallers.h
- DEPENDS gplugin-marshallers.list
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${GLIB_GENMARSHAL} --header --prefix=gplugin_marshal gplugin-marshallers.list
- > ${CMAKE_CURRENT_BINARY_DIR}/gplugin-marshallers.h
- OUTPUT gplugin-marshallers.c
- DEPENDS gplugin-marshallers.list
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND ${GLIB_GENMARSHAL} --body --prefix=gplugin_marshal gplugin-marshallers.list
- > ${CMAKE_CURRENT_BINARY_DIR}/gplugin-marshallers.c
-###############################################################################
-###############################################################################
-add_library(gplugin SHARED
- ${GPLUGIN_NATIVE_SOURCES}
- ${GPLUGIN_PUBLIC_BUILT_SOURCES}
- ${GPLUGIN_PRIVATE_SOURCES}
- ${GPLUGIN_PRIVATE_BUILT_SOURCES}
- ${GPLUGIN_NATIVE_HEADERS}
-set_target_properties(gplugin PROPERTIES
- SOVERSION ${GPLUGIN_LD_CURRENT}
- VERSION ${GPLUGIN_LD_VERSION}
-target_link_libraries(gplugin
- SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c
- BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES}
-###############################################################################
-# gplugin-query executable
-###############################################################################
-add_executable(gplugin-query gplugin-query.c)
-target_link_libraries(gplugin-query ${GLIB_LIBRARIES} gplugin)
- NAME "Query installed plugins"
-###############################################################################
-# loader-tests static library
-###############################################################################
-add_library(gplugin-loader-tests STATIC
-target_link_libraries(gplugin-loader-tests gplugin)
-###############################################################################
-###############################################################################
- message("The GObject Introspection build always fails on OS X, "
- include(GObjectIntrospection)
- 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 --warn-all
- 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)
-###############################################################################
-###############################################################################
-# install the main library
-install(TARGETS gplugin DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install(TARGETS gplugin-query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-# install the single includes into the main directory
- FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.h
- ${CMAKE_CURRENT_BINARY_DIR}/gplugin-native.h
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0
-# install the normal includes into the gplugin subdirectory
-foreach(HEADER ${GPLUGIN_HEADERS} ${GPLUGIN_NATIVE_HEADERS})
- FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin
-# install the built include into the gplugin subdirectory
-foreach(HEADER ${GPLUGIN_PUBLIC_BUILT_HEADERS})
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
-###############################################################################
-###############################################################################
- add_subdirectory(tests)
--- a/gplugin/gplugin-enums.c.tmpl Mon Jun 29 22:08:31 2015 -0500
+++ b/gplugin/gplugin-enums.c.tmpl Sat Jun 03 02:47:28 2017 -0500
@@ -25,7 +25,7 @@
/*** BEGIN file-production ***/
/* enumerations from "@filename@" */
-#include "gplugin/@filename@"
+#include "gplugin/@basename@" /*** END file-production ***/
--- a/gplugin/gplugin-enums.h.tmpl Mon Jun 29 22:08:31 2015 -0500
+++ b/gplugin/gplugin-enums.h.tmpl Sat Jun 03 02:47:28 2017 -0500
@@ -27,7 +27,7 @@
/*** BEGIN file-production ***/
-/* enumerations from "@filename@" */
+/* enumerations from "@basename@" */ /*** END file-production ***/
/*** BEGIN value-header ***/
--- a/gplugin/gplugin-manager.c Mon Jun 29 22:08:31 2015 -0500
+++ b/gplugin/gplugin-manager.c Sat Jun 03 02:47:28 2017 -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 Mon Jun 29 22:08:31 2015 -0500
+++ b/gplugin/gplugin-native-loader.c Sat Jun 03 02:47:28 2017 -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/gplugin-uninstalled.pc.in Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-Description: A fully featured GModule based plugin library
-Version: @GPLUGIN_VERSION@
-Requires: glib-2.0 gobject-2.0 gmodule-2.0
-Libs: -L@CMAKE_BINARY_DIR@/gplugin -lgplugin
-Cflags: -I@CMAKE_SOURCE_DIR@/gplugin -I@CMAKE_BINARY_DIR@/gplugin
--- a/gplugin/gplugin.pc.in Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-includedir=${prefix}/include/gplugin-1.0/
-plugindir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
-Description: A fully featured GModule based plugin library
-Version: @GPLUGIN_VERSION@
-Requires: glib-2.0 gobject-2.0 gmodule-2.0
-Libs: -L${libdir} -lgplugin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,281 @@
+############################################################################### +############################################################################### +GPLUGIN_LD_VERSION = '@0@.@1@.@2@'.format( + 'gplugin-plugin-info.h', + 'gplugin-plugin-info.c', +GPLUGIN_PUBLIC_BUILT_HEADERS = [ +GPLUGIN_PUBLIC_BUILT_SOURCES = [ +GPLUGIN_PRIVATE_HEADERS = [ +GPLUGIN_PRIVATE_SOURCES = [ +GPLUGIN_PRIVATE_BUILT_HEADERS = [ +GPLUGIN_PRIVATE_BUILT_SOURCES = [ +GPLUGIN_NATIVE_HEADERS = [ + 'gplugin-native-plugin.h', + 'gplugin-native-loader.h', +GPLUGIN_NATIVE_SOURCES = [ + 'gplugin-native-plugin.c', + 'gplugin-native-loader.c', +############################################################################### +# gplugin-enum.[ch] generation +############################################################################### +enums = gnome.mkenums('gplugin-enums', + sources : ENUM_HEADERS, + c_template : 'gplugin-enums.c.tmpl', + h_template : 'gplugin-enums.h.tmpl', + identifier_prefix : 'GPlugin', + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin')) +GPLUGIN_PUBLIC_BUILT_HEADERS += [ +GPLUGIN_PUBLIC_BUILT_SOURCES += [ +############################################################################### +# gplugin-marshallers.[ch] generation +############################################################################### +marshallers = gnome.genmarshal('gplugin-marshallers', + sources : 'gplugin-marshallers.list', + prefix : 'gplugin_marshal') +marshallers_c = marshallers[0] +marshallers_h = marshallers[1] +GPLUGIN_PRIVATE_BUILT_HEADERS += [ +GPLUGIN_PRIVATE_BUILT_SOURCES += [ +############################################################################## +############################################################################### +PRIVATE_HEADERS = GPLUGIN_PRIVATE_HEADERS + GPLUGIN_PRIVATE_BUILT_HEADERS + ['gplugin-private.h', 'gplugin-native-private.h'] +############################################################################### +############################################################################### +gplugin_version_h = configure_file( + input : 'gplugin-version.h.in', + output : 'gplugin-version.h', + configuration : version_conf, + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin')) +GPLUGIN_PUBLIC_BUILT_HEADERS += [ +foreach header : GPLUGIN_HEADERS + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( +foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( +conf = configuration_data() +conf.set('GPLUGIN_H_INCLUDES', GPLUGIN_H_INCLUDES) +gplugin_h = configure_file( + input : 'gplugin.h.in', + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0')) +# Build gplugin-native.h +GPLUGIN_NATIVE_H_INCLUDES = '' +foreach header : GPLUGIN_NATIVE_HEADERS + GPLUGIN_NATIVE_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( + GPLUGIN_NATIVE_H_INCLUDES, +conf = configuration_data() +conf.set('GPLUGIN_NATIVE_H_INCLUDES', GPLUGIN_NATIVE_H_INCLUDES) +gplugin_native_h = configure_file( + input : 'gplugin-native.h.in', + output : 'gplugin-native.h', + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0')) +############################################################################### +############################################################################### +gplugin = shared_library('gplugin', + GPLUGIN_NATIVE_SOURCES, + GPLUGIN_PUBLIC_BUILT_SOURCES, + GPLUGIN_PRIVATE_SOURCES, + GPLUGIN_PRIVATE_BUILT_SOURCES, + GPLUGIN_NATIVE_HEADERS, + GPLUGIN_PUBLIC_BUILT_HEADERS, + c_args : ['-DGPLUGIN_COMPILATION', '-DG_LOG_DOMAIN="GPlugin"'], + include_directories : toplevel_inc, + dependencies : [GLIB, GOBJECT, GMODULE], + soversion : GPLUGIN_LD_CURRENT, + version : GPLUGIN_LD_VERSION, +gplugin_dep = declare_dependency( + include_directories : [toplevel_inc, include_directories('.')], + sources : GPLUGIN_PUBLIC_BUILT_HEADERS, # Ensure they're built before use. + dependencies : [GLIB, GOBJECT] + description : 'A fully featured GModule based plugin library', + version : meson.project_version(), + subdirs : 'gplugin-1.0', + requires : ['glib-2.0', 'gobject-2.0', 'gmodule-2.0'], +# SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c +# BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES} +############################################################################### +# gplugin-query executable +############################################################################### +gplugin_query = executable('gplugin-query', + dependencies : [gplugin_dep, GLIB, GOBJECT], +if get_option('help2man') + custom_target('gplugin-query.1', + '--name=Query installed plugins', '--section=1', + '--help-option=--help-all', '--no-info', + '--output', '@OUTPUT@', + output : 'gplugin-query.1', + install_dir : join_paths(get_option('mandir'), 'man1')) +############################################################################### +# loader-tests static library +############################################################################### +gplugin_loader_tests = static_library('gplugin-loader-tests', + 'gplugin-loader-tests.c', + 'gplugin-loader-tests.h', + c_args : ['-DGI_TYPELIB_PATH="@0@"'.format(meson.current_build_dir())], + dependencies : [gplugin_dep], +############################################################################### +############################################################################### +if get_option('gobject-introspection') + gplugin_gir = gnome.generate_gir(gplugin, + sources : GPLUGIN_SOURCES + GPLUGIN_HEADERS + + GPLUGIN_PUBLIC_BUILT_SOURCES + + GPLUGIN_PUBLIC_BUILT_HEADERS, + includes : ['GModule-2.0', 'GObject-2.0'], + symbol_prefix : 'gplugin', + nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION), +############################################################################### +############################################################################### +# install the normal includes into the gplugin subdirectory + GPLUGIN_NATIVE_HEADERS, + subdir : 'gplugin-1.0/gplugin' +############################################################################### +############################################################################### +if get_option('testing') --- a/gplugin/tests/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-###############################################################################
-###############################################################################
-macro(add_test_plugin plugin)
- add_library(${plugin} MODULE ${plugin}.c)
- set_target_properties(${plugin} PROPERTIES PREFIX "")
- target_link_libraries(${plugin} ${GLIB_LIBRARIES} gplugin)
-endmacro(add_test_plugin)
- add_executable(${target} ${target}.c)
- target_link_libraries(${target} ${GLIB_LIBRARIES} gplugin)
- get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
- get_target_property(_output_name ${target} LOCATION)
- list(APPEND TESTS ${_output_name})
-###############################################################################
-###############################################################################
-add_subdirectory(plugins)
-add_subdirectory(bad-plugins)
-add_subdirectory(dynamic-type)
-add_subdirectory(id-collision)
-add_subdirectory(load-on-query-pass)
-add_subdirectory(load-on-query-fail)
-add_subdirectory(versioned-dependencies)
-add_subdirectory(bind-local)
-###############################################################################
-###############################################################################
-#######################################
-# Simple Tests (single file)
-#######################################
-add_gtest(test-option-group)
-add_gtest(test-plugin-manager-paths)
-add_gtest(test-plugin-info)
-add_gtest(test-version-compare)
-#######################################
-#######################################
-add_gtest(test-dynamic-type)
-add_dependencies(test-dynamic-type dynamic-type-provider dynamic-type-user)
-add_definitions(-DTEST_DYNAMIC_DIR="${CMAKE_CURRENT_BINARY_DIR}/dynamic-type/")
-#######################################
-#######################################
-add_gtest(test-id-collision)
-add_dependencies(test-id-collision id-collision1 id-collision2)
-#######################################
-#######################################
-add_gtest(test-load-on-query)
-add_dependencies(test-load-on-query load-on-query-pass load-on-query-fail)
- -DTEST_LOAD_ON_QUERY_PASS_DIR="${CMAKE_CURRENT_BINARY_DIR}/load-on-query-pass"
- -DTEST_LOAD_ON_QUERY_FAIL_DIR="${CMAKE_CURRENT_BINARY_DIR}/load-on-query-fail"
-#######################################
-# Versioned Dependencies
-#######################################
-add_gtest(test-versioned-dependencies)
-add_dependencies(test-versioned-dependencies
- -DTEST_VERSIONED_DEPENDENCY_DIR="${CMAKE_CURRENT_BINARY_DIR}/versioned-dependencies"
-#######################################
-#######################################
-add_gtest(test-native-loader)
-add_dependencies(test-native-loader
- broken-dependent-plugin
-target_link_libraries(test-native-loader gplugin-loader-tests)
-add_definitions(-DTEST_DIR="${CMAKE_CURRENT_BINARY_DIR}/plugins/")
-add_definitions(-DTEST_BAD_DIR="${CMAKE_CURRENT_BINARY_DIR}/bad-plugins/")
-add_definitions(-DTEST_ID_DIR="${CMAKE_CURRENT_BINARY_DIR}/id-collision/")
-###############################################################################
-###############################################################################
-add_gtest(test-bind-local)
-add_dependencies(test-bind-local bind-local)
-add_definitions(-DTEST_BIND_LOCAL_DIR="${CMAKE_CURRENT_BINARY_DIR}/bind-local/")
-###############################################################################
-###############################################################################
-set(GTESTER_TESTS "${TESTS}")
-set(GTESTER_LOG "testgplugin.xml")
-set(GTESTER_JUNIT "testgplugin-junit.xml")
- COMMAND ${GTESTER} -k --verbose -o ${GTESTER_LOG} ${GTESTER_TESTS}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${XSLTPROC} -o ${GTESTER_JUNIT} --nonet
- ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
- OUTPUT ${GTESTER_JUNIT}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-add_custom_target(tests ALL
- DEPENDS ${GTESTER_LOG} ${GTESTER_JUNIT}
--- a/gplugin/tests/bad-plugins/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-add_test_plugin(query-error)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/bad-plugins/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,3 @@
+shared_library('query-error', 'query-error.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/bind-local/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-add_test_plugin(bind-local)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/bind-local/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,3 @@
+shared_library('bind-local', 'bind-local.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/dynamic-type/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-add_test_plugin(dynamic-type-provider)
-add_test_plugin(dynamic-type-user)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/dynamic-type/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,8 @@
+dynamic_type_provider = shared_library('dynamic-type-provider', + 'dynamic-type-provider.c', + dependencies : [gplugin_dep, GLIB]) +shared_module('dynamic-type-user', 'dynamic-type-user.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/id-collision/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-add_test_plugin(id-collision1)
-add_test_plugin(id-collision2)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/id-collision/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,7 @@
+shared_library('id-collision1', 'id-collision1.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('id-collision2', 'id-collision2.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/load-on-query-fail/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-add_test_plugin(load-on-query-fail)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/load-on-query-fail/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,3 @@
+shared_library('load-on-query-fail', 'load-on-query-fail.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/load-on-query-pass/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-add_test_plugin(load-on-query-pass)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/load-on-query-pass/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,3 @@
+shared_library('load-on-query-pass', 'load-on-query-pass.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,140 @@
+############################################################################### +############################################################################### +subdir('load-on-query-pass') +subdir('load-on-query-fail') +subdir('versioned-dependencies') +subdir('unresolved-symbol') +############################################################################### +############################################################################### +####################################### +# Simple Tests (single file) +####################################### +e = executable('test-core', 'test-core.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-option-group', 'test-option-group.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-plugin-manager-paths', 'test-plugin-manager-paths.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Plugin Manager Paths', e) +e = executable('test-plugin-info', 'test-plugin-info.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-signals', 'test-signals.c', + c_args : ['-DTEST_DIR="@0@/plugins/"'.format(meson.current_build_dir())], + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-version-compare', 'test-version-compare.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Version Compare', e) +####################################### +####################################### +e = executable('test-dynamic-type', 'test-dynamic-type.c', + '-DTEST_DYNAMIC_DIR="@0@/dynamic-type/"'.format( + meson.current_build_dir()) + dependencies : [gplugin_dep, GLIB, GOBJECT]) +####################################### +####################################### +e = executable('test-id-collision', 'test-id-collision.c', + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +####################################### +####################################### +e = executable('test-load-on-query', 'test-load-on-query.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_LOAD_ON_QUERY_PASS_DIR="@0@/load-on-query-pass"'.format( + meson.current_build_dir()), + '-DTEST_LOAD_ON_QUERY_FAIL_DIR="@0@/load-on-query-fail"'.format( + meson.current_build_dir()) + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Load On Query', e) +####################################### +# Versioned Dependencies +####################################### +e = executable('test-versioned-dependencies', 'test-versioned-dependencies.c', + '-DTEST_VERSIONED_DEPENDENCY_DIR="@0@/versioned-dependencies"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Versioned Dependencies', e) +####################################### +####################################### +e = executable('test-native-loader', 'test-native-loader.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_BAD_DIR="@0@/bad-plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + link_with : gplugin_loader_tests, + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Native Loader', e) +############################################################################### +############################################################################### +e = executable('test-bind-local', 'test-bind-local.c', + '-DTEST_BIND_LOCAL_DIR="@0@/bind-local/"'.format( + meson.current_build_dir()), + '-DTEST_BAD_DIR="@0@/bad-plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +############################################################################### +############################################################################### +e = executable('test-unresolved-symbol', 'test-unresolved-symbol.c', + '-DPLUGIN_DIR="@0@/unresolved-symbol/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Unresolved Symbol', e) --- a/gplugin/tests/plugins/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-add_test_plugin(basic-plugin)
-add_test_plugin(dependent-plugin)
-add_test_plugin(broken-dependent-plugin)
-add_test_plugin(load-failed)
-add_test_plugin(load-exception)
-add_test_plugin(unload-failed)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/plugins/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,23 @@
+shared_library('basic-plugin', 'basic-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('dependent-plugin', 'dependent-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('broken-dependent-plugin', 'broken-dependent-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('load-failed', 'load-failed.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('load-exception', 'load-exception.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('unload-failed', 'unload-failed.c', + dependencies : [gplugin_dep, GLIB]) --- a/gplugin/tests/test-signals.c Mon Jun 29 22:08:31 2015 -0500
+++ b/gplugin/tests/test-signals.c Sat Jun 03 02:47:28 2017 -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 Sat Jun 03 02:47:28 2017 -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/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,4 @@
+shared_module('unresolved-symbol', 'unresolved-symbol.c', + link_args : '-Wl,--warn-unresolved-symbols', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/unresolved-symbol.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,43 @@
+ * 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> +void some_unresolved_symbol(void); +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/gplugin/tests/versioned-dependencies/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-add_test_plugin(super-dependent)
-add_test_plugin(no-version)
-add_test_plugin(greater)
-add_test_plugin(greater-equal)
-add_test_plugin(less-equal)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/versioned-dependencies/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,43 @@
+shared_library('super-dependent', 'super-dependent.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('no-version', 'no-version.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('exact1', 'exact1.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('exact2', 'exact2.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('greater', 'greater.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('greater-equal', 'greater-equal.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('less', 'less.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('less-equal', 'less-equal.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('bar', 'bar.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('baz', 'baz.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('fez', 'fez.c', + dependencies : [gplugin_dep, GLIB]) --- a/lua/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
- "Whether or not to build the Lua plugin loader"
- message(FATAL_ERROR "Lua plugin requires GObject Introspection.")
- set(GPLUGIN_LUA_SOURCES
- set(GPLUGIN_LUA_HEADERS
- set(_LUAS "luajit>=2.0.0;lua>=5.1.0;lua5.2>=5.2.0;lua5.1>=5.1.0")
- pkg_check_modules(LUA ${_LUA})
- message(FATAL_ERROR "No usable Lua library was found")
- include_directories(${LUA_INCLUDE_DIRS})
- message(STATUS "checking for lua module 'lgi'")
- # compile our lua-lgi test program
- try_compile(LUA_LGI_COMPILE
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/gplugin-lua-test-lgi.c
- -DINCLUDE_DIRECTORIES:STRING=${LUA_INCLUDE_DIRS}
- -DLINK_LIBRARIES:STRING=${LUA_LIBRARIES}
- COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/gplugin-lua-test-lgi
- if(NOT ${LUA_LGI_COMPILE})
- message(STATUS ${OUTPUT})
- message(FATAL_ERROR "Failed to compile the lua-lgi test")
- endif(NOT ${LUA_LGI_COMPILE})
- # run our lua-lgi test program
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gplugin-lua-test-lgi
- RESULT_VARIABLE LUA_LGI_FOUND
- if(${LUA_LGI_FOUND} EQUAL 0)
- message(STATUS " found lgi")
- else(${LUA_LGI_FOUND} EQUAL 0)
- message(FATAL_ERROR " failed to find the 'lgi' lua module")
- endif(${LUA_LGI_FOUND} EQUAL 0)
- "Whether or not to run the moonscript tests"
- add_library(gplugin-lua MODULE
- set_target_properties(gplugin-lua PROPERTIES PREFIX "")
- target_link_libraries(gplugin-lua
- install(TARGETS gplugin-lua DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
- add_subdirectory(tests)
--- a/lua/gplugin-lua-test-lgi.c Mon Jun 29 22:08:31 2015 -0500
+++ b/lua/gplugin-lua-test-lgi.c Sat Jun 03 02:47:28 2017 -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/lua/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,54 @@
+ if not get_option('gobject-introspection') + error('Lua plugin requires GObject Introspection.') + GPLUGIN_LUA_SOURCES = [ + 'gplugin-lua-loader.c', + 'gplugin-lua-plugin.c', + GPLUGIN_LUA_HEADERS = [ + 'gplugin-lua-loader.h', + 'gplugin-lua-plugin.h', + _LUAS = [['lua', '>=5.1.0'], + LUA = dependency(_LUA[0], version : _LUA[1], required : false) + LUA_FOUND = LUA.found() + error('No usable Lua library was found') + # Compile and run our lua-lgi test program + lua_lgi_test = compiler.run(files('gplugin-lua-test-lgi.c'), + name : 'lua "lgi" module') + if not lua_lgi_test.compiled() or lua_lgi_test.returncode() != 0 + error('Failed to find the "lgi" lua module') + shared_library('gplugin-lua', + dependencies : [LUA, gplugin_dep], + install_dir : join_paths(get_option('libdir'), 'gplugin') +if get_option('testing') --- a/lua/tests/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-macro(add_lua_gtest target)
- add_executable(${target} ${target}.c)
- target_link_libraries(${target}
- ${GLIB_LIBRARIES} ${LUA_LIBRARIES} gplugin
- add_dependencies(${target} gplugin-lua)
- get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
- if(NOT ${_output_name})
- get_target_property(_output_name ${target} LOCATION)
- endif(NOT ${_output_name})
- list(APPEND LUA_TESTS ${_output_name})
- -DLUA_LOADER_DIR="${CMAKE_BINARY_DIR}/lua"
- -DLUA_PLUGIN_DIR="${CMAKE_CURRENT_SOURCE_DIR}/plugins"
-add_lua_gtest(test-lua-loader)
-target_link_libraries(test-lua-loader gplugin-loader-tests)
- add_lua_gtest(test-lua-moon-loader)
- target_link_libraries(test-lua-moon-loader gplugin-loader-tests)
-endif(${MOONSCRIPT_TESTS})
-set(GTESTER_LUA_TESTS "${LUA_TESTS}")
-set(GTESTER_LUA_LOG "test-gplugin-lua.xml")
-set(GTESTER_LUA_JUNIT "test-gplugin-lua-junit.xml")
- COMMAND ${GTESTER} -k --verbose -o ${GTESTER_LUA_LOG} ${LUA_TESTS}
- OUTPUT ${GTESTER_LUA_LOG}
- DEPENDS gplugin ${GPLUGIN_GIR_TARGETS} gplugin-lua
- ${LUA_TESTS} ${CMAKE_CURRENT_SOURCE_DIR}/plugins
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${XSLTPROC} -o ${GTESTER_LUA_JUNIT} --nonet
- ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
- OUTPUT ${GTESTER_LUA_JUNIT}
- DEPENDS ${GTESTER_LUA_LOG}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-add_custom_target(lua-tests ALL
- DEPENDS ${GTESTER_LUA_LOG} ${GTESTER_LUA_JUNIT} ${LUA_TESTS}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/lua-plugins/basic.lua Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,43 @@
+ Copyright (C) 2011-2014 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/>. +local lgi = require 'lgi' +local GPlugin = lgi.GPlugin +function gplugin_query() + return GPlugin.PluginInfo { + id = "gplugin/lua-basic-plugin", + abi_version = 0x01020304, + license_id = "license", + description = "description", + authors = { "author1" }, +function gplugin_load(plugin) +function gplugin_unload(plugin) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/lua-plugins/dependent.lua Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,35 @@
+ Copyright (C) 2011-2014 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/>. +local lgi = require 'lgi' +local GPlugin = lgi.GPlugin +function gplugin_query() + return GPlugin.PluginInfo { + id="gplugin/lua-dependent-plugin", + dependencies={"dependency1", "dependency2"}, +function gplugin_load(plugin) +function gplugin_unload(plugin) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/lua-plugins/load-exception.lua Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,34 @@
+ Copyright (C) 2011-2014 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/>. +local lgi = require 'lgi' +local GPlugin = lgi.GPlugin +function gplugin_query() + return GPlugin.PluginInfo { + id="gplugin/lua-load-exception", +function gplugin_load(plugin) +function gplugin_unload(plugin) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/lua-plugins/load-failed.lua Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,34 @@
+ Copyright (C) 2011-2014 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/>. +local lgi = require 'lgi' +local GPlugin = lgi.GPlugin +function gplugin_query() + return GPlugin.PluginInfo { + id="gplugin/lua-load-failed", +function gplugin_load(plugin) +function gplugin_unload(plugin) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/lua-plugins/unload-failed.lua Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,34 @@
+ Copyright (C) 2011-2014 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/>. +local lgi = require 'lgi' +local GPlugin = lgi.GPlugin +function gplugin_query() + return GPlugin.PluginInfo { + id="gplugin/lua-unload-failed", +function gplugin_load(plugin) +function gplugin_unload(plugin) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,29 @@
+e = executable('test-lua-loader', 'test-lua-loader.c', + '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()), + '-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format( + meson.current_source_dir()), + '-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format( + meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, LUA, gplugin_dep]) +if get_option('moonscript-tests') + e = executable('test-lua-moon-loader', 'test-lua-moon-loader.c', + '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()), + '-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format( + meson.current_source_dir()), + '-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format( + meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, LUA, gplugin_dep]) + test('Lua Moon Loader', e) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/moonscript-plugins/basic.moon Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,39 @@
+-- Copyright (C) 2011-2014 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/>. +export gplugin_query = -> + return GPlugin.PluginInfo { + id: "gplugin/moon-basic-plugin", + abi_version: 0x01020304, + description: "description", + authors: { "author1" }, +export gplugin_load = -> +export gplugin_unload = -> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/moonscript-plugins/dependent.moon Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,30 @@
+-- Copyright (C) 2011-2014 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/>. +export gplugin_query = -> + return GPlugin.PluginInfo { + id: "gplugin/moon-dependent-plugin", + dependencies: {"dependency1", "dependency2"} +export gplugin_load = -> +export gplugin_unload = -> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/moonscript-plugins/load-exception.moon Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,30 @@
+-- Copyright (C) 2011-2014 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/>. +export gplugin_query = -> + return GPlugin.PluginInfo { + id: "gplugin/moon-load-exception" +export gplugin_load = -> +export gplugin_unload = -> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/moonscript-plugins/load-failed.moon Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,30 @@
+-- Copyright (C) 2011-2014 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/>. +export gplugin_query = -> + return GPlugin.PluginInfo { + id: "gplugin/moon-load-failed" +export gplugin_load = -> +export gplugin_unload = -> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/moonscript-plugins/unload-failed.moon Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,30 @@
+-- Copyright (C) 2011-2014 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/>. +export gplugin_query = -> + return GPlugin.PluginInfo { + id: "gplugin/moon-unload-failed" +export gplugin_load = -> +export gplugin_unload = -> --- a/lua/tests/plugins/basic.lua Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
---[[
- Copyright (C) 2011-2014 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/>.
---]]
-local lgi = require 'lgi'
-local GPlugin = lgi.GPlugin
-function gplugin_query()
- return GPlugin.PluginInfo {
- id = "gplugin/lua-basic-plugin",
- abi_version = 0x01020304,
- license_id = "license",
- description = "description",
- authors = { "author1" },
-function gplugin_load(plugin)
-function gplugin_unload(plugin)
--- a/lua/tests/plugins/basic.moon Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
--- Copyright (C) 2011-2014 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/>.
-
-export gplugin_query = ->
- return GPlugin.PluginInfo {
- id: "gplugin/moon-basic-plugin",
- abi_version: 0x01020304,
- description: "description",
- authors: { "author1" },
-export gplugin_load = ->
-export gplugin_unload = ->
--- a/lua/tests/plugins/dependent.lua Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
---[[
- Copyright (C) 2011-2014 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/>.
---]]
-local lgi = require 'lgi'
-local GPlugin = lgi.GPlugin
-function gplugin_query()
- return GPlugin.PluginInfo {
- id="gplugin/lua-dependent-plugin",
- dependencies={"dependency1", "dependency2"},
-function gplugin_load(plugin)
-function gplugin_unload(plugin)
--- a/lua/tests/plugins/dependent.moon Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
--- Copyright (C) 2011-2014 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/>.
-
-export gplugin_query = ->
- return GPlugin.PluginInfo {
- id: "gplugin/moon-dependent-plugin",
- dependencies: {"dependency1", "dependency2"}
-export gplugin_load = ->
-export gplugin_unload = ->
--- a/lua/tests/plugins/load-exception.lua Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
---[[
- Copyright (C) 2011-2014 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/>.
---]]
-local lgi = require 'lgi'
-local GPlugin = lgi.GPlugin
-function gplugin_query()
- return GPlugin.PluginInfo {
- id="gplugin/lua-load-exception",
-function gplugin_load(plugin)
-function gplugin_unload(plugin)
--- a/lua/tests/plugins/load-exception.moon Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
--- Copyright (C) 2011-2014 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/>.
-
-export gplugin_query = ->
- return GPlugin.PluginInfo {
- id: "gplugin/moon-load-exception"
-export gplugin_load = ->
-export gplugin_unload = ->
--- a/lua/tests/plugins/load-failed.lua Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
---[[
- Copyright (C) 2011-2014 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/>.
---]]
-local lgi = require 'lgi'
-local GPlugin = lgi.GPlugin
-function gplugin_query()
- return GPlugin.PluginInfo {
- id="gplugin/lua-load-failed",
-function gplugin_load(plugin)
-function gplugin_unload(plugin)
--- a/lua/tests/plugins/load-failed.moon Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
--- Copyright (C) 2011-2014 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/>.
-
-export gplugin_query = ->
- return GPlugin.PluginInfo {
- id: "gplugin/moon-load-failed"
-export gplugin_load = ->
-export gplugin_unload = ->
--- a/lua/tests/plugins/unload-failed.lua Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
---[[
- Copyright (C) 2011-2014 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/>.
---]]
-local lgi = require 'lgi'
-local GPlugin = lgi.GPlugin
-function gplugin_query()
- return GPlugin.PluginInfo {
- id="gplugin/lua-unload-failed",
-function gplugin_load(plugin)
-function gplugin_unload(plugin)
--- a/lua/tests/plugins/unload-failed.moon Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
--- Copyright (C) 2011-2014 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/>.
-
-export gplugin_query = ->
- return GPlugin.PluginInfo {
- id: "gplugin/moon-unload-failed"
-export gplugin_load = ->
-export gplugin_unload = ->
--- a/lua/tests/test-lua-moon-loader.c Mon Jun 29 22:08:31 2015 -0500
+++ b/lua/tests/test-lua-moon-loader.c Sat Jun 03 02:47:28 2017 -0500
@@ -24,7 +24,7 @@
main(gint argc, gchar **argv) {
g_test_init(&argc, &argv, NULL);
- gplugin_loader_tests_main(LUA_LOADER_DIR, LUA_PLUGIN_DIR, "moon");
+ gplugin_loader_tests_main(LUA_LOADER_DIR, MOONSCRIPT_PLUGIN_DIR, "moon"); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,151 @@
+############################################################################### +############################################################################### +project('gplugin', 'c', version : '0.28.0-dev', + meson_version : '>0.36.0', + default_options : ['c_std=c99']) +parts = meson.project_version().split('-') +parts = parts[0].split('.') +GPLUGIN_MAJOR_VERSION = parts[0] +version_conf = configuration_data() +version_conf.set('GPLUGIN_MAJOR_VERSION', GPLUGIN_MAJOR_VERSION) +version_conf.set('GPLUGIN_MINOR_VERSION', parts[1]) +version_conf.set('GPLUGIN_MICRO_VERSION', parts[2]) +version_conf.set('GPLUGIN_EXTRA_VERSION', extra) +version_conf.set('GPLUGIN_VERSION', meson.project_version()) +LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir')) +add_global_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c') +############################################################################### +############################################################################### +pkgconfig = import('pkgconfig') +if get_option('help2man') + help2man = find_program('help2man') +GLIB = dependency('glib-2.0', version : '>=2.34.0') +GOBJECT = dependency('gobject-2.0') +# we separate gmodule out so our test aren't linked to it +GMODULE = dependency('gmodule-2.0') +if get_option('testing') + GTESTER = find_program('gtester') + XSLTPROC = find_program('xsltproc') +############################################################################### +############################################################################### +GETTEXT_PACKAGE = 'gplugin' +add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE), +############################################################################### +############################################################################### +compiler = meson.get_compiler('c') + '-DPREFIX="@0@"'.format(get_option('prefix')), + '-DLIBDIR="@0@"'.format(get_option('libdir')), + '-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"', +if compiler.has_argument('-Wformat') + add_global_arguments('-Wformat', language : 'c') + if compiler.has_multi_arguments(['-Wformat', '-Werror=format-security']) + add_global_arguments('-Werror=format-security', language : 'c') + input : 'gplugin-version.sh.in', + output : 'gplugin-version.sh', + configuration : version_conf) +# check if we're using gcc +if compiler.get_id() == 'gcc' or host_machine.platform() == 'darwin' + '-DGPLUGIN_UNUSED=__attribute__((unused))', +toplevel_inc = include_directories('.') +############################################################################### +############################################################################### +############################################################################### +############################################################################### +install_data('ChangeLog', 'INSTALL', 'README', 'HACKING', + install_dir : join_paths(get_option('datadir'), 'doc', 'gplugin')) +############################################################################### +############################################################################### +# gplugin-${GPLUGIN_VERSION}.tar.bz2 +# gplugin-${GPLUGIN_VERSION}.tar.gz +# gplugin-${GPLUGIN_VERSION}.zip +#foreach(ARCHIVE ${ARCHIVES}) +# COMMAND hg archive ${ARCHIVE} +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +# COMMAND gpg --yes -abs ${ARCHIVE} +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +# list(APPEND SIGNATURES ${ARCHIVE}.asc) +#add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES}) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meson_options.txt Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,62 @@
+############################################################################### +############################################################################### + 'gobject-introspection', + type : 'boolean', value : true, + description : 'Whether or not to build a GObject Introspection type library' + type : 'boolean', value : true, + description : 'Install translation files' + type : 'boolean', value : true, + description : 'Whether or not to run unit tests while compiling' + type : 'boolean', value : true, + description : 'Whether or not to build man pages from --help output' + type : 'boolean', value : true, + description : 'Whether or not to build the gtk3 library' + type : 'boolean', value : true, + description : 'Whether or not to build the Lua plugin loader' + type : 'boolean', value : false, + description : 'Whether or not to run the moonscript tests' + type : 'boolean', value : false, + description : 'Whether or not to build the Perl plugin loader' + type : 'boolean', value : true, + description : 'Whether or not to build the Python 3.x plugin loader' + type : 'boolean', value : false, + description : 'Whether or not to build the TCC plugin loader' --- a/packaging/debian/changelog Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/changelog Sat Jun 03 02:47:28 2017 -0500
@@ -1,3 +1,39 @@
+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> Sat, 06 Feb 2016 20:28:47 -0600 +gplugin (0.0.24) unstable; urgency=medium + * New upstream release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Thu, 28 Jan 2016 22:38:05 -0600 +gplugin (0.0.23) unstable; urgency=medium + * New release, see official changelog + -- Gary Kramlich <grim@reaperworld.com> Wed, 06 Jan 2016 23:05:37 -0600 gplugin (0.0.21) unstable; urgency=medium
* New release, see official changelog
--- a/packaging/debian/control Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/control Sat Jun 03 02:47:28 2017 -0500
@@ -2,7 +2,8 @@
Maintainer: Gary Kramlich <grim@reaperworld.com>
-Build-Depends: debhelper (>=9), cmake, libglib2.0-dev, libgtk-3-dev,
+Build-Depends: debhelper (>=9), dh-exec, + cmake, libglib2.0-dev, libgtk-3-dev, xsltproc, gettext, help2man,
gobject-introspection, libgirepository1.0-dev,
liblua5.1-0-dev, lua-lgi,
@@ -23,18 +24,6 @@
This package contains the main library.
-Package: libgplugin0-dbg
-Depends: ${misc:Depends}, libgplugin0 (= ${binary:Version})
-Description: debugging symbols for libgplugin0
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- This package contains the debugging symbols for libgplugin0.
@@ -68,18 +57,6 @@
This library provides some default GTK+-3 widgets for GPlugin.
-Package: libgplugin-gtk0-dbg
-Depends: ${misc:Depends}, libgplugin-gtk0 (= ${binary:Version})
-Description: debugging symbols for libgplugin-gtk0
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- This library provides the debugging symbols for libgplugin-gtk0
Package: libgplugin-gtk-dev
@@ -116,7 +93,7 @@
-Depends: ${misc:Depends}, ${shlibs:Depends}, libluajit-5.1,
+Depends: ${misc:Depends}, ${shlibs:Depends}, liblua5.1-0, libgplugin0, gir1.2-gplugin-0.0
Description: GPlugin Lua Loader
GPlugin is a GObject based library that implements a reusable plugin system
--- a/packaging/debian/copyright Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/copyright Sat Jun 03 02:47:28 2017 -0500
@@ -23,4 +23,3 @@
On Debian systems, the complete text of the GNU Lesser General Public LIcense
can be found in /usr/share/common-licenses/LGPL-3.
--- a/packaging/debian/gir1.2-gplugin-0.0.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/gir1.2-gplugin-0.0.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,3 +1,3 @@
-usr/lib/*/girepository-1.0/
+usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/
--- a/packaging/debian/libgplugin-dev.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-dev.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,6 +1,6 @@
usr/include/gplugin-1.0/gplugin
usr/include/gplugin-1.0/gplugin.h
usr/include/gplugin-1.0/gplugin-native.h
-usr/lib/*/pkgconfig/gplugin.pc
+usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/gplugin.pc --- a/packaging/debian/libgplugin-gtk-bin.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-gtk-bin.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,3 +1,2 @@
usr/bin/gplugin-gtk-viewer
usr/share/man/man1/gplugin-gtk-viewer.1
--- a/packaging/debian/libgplugin-gtk-dev.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-gtk-dev.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,5 +1,5 @@
usr/include/gplugin-1.0/gplugin-gtk
usr/include/gplugin-1.0/gplugin-gtk.h
-usr/lib/*/libgplugin-gtk.so
-usr/lib/*/pkgconfig/gplugin-gtk.pc
+usr/lib/${DEB_HOST_MULTIARCH}/libgplugin-gtk.so +usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/gplugin-gtk.pc --- a/packaging/debian/libgplugin-gtk0.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-gtk0.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,2 +1,2 @@
-usr/lib/*/libgplugin-gtk.so.*
+usr/lib/${DEB_HOST_MULTIARCH}/libgplugin-gtk.so.* --- a/packaging/debian/libgplugin-gtk0.postinst Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-gtk0.postinst Sat Jun 03 02:47:28 2017 -0500
@@ -9,4 +9,3 @@
--- a/packaging/debian/libgplugin-gtk0.postrm Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-gtk0.postrm Sat Jun 03 02:47:28 2017 -0500
@@ -9,4 +9,3 @@
--- a/packaging/debian/libgplugin-gtk0.symbols Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-libgplugin-gtk.so.0 libgplugin-gtk0 #MINVER#
- gplugin_gtk_get_store_column_types@Base 0.0.17
- gplugin_gtk_plugin_info_get_plugin@Base 0.0.17
- gplugin_gtk_plugin_info_get_type@Base 0.0.17
- gplugin_gtk_plugin_info_new@Base 0.0.17
- gplugin_gtk_plugin_info_set_plugin@Base 0.0.17
- gplugin_gtk_store_get_type@Base 0.0.17
- gplugin_gtk_store_new@Base 0.0.17
- gplugin_gtk_view_get_show_internal@Base 0.0.17
- gplugin_gtk_view_get_type@Base 0.0.17
- gplugin_gtk_view_new@Base 0.0.17
- gplugin_gtk_view_set_show_internal@Base 0.0.17
--- a/packaging/debian/libgplugin-lua.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-lua.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,2 +1,2 @@
-usr/lib/*/gplugin/gplugin-lua.so usr/lib/*/gplugin
+usr/lib/${DEB_HOST_MULTIARCH}/gplugin/gplugin-lua.so --- a/packaging/debian/libgplugin-python.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin-python.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,2 +1,2 @@
-usr/lib/*/gplugin/gplugin-python.so usr/lib/*/gplugin
+usr/lib/${DEB_HOST_MULTIARCH}/gplugin/gplugin-python.so --- a/packaging/debian/libgplugin0.install Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin0.install Sat Jun 03 02:47:28 2017 -0500
@@ -1,4 +1,4 @@
-usr/lib/*/libgplugin.so.*
+usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so.* usr/share/man/man1/gplugin-query.1
--- a/packaging/debian/libgplugin0.postinst Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin0.postinst Sat Jun 03 02:47:28 2017 -0500
@@ -5,4 +5,3 @@
--- a/packaging/debian/libgplugin0.postrm Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/libgplugin0.postrm Sat Jun 03 02:47:28 2017 -0500
@@ -5,4 +5,3 @@
--- a/packaging/debian/libgplugin0.symbols Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-libgplugin.so.0 libgplugin0 #MINVER#
- dependency_pattern@Base 0.0.17
- dependency_regex@Base 0.0.17
- gplugin_boolean_accumulator@Base 0.0.17
- gplugin_file_tree_entry_free@Base 0.0.17
- gplugin_file_tree_entry_new@Base 0.0.17
- gplugin_file_tree_free@Base 0.0.17
- gplugin_file_tree_new@Base 0.0.17
- gplugin_get_option_group@Base 0.0.17
- gplugin_init@Base 0.0.17
- gplugin_loader_class_get_supported_extensions@Base 0.0.17
- gplugin_loader_get_type@Base 0.0.17
- gplugin_loader_load_plugin@Base 0.0.17
- gplugin_loader_query_plugin@Base 0.0.17
- gplugin_loader_unload_plugin@Base 0.0.17
- gplugin_manager_add_app_paths@Base 0.0.17
- gplugin_manager_add_default_paths@Base 0.0.17
- gplugin_manager_append_path@Base 0.0.17
- gplugin_manager_find_plugin@Base 0.0.17
- gplugin_manager_find_plugins@Base 0.0.17
- gplugin_manager_free_plugin_list@Base 0.0.17
- gplugin_manager_get_instance@Base 0.0.17
- gplugin_manager_get_paths@Base 0.0.17
- gplugin_manager_get_type@Base 0.0.17
- gplugin_manager_list_plugins@Base 0.0.17
- gplugin_manager_load_plugin@Base 0.0.17
- gplugin_manager_prepend_path@Base 0.0.17
- gplugin_manager_private_init@Base 0.0.17
- gplugin_manager_private_uninit@Base 0.0.17
- gplugin_manager_refresh@Base 0.0.17
- gplugin_manager_register_loader@Base 0.0.17
- gplugin_manager_remove_path@Base 0.0.17
- gplugin_manager_remove_paths@Base 0.0.17
- gplugin_manager_unload_plugin@Base 0.0.17
- gplugin_manager_unregister_loader@Base 0.0.17
- gplugin_marshal_BOOLEAN__OBJECT_POINTER@Base 0.0.17
- gplugin_marshal_VOID__ENUM_ENUM@Base 0.0.17
- gplugin_marshal_VOID__INT_INT@Base 0.0.17
- gplugin_native_loader_get_type@Base 0.0.17
- gplugin_native_plugin_add_interface@Base 0.0.17
- gplugin_native_plugin_get_module@Base 0.0.17
- gplugin_native_plugin_get_type@Base 0.0.17
- gplugin_native_plugin_register_enum@Base 0.0.17
- gplugin_native_plugin_register_flags@Base 0.0.17
- gplugin_native_plugin_register_type@Base 0.0.17
- gplugin_native_plugin_unuse@Base 0.0.17
- gplugin_native_plugin_use@Base 0.0.17
- gplugin_plugin_get_filename@Base 0.0.17
- gplugin_plugin_get_info@Base 0.0.17
- gplugin_plugin_get_internal_filename@Base 0.0.17
- gplugin_plugin_get_loader@Base 0.0.17
- gplugin_plugin_get_state@Base 0.0.17
- gplugin_plugin_get_type@Base 0.0.17
- gplugin_plugin_info_get_abi_version@Base 0.0.17
- gplugin_plugin_info_get_authors@Base 0.0.17
- gplugin_plugin_info_get_bind_local@Base 0.0.17
- gplugin_plugin_info_get_category@Base 0.0.17
- gplugin_plugin_info_get_dependencies@Base 0.0.17
- gplugin_plugin_info_get_description@Base 0.0.17
- gplugin_plugin_info_get_help@Base 0.0.17
- gplugin_plugin_info_get_icon@Base 0.0.17
- gplugin_plugin_info_get_id@Base 0.0.17
- gplugin_plugin_info_get_internal@Base 0.0.17
- gplugin_plugin_info_get_license_id@Base 0.0.17
- gplugin_plugin_info_get_license_text@Base 0.0.17
- gplugin_plugin_info_get_license_url@Base 0.0.17
- gplugin_plugin_info_get_load_on_query@Base 0.0.17
- gplugin_plugin_info_get_name@Base 0.0.17
- gplugin_plugin_info_get_summary@Base 0.0.17
- gplugin_plugin_info_get_type@Base 0.0.17
- gplugin_plugin_info_get_version@Base 0.0.17
- gplugin_plugin_info_get_version_func@Base 0.0.17
- gplugin_plugin_info_get_website@Base 0.0.17
- gplugin_plugin_set_state@Base 0.0.17
- gplugin_plugin_state_get_type@Base 0.0.17
- gplugin_uninit@Base 0.0.17
- gplugin_version_compare@Base 0.0.17
--- a/packaging/debian/rules Mon Jun 29 22:08:31 2015 -0500
+++ b/packaging/debian/rules Sat Jun 03 02:47:28 2017 -0500
@@ -3,12 +3,3 @@
- dh_makeshlibs -plibgplugin0
- dh_makeshlibs -plibgplugin-gtk0
- dh_strip -plibgplugin0 --dbg-package=libgplugin0-dbg
- dh_strip -plibgplugin-gtk0 --dbg-package=libgplugin-gtk0-dbg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/gplugin.spec.in Sat Jun 03 02:47:28 2017 -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: meson >= 0.37.0 +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}" meson \ +ninja 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 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,4 @@
+ input : 'gplugin.spec.in', + output : 'gplugin.spec', + configuration : version_conf) --- a/perl/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
- "Whether or not to build the Perl plugin loader"
- message(FATAL_ERROR "Perl plugin requires GObject Introspection.")
- set(GPLUGIN_PERL_SOURCES
- set(GPLUGIN_PERL_HEADERS
- add_library(gplugin-perl MODULE
- ${GPLUGIN_PERL_SOURCES}
- ${GPLUGIN_PERL_HEADERS}
- execute_process(COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
- OUTPUT_VARIABLE PERL_CFLAGS)
- add_definitions(${PERL_EXTRA_C_FLAGS} ${PERL_CFLAGS})
- execute_process(COMMAND ${PERL_EXECUTABLE} -V:lddlflags
- OUTPUT_VARIABLE PERL_LDFLAGS)
- string(REGEX REPLACE "lddlflags='(.+)'" "\\1" PERL_LDFLAGS ${PERL_LDFLAGS})
- string(STRIP ${PERL_LDFLAGS} PERL_LDFLAGS)
- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PERL_LDFLAGS}")
- message(STATUS "PERL_CFLAGS " ${PERL_CFLAGS})
- message(STATUS "PERL_LDFLAGS " ${PERL_LDFLAGS})
- set_target_properties(gplugin-perl PROPERTIES PREFIX "")
- include_directories(${PERL_INCLUDE_PATH})
- target_link_libraries(gplugin-perl ${PERL_LIBRARY})
- install(TARGETS gplugin-perl DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
- message(FATAL_ERROR "Failed to find the Perl libraries")
--- a/perl/gplugin-perl-loader.c Mon Jun 29 22:08:31 2015 -0500
+++ b/perl/gplugin-perl-loader.c Sat Jun 03 02:47:28 2017 -0500
@@ -132,7 +132,7 @@
*****************************************************************************/
-gplugin_perl_loader_register(GPluginNativePlugin *plugin) {
+gplugin_perl_plugin_loader_register(GPluginNativePlugin *plugin) { if(g_once_init_enter(&type_real)) {
@@ -154,7 +154,7 @@
-gplugin_perl_loader_get_type(void) {
+gplugin_perl_plugin_loader_get_type(void) { if(G_UNLIKELY(type_real == 0)) {
g_warning("gplugin_perl_loader_get_type was called before "
"the type was registered!\n");
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perl/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,37 @@
+ if not get_option('gobject-introspection') + error('Perl plugin requires GObject Introspection.') + GPLUGIN_PERL_SOURCES = [ + 'gplugin-perl-loader.c', + 'gplugin-perl-plugin.c', + GPLUGIN_PERL_HEADERS = [ + 'gplugin-perl-loader.h', + 'gplugin-perl-plugin.h', + PERL = find_program('perl') + PERL_CFLAGS = run_command(PERL, '-MExtUtils::Embed', '-e', 'ccopts').stdout() + PERL_LDFLAGS = run_command(PERL, '-MExtUtils::Embed', '-e', 'ldopts').stdout() + message('PERL_CFLAGS ' + PERL_CFLAGS) + message('PERL_LDFLAGS ' + PERL_LDFLAGS) + PERL_CFLAGS = PERL_CFLAGS.split() + PERL_LDFLAGS = PERL_LDFLAGS.split() + shared_library('gplugin-perl', + link_args : PERL_LDFLAGS, + dependencies : [gplugin_dep], + install_dir : join_paths(get_option('libdir'), 'gplugin') --- a/plugins/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-macro(add_plugin plugin)
- add_library(${plugin} MODULE ${plugin}.c)
- set_target_properties(${plugin} PROPERTIES PREFIX "")
- target_link_libraries(${plugin} gplugin)
- install(TARGETS ${plugin} DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
-add_plugin(gplugin-license-check)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,6 @@
+shared_library('gplugin-license-check', + 'gplugin-license-check.c', + dependencies : [gplugin_dep], + install_dir : join_paths(get_option('libdir'), 'gplugin')) --- a/po/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
- GETTEXTIZE_TRANSLATIONS(UPDATE)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/po/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,3 @@
+# GETTEXTIZE_TRANSLATIONS(UPDATE) --- a/python/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
- "Whether or not to build the Python 3.x plugin loader"
- message(FATAL_ERROR "Python plugin requires GObject Introspection.")
- set(GPLUGIN_PYTHON_SOURCES
- gplugin-python-loader.c
- gplugin-python-plugin.c
- set(GPLUGIN_PYTHON_HEADERS
- gplugin-python-loader.h
- gplugin-python-plugin.h
- pkg_check_modules(PYTHON3 REQUIRED python3)
- pkg_check_modules(PYGOBJECT REQUIRED pygobject-3.0>=3.0.0)
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${PYTHON3_INCLUDE_DIRS}
- ${PYGOBJECT_INCLUDE_DIRS}
- message(STATUS "checking if pygobject works with python3")
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_INCLUDES)
- foreach(INCLUDE_PATH ${GLIB_INCLUDE_DIRS} ${PYTHON3_INCLUDE_DIRS} ${PYGOBJECT_INCLUDE_DIRS})
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_INCLUDES "${GPLUGIN_PYTHON_TEST_PYGOBJECT_INCLUDES}\;${INCLUDE_PATH}")
- endforeach(INCLUDE_PATH)
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARIES)
- foreach(LIBRARY ${GLIB_LDFLAGS} ${PYTHON3_LDFLAGS} ${PYGOBJECT_LDFLAGS})
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARIES "${GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARIES}\;${LIBRARY}")
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARY_DIRS)
- foreach(LIBRARY_DIR ${GLIB_LIBRARY_DIRS} ${PYTHON3_LIBRARY_DIRS} ${PYGOBJECT_LIBRARY_DIRS})
- set(GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARY_DIRS "${GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARY_DIRS}\;${LIBRARY_DIR}")
- endforeach(LIBRARY_DIR)
- # compile our python-gi test program
- try_compile(PYTHON_GI_COMPILE
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/gplugin-python-test-pygobject.c
- -DINCLUDE_DIRECTORIES:STRING=${GPLUGIN_PYTHON_TEST_PYGOBJECT_INCLUDES}
- -DLINK_LIBRARIES:STRING=${GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARIES}
- -DLINK_DIRECTORIES:STRING=${GPLUGIN_PYTHON_TEST_PYGOBJECT_LIBRARY_DIRS}
- COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/gplugin-python-test-pygobject
- if(NOT ${PYTHON_GI_COMPILE})
- message(STATUS ${OUTPUT})
- message(FATAL_ERROR "Failed to compile the pygobject test")
- endif(NOT ${PYTHON_GI_COMPILE})
- # run the test program now
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gplugin-python-test-pygobject
- RESULT_VARIABLE PYTHON_GI_FOUND
- if(${PYTHON_GI_FOUND} EQUAL 0)
- message(STATUS " pygobject works with python3")
- else(${PYTHON_GI_FOUND} EQUAL 0)
- message(FATAL_ERROR " pygobject does not work with python3")
- endif(${PYTHON_GI_FOUND} EQUAL 0)
- # Now add our libraries
- add_library(gplugin-python MODULE
- ${GPLUGIN_PYTHON_SOURCES}
- ${GPLUGIN_PYTHON_HEADERS}
- add_library(gplugin-python-static STATIC
- ${GPLUGIN_PYTHON_SOURCES}
- ${GPLUGIN_PYTHON_HEADERS}
- set_target_properties(gplugin-python PROPERTIES PREFIX "")
- target_link_libraries(gplugin-python
- target_link_libraries(gplugin-python-static
- install(TARGETS gplugin-python DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
- add_subdirectory(tests)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,59 @@
+ if not get_option('gobject-introspection') + error('Python plugin requires GObject Introspection.') + GPLUGIN_PYTHON_SOURCES = [ + 'gplugin-python-core.c', + 'gplugin-python-loader.c', + 'gplugin-python-plugin.c', + 'gplugin-python-utils.c', + GPLUGIN_PYTHON_HEADERS = [ + 'gplugin-python-loader.h', + 'gplugin-python-plugin.h', + 'gplugin-python-utils.h', + PYTHON3 = dependency('python3') + PYGOBJECT = dependency('pygobject-3.0', version : '>=3.0.0') + # Compile and run our python-gi test program + python_gi_test = compiler.run(files('gplugin-python-test-pygobject.c'), + dependencies : [GLIB, PYTHON3, PYGOBJECT], + if not python_gi_test.compiled() or python_gi_test.returncode() != 0 + error('pygobject does not work with python3') + # Now add our libraries + gplugin_python_inc = include_directories('.') + gplugin_python = shared_library('gplugin-python', + GPLUGIN_PYTHON_SOURCES, + GPLUGIN_PYTHON_HEADERS, + dependencies : [PYTHON3, PYGOBJECT, gplugin_dep], + install_dir : join_paths(get_option('libdir'), 'gplugin') + gplugin_python_dep = declare_dependency( + include_directories : gplugin_python_inc, + link_with : gplugin_python, + gplugin_python_static = static_library('gplugin-python-static', + GPLUGIN_PYTHON_SOURCES, + GPLUGIN_PYTHON_HEADERS, + dependencies : [PYTHON3, PYGOBJECT, gplugin_dep], + gplugin_python_static_dep = declare_dependency( + include_directories : gplugin_python_inc, + link_with : gplugin_python_static, +if get_option('testing') --- a/python/tests/CMakeLists.txt Mon Jun 29 22:08:31 2015 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-macro(add_python_gtest target)
- add_executable(${target} ${target}.c)
- target_link_libraries(${target}
- ${GLIB_LIBRARIES} ${PYTHON3_LIBRARIES} ${PYGOBJECT_LIBRARIES} gplugin)
- add_dependencies(${target} gplugin-python)
- get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
- if(NOT ${_output_name})
- get_target_property(_output_name ${target} LOCATION)
- endif(NOT ${_output_name})
- list(APPEND PYTHON_TESTS ${_output_name})
- set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS
- PYTHON_LOADER_DIR="${CMAKE_BINARY_DIR}/python"
- PYTHON_PLUGIN_DIR="${CMAKE_CURRENT_SOURCE_DIR}/plugins"
- set_property(TARGET ${target} APPEND PROPERTY INCLUDE_DIRECTORIES
- "${CMAKE_SOURCE_DIR}/python"
- ${PYTHON3_INCLUDE_DIRS}
- ${PYGOBJECT_INCLUDE_DIRS}
-endmacro(add_python_gtest)
-list(APPEND GPLUGIN_PYTHON_LOADER gplugin-python)
-add_python_gtest(test-python-loader)
-target_link_libraries(test-python-loader gplugin-loader-tests)
-# we can't see the symbols in gplugin-python externally, so use the static
-add_python_gtest(test-python-utils)
-add_dependencies(test-python-utils gplugin-python-static)
-target_link_libraries(test-python-utils gplugin-python-static)
-set(GTESTER_PYTHON_TESTS "${PYTHON_TESTS}")
-set(GTESTER_PYTHON_LOG "test-gplugin-python.xml")
-set(GTESTER_PYTHON_JUNIT "test-gplugin-python-junit.xml")
- COMMAND ${GTESTER} -k --verbose -o ${GTESTER_PYTHON_LOG} ${PYTHON_TESTS}
- OUTPUT ${GTESTER_PYTHON_LOG}
- DEPENDS gplugin ${GPLUGIN_GIR_TARGETS} ${GPLUGIN_PYTHON_LOADER}
- ${PYTHON_TESTS} ${CMAKE_CURRENT_SOURCE_DIR}/plugins
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${XSLTPROC} -o ${GTESTER_PYTHON_JUNIT} --nonet
- ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
- OUTPUT ${GTESTER_PYTHON_JUNIT}
- DEPENDS ${GTESTER_PYTHON_LOG}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-add_custom_target(python-tests ALL
- DEPENDS ${GTESTER_PYTHON_LOG} ${GTESTER_PYTHON_JUNIT} ${PYTHON_TESTS}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/tests/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,26 @@
+e = executable('test-python-loader', 'test-python-loader.c', + include_directories : include_directories('.'), + '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()), + '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT, gplugin_dep]) +test('Python loader', e) +# we can't see the symbols in gplugin-python externally, so use the static +e = executable('test-python-utils', 'test-python-utils.c', + include_directories : include_directories('.'), + '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()), + '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()), + link_with : [gplugin_loader_tests], + dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT, + gplugin_python_static_dep]) --- a/ruby/tests/plugins/basic.rb Mon Jun 29 22:08:31 2015 -0500
+++ b/ruby/tests/plugins/basic.rb Sat Jun 03 02:47:28 2017 -0500
@@ -3,11 +3,11 @@
- return GPlugin::PluginInfo.new(
- 'ruby/ruby-basic-plugin',
- {:name => 'basic plugin'}
+ return GPlugin::PluginInfo.new({ + :id => 'ruby/ruby-basic-plugin', + :abi_version => 0x01020304, + :name => 'basic plugin', @@ -24,7 +24,3 @@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/gplugin-tcc-core.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,67 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +#include "gplugin-tcc-loader.h" +#include "gplugin-tcc-plugin.h" +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + const gchar * const authors[] = { + "Eion Robb <eion@robbmob.com>", + return gplugin_plugin_info_new( + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, + "name", "C source plugin loader", + "version", GPLUGIN_VERSION, + "summary", "A plugin that can load C source plugins", + "description", "This plugin allows the loading of plugins written in C.", + "website", GPLUGIN_WEBSITE, +G_MODULE_EXPORT gboolean +gplugin_load(GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) + gplugin_tcc_loader_register(plugin); + gplugin_tcc_plugin_register(plugin); + gplugin_manager_register_loader(gplugin_tcc_loader_get_type()); +G_MODULE_EXPORT gboolean +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/gplugin-tcc-loader.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,203 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "gplugin-tcc-loader.h" +#include "gplugin-tcc-plugin.h" +/****************************************************************************** + *****************************************************************************/ +static GObjectClass *parent_class = NULL; +static GType type_real = 0; +/****************************************************************************** + * GPluginLoaderInterface API + *****************************************************************************/ +gplugin_tcc_loader_class_supported_extensions(GPLUGIN_UNUSED const GPluginLoaderClass *klass) { + exts = g_slist_append(exts, "c"); +gplugin_tcc_loader_query(GPluginLoader *loader, const gchar *filename, + GPluginPlugin *plugin = NULL; + GPluginPluginInfo *info = NULL; + gpointer memneeded = NULL; + GPluginTccPluginQueryFunc gplugin_query = NULL; + tcc_set_output_type(s, TCC_OUTPUT_MEMORY); + if(tcc_add_file(s, filename) == -1) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "couldn't load file %s", filename); + /* copy code into memory */ + if((memsize = tcc_relocate(s, NULL)) < 0) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "couldn't work out how much memory is needed"); + memneeded = g_malloc0(memsize); + if(tcc_relocate(s, memneeded) < 0) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "could not relocate plugin into memory"); + gplugin_query = (GPluginTccPluginQueryFunc) tcc_get_symbol(s, "gplugin_query"); + if (gplugin_query == NULL) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_query function found"); + info = gplugin_query(error); + plugin = g_object_new(GPLUGIN_TYPE_TCC_PLUGIN, +gplugin_tcc_loader_load(GPLUGIN_UNUSED GPluginLoader *loader, + GPluginTccPluginLoadFunc gplugin_load = NULL; + TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin)); + gplugin_load = (GPluginTccPluginLoadFunc) tcc_get_symbol(s, "gplugin_load"); + if (gplugin_load == NULL) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_load function found"); + return gplugin_load(GPLUGIN_NATIVE_PLUGIN(plugin), error); +gplugin_tcc_loader_unload(GPLUGIN_UNUSED GPluginLoader *loader, + GPluginTccPluginLoadFunc gplugin_unload = NULL; + TCCState *s = gplugin_tcc_plugin_get_state(GPLUGIN_TCC_PLUGIN(plugin)); + gplugin_unload = (GPluginTccPluginUnloadFunc) tcc_get_symbol(s, "gplugin_unload"); + if (gplugin_unload == NULL) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_unload function found"); + return gplugin_unload(GPLUGIN_NATIVE_PLUGIN(plugin), error); +/****************************************************************************** + *****************************************************************************/ +gplugin_tcc_loader_class_init(GPluginTccLoaderClass *klass) { + GPluginLoaderClass *loader_class = GPLUGIN_LOADER_CLASS(klass); + parent_class = g_type_class_peek_parent(klass); + loader_class->supported_extensions = + gplugin_tcc_loader_class_supported_extensions; + loader_class->query = gplugin_tcc_loader_query; + loader_class->load = gplugin_tcc_loader_load; + loader_class->unload = gplugin_tcc_loader_unload; +/****************************************************************************** + *****************************************************************************/ +gplugin_tcc_loader_register(GPluginNativePlugin *plugin) { + if(g_once_init_enter(&type_real)) { + static const GTypeInfo info = { + .class_size = sizeof(GPluginTccLoaderClass), + .class_init = (GClassInitFunc)gplugin_tcc_loader_class_init, + .instance_size = sizeof(GPluginTccLoader), + type = gplugin_native_plugin_register_type(plugin, + g_once_init_leave(&type_real, type); +gplugin_tcc_loader_get_type(void) { + if(G_UNLIKELY(type_real == 0)) { + g_warning("gplugin_tcc_loader_get_type was called before " + "the type was registered!\n"); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/gplugin-tcc-loader.h Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,59 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#ifndef GPLUGIN_TCC_LOADER_H +#define GPLUGIN_TCC_LOADER_H +#define GPLUGIN_TYPE_TCC_LOADER (gplugin_tcc_loader_get_type()) +#define GPLUGIN_TCC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_TCC_LOADER, GPluginTccLoader)) +#define GPLUGIN_TCC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_TCC_LOADER, GPluginTccLoaderClass)) +#define GPLUGIN_IS_TCC_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_TCC_LOADER)) +#define GPLUGIN_IS_TCC_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_TCC_LOADER)) +#define GPLUGIN_TCC_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_TCC_LOADER, GPluginTccLoaderClass)) +typedef struct _GPluginTccLoader GPluginTccLoader; +typedef struct _GPluginTccLoaderClass GPluginTccLoaderClass; +#include <gplugin-native.h> +struct _GPluginTccLoader { + void (*_gplugin_reserved_1)(void); + void (*_gplugin_reserved_2)(void); + void (*_gplugin_reserved_3)(void); + void (*_gplugin_reserved_4)(void); +struct _GPluginTccLoaderClass { + GPluginLoaderClass parent; + void (*_gplugin_reserved_1)(void); + void (*_gplugin_reserved_2)(void); + void (*_gplugin_reserved_3)(void); + void (*_gplugin_reserved_4)(void); +void gplugin_tcc_loader_register(GPluginNativePlugin *plugin); +GType gplugin_tcc_loader_get_type(void); +#endif /* GPLUGIN_TCC_LOADER_H */ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/gplugin-tcc-plugin.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,183 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "gplugin-tcc-plugin.h" +#define GPLUGIN_TCC_PLUGIN_GET_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_TCC_PLUGIN, GPluginTccPluginPrivate)) +/****************************************************************************** + *****************************************************************************/ +} GPluginTccPluginPrivate; +/****************************************************************************** + *****************************************************************************/ +/****************************************************************************** + *****************************************************************************/ +static GObjectClass *parent_class = NULL; +static GType type_real = 0; +/****************************************************************************** + *****************************************************************************/ +gplugin_tcc_plugin_set_state(GPluginTccPlugin *plugin, TCCState *s) { + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin); +gplugin_tcc_plugin_set_memory(GPluginTccPlugin *plugin, gpointer mem) { + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin); +/****************************************************************************** + *****************************************************************************/ +gplugin_tcc_plugin_get_property(GObject *obj, guint param_id, GValue *value, + GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj); + g_value_set_pointer(value, + gplugin_tcc_plugin_get_state(plugin)); + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); +gplugin_tcc_plugin_set_property(GObject *obj, guint param_id, + const GValue *value, GParamSpec *pspec) + GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj); + gplugin_tcc_plugin_set_state(plugin, + g_value_get_pointer(value)); + gplugin_tcc_plugin_set_memory(plugin, + g_value_get_pointer(value)); + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); +gplugin_tcc_plugin_finalize(GObject *obj) { + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(obj); + G_OBJECT_CLASS(parent_class)->finalize(obj); +gplugin_tcc_plugin_class_init(GPluginTccPluginClass *klass) { + GObjectClass *obj_class = G_OBJECT_CLASS(klass); + parent_class = g_type_class_peek_parent(klass); + g_type_class_add_private(klass, sizeof(GPluginTccPluginPrivate)); + obj_class->get_property = gplugin_tcc_plugin_get_property; + obj_class->set_property = gplugin_tcc_plugin_set_property; + obj_class->finalize = gplugin_tcc_plugin_finalize; + g_object_class_install_property(obj_class, PROP_STATE, + g_param_spec_pointer("state", "state", + "The TCC compilation context for the plugin", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property(obj_class, PROP_MEM, + g_param_spec_pointer("memory", "memory", + "The memory allocated for the symbol table for the plugin", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); +/****************************************************************************** + *****************************************************************************/ +gplugin_tcc_plugin_register(GPluginNativePlugin *plugin) { + if(g_once_init_enter(&type_real)) { + static const GTypeInfo info = { + .class_size = sizeof(GPluginTccPluginClass), + .class_init = (GClassInitFunc)gplugin_tcc_plugin_class_init, + .instance_size = sizeof(GPluginTccPlugin), + type = gplugin_native_plugin_register_type(plugin, + g_once_init_leave(&type_real, type); +gplugin_tcc_plugin_get_type(void) { + if(G_UNLIKELY(type_real == 0)) { + g_warning("gplugin_tcc_plugin_get_type was called before " + "the type was registered!\n"); +gplugin_tcc_plugin_get_state(const GPluginTccPlugin *plugin) { + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/gplugin-tcc-plugin.h Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,62 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#ifndef GPLUGIN_TCC_PLUGIN_H +#define GPLUGIN_TCC_PLUGIN_H +#define GPLUGIN_TYPE_TCC_PLUGIN (gplugin_tcc_plugin_get_type()) +#define GPLUGIN_TCC_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLUGIN_TYPE_TCC_PLUGIN, GPluginTccPlugin)) +#define GPLUGIN_TCC_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((obj), GPLUGIN_TYPE_TCC_PLUGIN, GPluginTccPluginClass)) +#define GPLUGIN_IS_TCC_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLUGIN_TYPE_TCC_PLUGIN)) +#define GPLUGIN_IS_TCC_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((obj), GPLUGIN_TYPE_TCC_PLUGIN)) +#define GPLUGIN_TCC_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GPLUGIN_TYPE_TCC_PLUGIN, GPluginTccPluginClass)) +typedef struct _GPluginTccPlugin GPluginTccPlugin; +typedef struct _GPluginTccPluginClass GPluginTccPluginClass; +#include <gplugin-native.h> +struct _GPluginTccPlugin { +struct _GPluginTccPluginClass { + GPluginPluginClass parent; + void (*_gplugin_reserved_1)(void); + void (*_gplugin_reserved_2)(void); + void (*_gplugin_reserved_3)(void); + void (*_gplugin_reserved_4)(void); +void gplugin_tcc_plugin_register(GPluginNativePlugin *plugin); +GType gplugin_tcc_plugin_get_type(void); +TCCState *gplugin_tcc_plugin_get_state(const GPluginTccPlugin *plugin); +typedef GPluginPluginInfo *(*GPluginTccPluginQueryFunc)(GError **error); +typedef gboolean (*GPluginTccPluginLoadFunc)(GPluginNativePlugin *plugin, GError **error); +typedef gboolean (*GPluginTccPluginUnloadFunc)(GPluginNativePlugin *plugin, GError **error); +#endif /* GPLUGIN_TCC_PLUGIN_H */ --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,30 @@
+ GPLUGIN_TCC_SOURCES = [ + 'gplugin-tcc-loader.c', + 'gplugin-tcc-plugin.c', + GPLUGIN_TCC_HEADERS = [ + 'gplugin-tcc-loader.h', + 'gplugin-tcc-plugin.h', + if not compiler.has_header('libtcc.h') + error('LibTcc header not found') + TCC = compiler.find_library('tcc') + gplugin_tcc = shared_library('gplugin-tcc', + dependencies : [TCC, gplugin_dep], + install_dir : join_paths(get_option('libdir'), 'gplugin') +if get_option('testing') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/meson.build Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,13 @@
+e = executable('test-tcc-loader', 'test-tcc-loader.c', + '-DTCC_LOADER_DIR="@0@/tcc"'.format(meson.build_root()), + '-DTCC_PLUGIN_DIR="@0@/plugins"'.format( + meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, TCC, gplugin_dep]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/plugins/basic-plugin.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,55 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + const gchar * const authors[] = { + return gplugin_plugin_info_new( + "gplugin/native-basic-plugin", + "name", "basic plugin", + "license-id", "license", + "description", "description", +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) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/plugins/dependent.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,49 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + const gchar * const dependencies[] = { + return gplugin_plugin_info_new( + "gplugin/native-dependent-plugin", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, + "dependencies", dependencies, +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) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/plugins/load-exception.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,42 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + return gplugin_plugin_info_new( + "gplugin/native-load-exception", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, +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) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/plugins/load-failed.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,43 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + return gplugin_plugin_info_new( + "gplugin/native-load-failed", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, +G_MODULE_EXPORT gboolean +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin, GError **error) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "expected error"); +G_MODULE_EXPORT gboolean +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/plugins/unload-failed.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,43 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin-native.h> +G_MODULE_EXPORT GPluginPluginInfo * +gplugin_query(GPLUGIN_UNUSED GError **error) { + return gplugin_plugin_info_new( + "gplugin/native-unload-failed", + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION, +G_MODULE_EXPORT gboolean +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin, + GPLUGIN_UNUSED GError **error) +G_MODULE_EXPORT gboolean +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, GError **error) { + *error = g_error_new(GPLUGIN_DOMAIN, 0, "expected error"); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tcc/tests/test-tcc-loader.c Sat Jun 03 02:47:28 2017 -0500
@@ -0,0 +1,31 @@
+ * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com> + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. +#include <gplugin/gplugin-loader-tests.h> +main(gint argc, gchar **argv) { + g_test_init(&argc, &argv, NULL); + gplugin_loader_tests_main(TCC_LOADER_DIR, TCC_PLUGIN_DIR, "c"); --- a/tools/glib-mkenums Mon Jun 29 22:08:31 2015 -0500
+++ /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";
--- a/xsl/gtester-junit.xsl Mon Jun 29 22:08:31 2015 -0500
+++ b/xsl/gtester-junit.xsl Sat Jun 03 02:47:28 2017 -0500
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
- Copyright (C) 2011-2014 Gary Kramlich <grim@reaperworld.com>
+ Copyright (C) 2011-2017 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
@@ -36,7 +36,7 @@
<!-- match the gtester root tag -->
<xsl:template match="/gtester">
- <xsl:element name="testsuit">
+ <xsl:element name="testsuite"> <!-- add the number of tests as the test attribute -->
<xsl:attribute name="tests">
<xsl:value-of select="count(//testcase)"/>