gplugin/gplugin

Updating to current develop
feature/ruby-loader
2017-06-03, Gary Kramlich
fa275888f359
Updating to current develop
  • +1 -1
    .hgignore
  • +0 -234
    CMakeLists.txt
  • +34 -1
    ChangeLog
  • +28 -0
    HACKING.OSX
  • +7 -13
    INSTALL
  • +0 -138
    cmake/Compatibility/CMakeParseArguments.cmake
  • +0 -233
    cmake/Modules/GObjectIntrospection.cmake
  • +0 -190
    cmake/Modules/Gettextize.cmake
  • +0 -14
    cmake/Modules/PkgConfigVariable.cmake
  • +0 -69
    cmake/Modules/help2man.cmake
  • +0 -8
    cmake/Toolchains/cygwin-mingw.cmake
  • +0 -143
    gplugin-gtk/CMakeLists.txt
  • +0 -13
    gplugin-gtk/gplugin-gtk.pc.in
  • +125 -0
    gplugin-gtk/meson.build
  • +1 -0
    gplugin-version.sh.in
  • +0 -288
    gplugin/CMakeLists.txt
  • +1 -1
    gplugin/gplugin-enums.c.tmpl
  • +1 -1
    gplugin/gplugin-enums.h.tmpl
  • +35 -21
    gplugin/gplugin-manager.c
  • +2 -2
    gplugin/gplugin-native-loader.c
  • +0 -7
    gplugin/gplugin-uninstalled.pc.in
  • +0 -13
    gplugin/gplugin.pc.in
  • +281 -0
    gplugin/meson.build
  • +0 -145
    gplugin/tests/CMakeLists.txt
  • +0 -2
    gplugin/tests/bad-plugins/CMakeLists.txt
  • +3 -0
    gplugin/tests/bad-plugins/meson.build
  • +0 -2
    gplugin/tests/bind-local/CMakeLists.txt
  • +3 -0
    gplugin/tests/bind-local/meson.build
  • +0 -3
    gplugin/tests/dynamic-type/CMakeLists.txt
  • +8 -0
    gplugin/tests/dynamic-type/meson.build
  • +0 -3
    gplugin/tests/id-collision/CMakeLists.txt
  • +7 -0
    gplugin/tests/id-collision/meson.build
  • +0 -2
    gplugin/tests/load-on-query-fail/CMakeLists.txt
  • +3 -0
    gplugin/tests/load-on-query-fail/meson.build
  • +0 -2
    gplugin/tests/load-on-query-pass/CMakeLists.txt
  • +3 -0
    gplugin/tests/load-on-query-pass/meson.build
  • +140 -0
    gplugin/tests/meson.build
  • +0 -6
    gplugin/tests/plugins/CMakeLists.txt
  • +23 -0
    gplugin/tests/plugins/meson.build
  • +46 -3
    gplugin/tests/test-signals.c
  • +60 -0
    gplugin/tests/test-unresolved-symbol.c
  • +4 -0
    gplugin/tests/unresolved-symbol/meson.build
  • +43 -0
    gplugin/tests/unresolved-symbol/unresolved-symbol.c
  • +0 -12
    gplugin/tests/versioned-dependencies/CMakeLists.txt
  • +43 -0
    gplugin/tests/versioned-dependencies/meson.build
  • +0 -90
    lua/CMakeLists.txt
  • +29 -1
    lua/gplugin-lua-test-lgi.c
  • +54 -0
    lua/meson.build
  • +0 -57
    lua/tests/CMakeLists.txt
  • +43 -0
    lua/tests/lua-plugins/basic.lua
  • +35 -0
    lua/tests/lua-plugins/dependent.lua
  • +34 -0
    lua/tests/lua-plugins/load-exception.lua
  • +34 -0
    lua/tests/lua-plugins/load-failed.lua
  • +34 -0
    lua/tests/lua-plugins/unload-failed.lua
  • +29 -0
    lua/tests/meson.build
  • +39 -0
    lua/tests/moonscript-plugins/basic.moon
  • +30 -0
    lua/tests/moonscript-plugins/dependent.moon
  • +30 -0
    lua/tests/moonscript-plugins/load-exception.moon
  • +30 -0
    lua/tests/moonscript-plugins/load-failed.moon
  • +30 -0
    lua/tests/moonscript-plugins/unload-failed.moon
  • +0 -43
    lua/tests/plugins/basic.lua
  • +0 -39
    lua/tests/plugins/basic.moon
  • +0 -35
    lua/tests/plugins/dependent.lua
  • +0 -30
    lua/tests/plugins/dependent.moon
  • +0 -34
    lua/tests/plugins/load-exception.lua
  • +0 -30
    lua/tests/plugins/load-exception.moon
  • +0 -34
    lua/tests/plugins/load-failed.lua
  • +0 -30
    lua/tests/plugins/load-failed.moon
  • +0 -34
    lua/tests/plugins/unload-failed.lua
  • +0 -30
    lua/tests/plugins/unload-failed.moon
  • +1 -1
    lua/tests/test-lua-moon-loader.c
  • +151 -0
    meson.build
  • +62 -0
    meson_options.txt
  • +36 -0
    packaging/debian/changelog
  • +3 -26
    packaging/debian/control
  • +0 -1
    packaging/debian/copyright
  • +2 -2
    packaging/debian/gir1.2-gplugin-0.0.install
  • +3 -3
    packaging/debian/libgplugin-dev.install
  • +0 -1
    packaging/debian/libgplugin-gtk-bin.install
  • +3 -3
    packaging/debian/libgplugin-gtk-dev.install
  • +2 -2
    packaging/debian/libgplugin-gtk0.install
  • +0 -1
    packaging/debian/libgplugin-gtk0.postinst
  • +0 -1
    packaging/debian/libgplugin-gtk0.postrm
  • +0 -13
    packaging/debian/libgplugin-gtk0.symbols
  • +2 -2
    packaging/debian/libgplugin-lua.install
  • +2 -2
    packaging/debian/libgplugin-python.install
  • +2 -2
    packaging/debian/libgplugin0.install
  • +0 -1
    packaging/debian/libgplugin0.postinst
  • +0 -1
    packaging/debian/libgplugin0.postrm
  • +0 -79
    packaging/debian/libgplugin0.symbols
  • +0 -9
    packaging/debian/rules
  • +245 -0
    packaging/gplugin.spec.in
  • +4 -0
    packaging/meson.build
  • +0 -54
    perl/CMakeLists.txt
  • +2 -2
    perl/gplugin-perl-loader.c
  • +37 -0
    perl/meson.build
  • +0 -9
    plugins/CMakeLists.txt
  • +6 -0
    plugins/meson.build
  • +0 -4
    po/CMakeLists.txt
  • +3 -0
    po/meson.build
  • +0 -110
    python/CMakeLists.txt
  • +59 -0
    python/meson.build
  • +0 -65
    python/tests/CMakeLists.txt
  • +26 -0
    python/tests/meson.build
  • +5 -9
    ruby/tests/plugins/basic.rb
  • +67 -0
    tcc/gplugin-tcc-core.c
  • +203 -0
    tcc/gplugin-tcc-loader.c
  • +59 -0
    tcc/gplugin-tcc-loader.h
  • +183 -0
    tcc/gplugin-tcc-plugin.c
  • +62 -0
    tcc/gplugin-tcc-plugin.h
  • +30 -0
    tcc/meson.build
  • +13 -0
    tcc/tests/meson.build
  • +55 -0
    tcc/tests/plugins/basic-plugin.c
  • +49 -0
    tcc/tests/plugins/dependent.c
  • +42 -0
    tcc/tests/plugins/load-exception.c
  • +43 -0
    tcc/tests/plugins/load-failed.c
  • +43 -0
    tcc/tests/plugins/unload-failed.c
  • +31 -0
    tcc/tests/test-tcc-loader.c
  • +0 -565
    tools/glib-mkenums
  • +2 -2
    xsl/gtester-junit.xsl
  • --- 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$
    ^obj-x86_64-linux-gnu\/
    ^debian\/?$
    -
    +.+\.sublime-workspace
    --- 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 @@
    -###############################################################################
    -# CMake Initialization
    -###############################################################################
    -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")
    -
    -###############################################################################
    -# Project Info
    -###############################################################################
    -project(gplugin C)
    -
    -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}")
    -
    -###############################################################################
    -# Options
    -###############################################################################
    -option(
    - BUILD_GIR
    - "Whether or not to build a GObject Introspection type library"
    - "On"
    -)
    -
    -option(
    - NLS
    - "Install translation files"
    - "On"
    -)
    -
    -option(
    - TESTING_ENABLED
    - "Whether or not to run unit tests while compiling"
    - "On"
    -)
    -
    -###############################################################################
    -# Dependencies
    -###############################################################################
    -if(APPLE)
    - # homebrew stuff
    - 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
    - find_program(BREW
    - NAMES brew
    - DOC "brew executable"
    - )
    - if(BREW)
    - execute_process(
    - COMMAND ${BREW} --prefix libffi
    - OUTPUT_VARIABLE FFI_PREFIX
    - OUTPUT_STRIP_TRAILING_WHITESPACE
    - )
    - if(FFI_PREFIX)
    - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${FFI_PREFIX}/lib/pkgconfig")
    - endif(FFI_PREFIX)
    -
    - execute_process(
    - COMMAND ${BREW} --prefix cairo
    - OUTPUT_VARIABLE CAIRO_PREFIX
    - OUTPUT_STRIP_TRAILING_WHITESPACE
    - )
    -
    - if(CAIRO_PREFIX)
    - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CAIRO_PREFIX}/lib/pkgconfig")
    - endif(CAIRO_PREFIX)
    - endif(BREW)
    -
    - # fink and macports
    - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/sw/lib/pkgconfig:/opt/local/lib/pkgconfig")
    -endif(APPLE)
    -
    -include(GNUInstallDirs)
    -include(FindPkgConfig)
    -include(PkgConfigVariable)
    -include(help2man)
    -
    -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)
    -
    -if(TESTING_ENABLED)
    - find_program(GTESTER
    - NAMES gtester
    - DOC "gtester executable"
    - )
    - mark_as_advanced(GTESTER)
    -
    - find_program(XSLTPROC
    - NAMES xsltproc
    - DOC "xsltproc executable"
    - )
    - mark_as_advanced(XSLTPROC)
    -endif(TESTING_ENABLED)
    -
    -###############################################################################
    -# NLS
    -###############################################################################
    -set(GETTEXT_PACKAGE gplugin)
    -
    -add_definitions(-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}")
    -
    -if(NLS)
    - include(Gettextize)
    -endif(NLS)
    -
    -###############################################################################
    -# Build Info
    -###############################################################################
    -add_definitions(
    - -std=c99
    - -g -g3
    - -DPREFIX="${CMAKE_INSTALL_PREFIX}"
    - -DLIBDIR="${CMAKE_INSTALL_LIBDIR}"
    - -DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"
    - -Wall
    - -Werror=format-security
    - -Wformat
    - -Wextra
    -)
    -
    -# check if we're using gcc
    -if(CMAKE_COMPILER_IS_GNUCC)
    - add_definitions(
    - -DGPLUGIN_UNUSED=__attribute__\(\(unused\)\)
    - )
    -else(CMAKE_COMPILER_IS_GNUCC)
    - add_definitions(
    - -DGPLUGIN_UNUSED=""
    - )
    -endif(CMAKE_COMPILER_IS_GNUCC)
    -
    -include_directories(
    - ${CMAKE_SOURCE_DIR}
    - ${CMAKE_BINARY_DIR} # for built headers/sources
    - ${CMAKE_BINARY_DIR}/gplugin # for gplugin.h
    - ${GLIB_INCLUDE_DIRS}
    - ${GMODULE_INCLUDE_DIRS}
    -)
    -
    -link_directories(
    - ${GLIB_LIBRARY_DIRS}
    - ${GMODULE_LIBRARY_DIRS}
    -)
    -
    -###############################################################################
    -# Subdirectories
    -###############################################################################
    -add_subdirectory(gplugin)
    -add_subdirectory(gplugin-gtk)
    -add_subdirectory(plugins)
    -add_subdirectory(po)
    -
    -add_subdirectory(lua)
    -add_subdirectory(perl)
    -add_subdirectory(python)
    -
    -###############################################################################
    -# Install stuff
    -###############################################################################
    -# documentation
    -install(FILES ChangeLog INSTALL README HACKING DESTINATION ${CMAKE_INSTALL_DOCDIR})
    -
    -###############################################################################
    -# make dist
    -###############################################################################
    -set(ARCHIVES
    - gplugin-${GPLUGIN_VERSION}.tar.bz2
    - gplugin-${GPLUGIN_VERSION}.tar.gz
    - gplugin-${GPLUGIN_VERSION}.zip
    -)
    -
    -set(SIGNATURES)
    -
    -foreach(ARCHIVE ${ARCHIVES})
    - add_custom_command(
    - COMMAND hg archive ${ARCHIVE}
    - OUTPUT ${ARCHIVE}
    - DEPENDS .
    - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    - )
    -
    - add_custom_command(
    - COMMAND gpg --yes -abs ${ARCHIVE}
    - OUTPUT ${ARCHIVE}.asc
    - DEPENDS . ${ARCHIVE}
    - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    - )
    -
    - list(APPEND SIGNATURES ${ARCHIVE}.asc)
    -endforeach(ARCHIVE)
    -
    -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 @@
    -0.0.22:
    +0.28.0:
    + * Fixed building on OSX with homebrew
    + * Added an RPM spec file
    +
    +0.27.0: 2016/04/18
    + * Bumped the glib requirement to 2.34.0
    + * Fix some error reporting with the native loader
    +
    +0.26.0: 2016/03/03
    + * Added a load-failed signal which is emitted when a plugin fails to load
    + * Removed pre glib 2.32.0 code
    +
    +0.25.0: 2016/02/06
    + * 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.
    +
    +0.24.1: 2016/01/28
    + * Fixed the version numbering finally
    + * Updated the version in CMakeLists.txt
    +
    +0.0.24: 2016/01/28
    + * Really fixed the debian package this time
    + * Made help2man optional
    + * Don't try to build the pot files if NLS is disabled
    +
    +0.0.23: 2016/01/06
    + * 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
    +
    +0.0.22: 2015/06/30
    + * Made the moonscripts tests not interfer with the lua tests unless they're
    + explicitly turned on
    + * Set the -ggdb cflag if we're being compiled by gcc
    0.0.21: 2015/06/29
    * 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
    +request.
    +
    +Lua
    +===
    +
    +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
    +along those lines.
    +
    +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"
    +
    +PYTHON
    +======
    +
    +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 @@
    Dependencies
    ============
    GPlugin depends on the following at a bare minimum:
    - glib-2.0 >= 2.20.0
    + glib-2.0 >= 2.34.0
    gobject-introspection, libgirepository1.0-dev
    - cmake >= 2.8
    + meson >= 0.36.0
    gettext
    help2man
    a C compiler
    @@ -19,23 +19,17 @@
    Building
    ========
    -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:
    - mkdir build
    + meson build
    cd build
    - cmake ..
    - make
    - sudo make install
    + ninja install
    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
    -# install() command.
    -#
    -# 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:
    -#
    -# function(MY_INSTALL)
    -# 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
    -# variables:
    -# 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
    -# the new option.
    -# 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)
    - return()
    -endif()
    -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})
    - endforeach()
    -
    - foreach(option ${_optionNames})
    - set(${prefix}_${option} FALSE)
    - endforeach()
    -
    - set(${prefix}_UNPARSED_ARGUMENTS)
    -
    - set(insideValues FALSE)
    - set(currentArgName)
    -
    - # 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)
    - if("${insideValues}" STREQUAL "SINGLE")
    - set(${prefix}_${currentArgName} ${currentArg})
    - set(insideValues FALSE)
    - elseif("${insideValues}" STREQUAL "MULTI")
    - list(APPEND ${prefix}_${currentArgName} ${currentArg})
    - endif()
    - else()
    - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg})
    - endif()
    - else()
    - 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")
    - endif()
    - endif()
    -
    - endforeach()
    -
    - # propagate the result variables to the caller:
    - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames})
    - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE)
    - endforeach()
    - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE)
    -
    -endfunction()
    --- 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)
    -include(FindPkgConfig)
    -
    -set(_PKG_CONFIG_MODULE "gobject-introspection-1.0")
    -
    -pkg_check_modules(GOBJECT_INTROSPECTION REQUIRED ${_PKG_CONFIG_MODULE})
    -
    -###############################################################################
    -# Helpers
    -###############################################################################
    -# 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)
    - execute_process(
    - 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
    -# _newlist.
    -macro(_gir_list_prefix _newlist _list _prefix)
    - set(${_newlist})
    - foreach(_item IN LISTS ${_list})
    - list(APPEND ${_newlist} ${_prefix}${_item})
    - endforeach(_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
    -if(_INSTALL_PREFIX)
    - _pkg_config_variable(girdir GIR_GIRDIR)
    - _pkg_config_variable(typelibdir GIR_TYPELIBDIR)
    -else(_INSTALL_PREFIX)
    - set(GIR_GIRDIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/gir-1.0")
    - set(GIR_TYPELIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}/girepository-1.0")
    -endif(_INSTALL_PREFIX)
    -
    -###############################################################################
    -# The main function
    -###############################################################################
    -function(gobject_introspection _FIRST_ARG)
    - set(options QUIET VERBOSE)
    - set(oneValueArgs
    - FILENAME
    - FORMAT
    - LIBRARY
    - NAMESPACE
    - NSVERSION
    - PROGRAM
    - PROGRAM_ARG
    - )
    - set(multiValueArgs
    - BUILT_SOURCES
    - CFLAGS
    - COMPILER_ARGS
    - HEADERS
    - IDENTIFIER_PREFIXES
    - PACKAGES
    - SCANNER_ARGS
    - SOURCES
    - SYMBOL_PREFIXES
    - )
    -
    - 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...
    - ###########################################################################
    - if(NOT GIR_FILENAME)
    - message(FATAL_ERROR "No gir filename given")
    - endif(NOT GIR_FILENAME)
    -
    - if(NOT GIR_NAMESPACE)
    - # the caller didn't give us a namespace, try to grab it from the filename
    - string(REGEX REPLACE "([^-]+)-.*" "\\1" GIR_NAMESPACE "${GIR_FILENAME}")
    - if(NOT GIR_NAMESPACE)
    - message(FATAL_ERROR "No namespace given and couldn't find one in FILENAME")
    - endif(NOT GIR_NAMESPACE)
    - endif(NOT GIR_NAMESPACE)
    -
    - if(NOT GIR_NSVERSION)
    - # 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}")
    - if(NOT GIR_NSVERSION)
    - message(FATAL_ERROR "No namespace version given and couldn't find one in FILENAME")
    - endif(NOT GIR_NSVERSION)
    - endif(NOT GIR_NSVERSION)
    -
    - if(NOT GIR_CFLAGS)
    - get_directory_property(GIR_CFLAGS INCLUDE_DIRECTORIES)
    - _gir_list_prefix(GIR_REAL_CFLAGS GIR_CFLAGS "-I")
    - endif(NOT GIR_CFLAGS)
    -
    - ###########################################################################
    - # Fix up some of our arguments
    - ###########################################################################
    - if(GIR_VERBOSE)
    - set(GIR_VERBOSE "--verbose")
    - else(GIR_VERBOSE)
    - set(GIR_VERBOSE "")
    - endif(GIR_VERBOSE)
    -
    - if(GIR_QUIET)
    - set(GIR_QUIET "--quiet")
    - else(GIR_QUIET)
    - set(GIR_QUIET "")
    - endif(GIR_QUIET)
    -
    - if(GIR_FORMAT)
    - set(GIR_FORMAT "--format=${GIR_FORMAT}")
    - endif(GIR_FORMAT)
    -
    - # if library is set, we need to prepend --library= on to it
    - if(GIR_LIBRARY)
    - set(GIR_REAL_LIBRARY "--library=${GIR_LIBRARY}")
    - endif(GIR_LIBRARY)
    -
    - # if program has been set, we prepend --program= on to it
    - if(GIR_PROGRAM)
    - set(GIR_PROGRAM "--program=${GIR_PROGRAM}")
    - endif(GIR_PROGRAM)
    -
    - # if program_arg has been set, we prepend --program-arg= on to it
    - if(GIR_PROGRAM_ARG)
    - set(GIR_PROGRAM_ARG "--program-arg=${GIR_PROGRAM_ARG}")
    - endif(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
    - if(GIR_PACKAGES)
    - _gir_list_prefix(GIR_REAL_PACKAGES GIR_PACKAGES "--pkg=")
    - endif(GIR_PACKAGES)
    -
    - # if the user specified BUILT_SOURCES, we need to get their paths since
    - # they could be in CMAKE_CURRENT_BUILD_DIR
    - if(GIR_BUILT_SOURCES)
    - set(GIR_REAL_BUILT_SOURCES)
    -
    - foreach(ITEM ${GIR_BUILT_SOURCES})
    - get_source_file_property(LOCATION ${ITEM} LOCATION)
    - list(APPEND GIR_REAL_BUILT_SOURCES "${LOCATION}")
    - endforeach(ITEM)
    - endif(GIR_BUILT_SOURCES)
    -
    - ###########################################################################
    - # Add the custom commands
    - ###########################################################################
    - set(ENV{CFLAGS} ${GIR_REAL_CFLAGS})
    - add_custom_command(
    - OUTPUT ${GIR_FILENAME}
    - COMMAND ${GIR_SCANNER} ${GIR_SCANNER_ARGS}
    - --namespace=${GIR_NAMESPACE}
    - --nsversion=${GIR_NSVERSION}
    - ${GIR_REAL_CFLAGS}
    - ${GIR_FORMAT}
    - ${GIR_REAL_LIBRARY}
    - ${GIR_PROGRAM} ${GIR_PROGRAM_ARGS}
    - ${GIR_QUIET} ${GIR_VERBOSE}
    - ${GIR_REAL_IDENTIFIER_PREFIXES}
    - ${GIR_REAL_SYMBOL_PREFIXES}
    - ${GIR_REAL_PACKAGES}
    - --no-libtool
    - -L${CMAKE_CURRENT_BINARY_DIR}
    - --output=${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
    - ${GIR_SOURCES}
    - ${GIR_REAL_BUILT_SOURCES}
    - DEPENDS ${GIR_LIBRARY}
    - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    - VERBATIM
    - )
    -
    - add_custom_target("gir ${GIR_FILENAME}" ALL DEPENDS ${GIR_LIBRARY} ${GIR_FILENAME})
    -
    - install(
    - FILES ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
    - DESTINATION ${GIR_GIRDIR}
    - )
    -
    - # create the name of the typelib
    - string(REPLACE ".gir" ".typelib" GIR_TYPELIB "${GIR_FILENAME}")
    -
    - add_custom_command(
    - COMMAND ${GIR_COMPILER} ${GIR_COMPILER_ARGS}
    - ${CMAKE_CURRENT_BINARY_DIR}/${GIR_FILENAME}
    - --output=${CMAKE_CURRENT_BINARY_DIR}/${GIR_TYPELIB}
    - OUTPUT ${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})
    - install(
    - 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 hackery
    -###############################################################################
    -# homebrew's gettext is keyonly, so we need to append it's path
    -if(APPLE)
    - find_program(BREW brew)
    - if(BREW)
    - execute_process(COMMAND ${BREW} --prefix gettext
    - OUTPUT_VARIABLE GETTEXT_PREFIX
    - OUTPUT_STRIP_TRAILING_WHITESPACE)
    - if(GETTEXT_PREFIX)
    - set(GETTEXT_PATH "${GETTEXT_PREFIX}/bin")
    - endif(GETTEXT_PREFIX)
    - endif(BREW)
    -endif(APPLE)
    -
    -###############################################################################
    -# Dependencies
    -###############################################################################
    -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)
    -
    -###############################################################################
    -# Functions
    -###############################################################################
    -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)
    -
    - cmake_parse_arguments(
    - POT "${options}" "${oneValueArgs}" "${multiValueArgs}"
    - ${_FIRST_ARG} ${ARGN}
    - )
    -
    - if(POT_UNPARSED_ARGUMENTS)
    - message(FATAL_ERROR "Unknown keys given to pot_file(): "
    - "\"${POT_UNPARSED_ARGUMENTS}\"")
    - endif(POT_UNPARSED_ARGUMENTS)
    -
    - if(NOT POT_FILENAME)
    - set(POT_FILENAME ${GETTEXT_PACKAGE}.pot)
    - message(AUTHOR_WARNING "No filename specified, using ${POT_FILENAME}")
    - endif(NOT POT_FILENAME)
    -
    - if(NOT POT_SOURCES)
    - message(FATAL_ERROR "No sources specified")
    - endif(NOT POT_SOURCES)
    -
    - if(NOT POT_NO_ESCAPE)
    - set(POT_ESCAPE --escape)
    - endif(NOT POT_NO_ESCAPE)
    -
    - if(POT_COMMENTS)
    - set(POT_COMMENTS "--add-comments=${POT_COMMENTS}")
    - endif(POT_COMMENTS)
    -
    - if(POT_SORT)
    - set(POT_SORT -s)
    - endif(POT_SORT)
    -
    - # handle keywords
    - if(NOT POT_NO_DEFAULT_KEYWORDS)
    - list(INSERT POT_KEYWORDS 0 _ N_ C_:1c,2 NC_:1c,2)
    - endif(NOT POT_NO_DEFAULT_KEYWORDS)
    -
    - if(POT_KEYWORDS)
    - set(_keywords)
    -
    - foreach(_kw ${POT_KEYWORDS})
    - list(APPEND _keywords "--keyword=${_kw}")
    - endforeach(_kw)
    - set(POT_KEYWORDS ${_keywords})
    - endif(POT_KEYWORDS)
    -
    - # handle languages
    - if(POT_LANGUAGES)
    - set(_languages)
    -
    - foreach(_lang in ${POT_LANGUAGES})
    - list(APPEND _languages "--language=${_lang}")
    - endforeach(_lang)
    - set(POT_LANGUAGES ${_languages})
    - endif(POT_LANGUAGES)
    -
    - # now tweak the sources
    - set(POT_REAL_BUILT_SOURCES)
    - if(POT_BUILT_SOURCES)
    - foreach(_item ${POT_BUILT_SOURCES})
    - get_source_file_property(_location ${_item} LOCATION)
    - list(APPEND POT_REAL_BUILT_SOURCES "${_location}")
    - endforeach(_item)
    - endif(POT_BUILT_SOURCES)
    -
    - add_custom_command(
    - OUTPUT ${POT_FILENAME}
    - COMMAND ${XGETTEXT_EXECUTABLE}
    - ${POT_SORT} ${POT_KEYWORDS} ${POT_LANGUAGES} ${POT_ESCAPE}
    - ${POT_COMMENTS}
    - -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}
    - VERBATIM
    - )
    -
    - add_custom_target("${POT_FILENAME} potfile" ALL DEPENDS ${POT_FILENAME})
    -endfunction(GETTEXTIZE_POT_FILE)
    -
    -function(GETTEXTIZE_TRANSLATIONS)
    - set(options UPDATE)
    - set(oneValueArgs)
    - set(multiValueArgs)
    -
    - CMAKE_PARSE_ARGUMENTS(
    - PO "${options}" "${oneValueArgs}" "${multiValueArgs}"
    - ${ARGV1} ${ARGN}
    - )
    -
    - if(PO_UNPARSED_ARGUMENTS)
    - message(
    - FATAL_ERROR "Unknown keys given to GETTEXTIZE_TRANSLATIONS(): "
    - "\"${PO_UNPARSED_ARGUMENTS}\""
    - )
    - endif(PO_UNPARSED_ARGUMENTS)
    -
    - file(GLOB _pos *.po)
    - set(_gmos)
    -
    - foreach(_po ${_pos})
    - set(_update)
    - if(PO_UPDATE)
    - set(_update COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_po} ${_po})
    - endif(PO_UPDATE)
    -
    - get_filename_component(_base ${_po} NAME_WE)
    -
    - set(_install_dir ${LOCALE_DIR}/${_base}/LC_MESSAGES/)
    - set(_install_file ${GETTEXT_DOMAIN}.mo)
    -
    - set(_gmo ${_base}.gmo)
    - list(APPEND _gmos ${_gmo})
    -
    - add_custom_command(
    - OUTPUT ${_gmo}
    - ${_update}
    - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmo} ${_po}
    - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    - DEPENDS ${_po}
    - )
    -
    - install(
    - FILES ${CMAKE_CURRENT_BINARY_DIR}/${_gmo}
    - DESTINATION ${_install_dir}
    - RENAME ${_install_file}
    - )
    - endforeach(_po)
    -
    - 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 @@
    -include(FindPkgConfig)
    -
    -macro(pkg_config_variable MODULE VARIABLE OUTPUT_VARIABLE)
    - set(_output)
    -
    - execute_process(
    - 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)
    -include(FindPkgConfig)
    -
    -find_program(HELP2MAN
    - NAMES help2man
    - DOC "help2man executable"
    -)
    -
    -if(NOT HELP2MAN)
    - message(FATAL_ERROR "failed to find help2man")
    -endif(NOT 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)
    -
    - # validate 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)
    -
    - # additional options
    - set(_HELP2MAN_OPTIONS)
    - if(_HELP2MAN_NAME)
    - set(_HELP2MAN_OPTIONS ${_HELP2MAN_OPTIONS} -n "${_HELP2MAN_NAME}")
    - endif(_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)
    - if(NOT _HELP2MAN_EXEC)
    - get_target_property(_HELP2MAN_EXEC ${_HELP2MAN_TARGET} LOCATION)
    - endif(NOT _HELP2MAN_EXEC)
    -
    - add_custom_target(${_HELP2MAN_OUTPUT} ALL
    - COMMAND ${HELP2MAN}
    - -s ${_HELP2MAN_SECTION}
    - -o ${_HELP2MAN_OUTPUT}
    - --no-info --no-discard-stderr
    - ${_HELP2MAN_OPTIONS}
    - ${_HELP2MAN_EXEC}
    - DEPENDS ${_HELP2MAN_TARGET}
    - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    - )
    -
    - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_HELP2MAN_OUTPUT} DESTINATION share/man/man${_HELP2MAN_SECTION})
    -endfunction(help2man)
    -
    -
    --- 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 @@
    -option(
    - BUILD_GTK3
    - "Whether or not to build the gtk3 library"
    - "On"
    -)
    -
    -if(BUILD_GTK3)
    -
    -###############################################################################
    -# Build Info
    -###############################################################################
    -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})
    -
    -add_definitions(
    - -DGPLUGIN_GTK_COMPILATION
    - -DG_LOG_DOMAIN="GPluginGtk"
    -)
    -
    -link_directories(
    - ${GTK3_LIBRARY_DIRS}
    -)
    -
    -include_directories(
    - ${GTK3_INCLUDE_DIRS}
    -)
    -
    -include_directories(
    - ${CHAKE_CURRENT_SOURCE_DIR}
    -)
    -
    -set(GPLUGIN_GTK_SOURCES
    - gplugin-gtk-plugin-info.c
    - gplugin-gtk-store.c
    - gplugin-gtk-view.c
    -)
    -
    -set(GPLUGIN_GTK_HEADERS
    - gplugin-gtk-plugin-info.h
    - gplugin-gtk-store.h
    - gplugin-gtk-view.h
    -)
    -
    -set(GPLUGIN_GTK_PRIVATE_SOURCES
    -)
    -
    -set(GPLUGIN_GTK_PRIVATE_HEADERS
    -)
    -
    -set(GPLUGIN_GTK_BUILT_SOURCES
    -)
    -
    -set(GPLUGIN_GTK_BUILT_HEADERS
    -)
    -
    -###############################################################################
    -# Configure Files
    -###############################################################################
    -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}>")
    -endforeach(HEADER)
    -
    -configure_file(gplugin-gtk.h.in gplugin-gtk.h @ONLY)
    -
    -configure_file(gplugin-gtk.pc.in gplugin-gtk.pc @ONLY)
    -install(
    - FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin-gtk.pc
    - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
    -)
    -
    -###############################################################################
    -# Library Target
    -###############################################################################
    -add_library(gplugin-gtk SHARED
    - ${GPLUGIN_GTK_SOURCES}
    - ${GPLUGIN_GTK_HEADERS}
    - ${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
    - ${GTK3_LIBRARIES}
    - gplugin
    -)
    -
    -install(TARGETS gplugin-gtk DESTINATION ${CMAKE_INSTALL_LIBDIR})
    -
    -# install the single include into the main directory
    -install(
    - 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})
    - install(
    - FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
    - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin-gtk
    - )
    -endforeach(HEADER)
    -
    -# install the GtkBuilder files
    -install(
    - FILES gplugin-gtk-plugin-info.ui
    - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gplugin/gplugin-gtk/
    -)
    -
    -###############################################################################
    -# Application Target
    -###############################################################################
    -add_executable(gplugin-gtk-viewer
    - gplugin-gtk-viewer.c
    -)
    -
    -target_link_libraries(gplugin-gtk-viewer
    - gplugin-gtk
    - gplugin
    -)
    -
    -help2man(
    - TARGET gplugin-gtk-viewer
    - OUTPUT gplugin-gtk-viewer.1
    - SECTION 1
    - NAME "View installed plugins"
    - HELP_OPTION --help-all
    -)
    -
    -install(TARGETS gplugin-gtk-viewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
    -
    -endif(BUILD_GTK3)
    --- 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@
    -libdir=${prefix}/lib
    -includedir=${prefix}/include/gplugin-1.0/
    -
    -plugindir=${libdir}
    -
    -Name: libgplugin-gtk
    -Description: Gtk+ widgets for GPlugin
    -Version: @GPLUGIN_VERSION@
    -Requires: glib-2.0 gobject-2.0 gmodule-2.0 gplugin
    -Libs: -L${libdir} -lgplugin-gtk
    -Cflags: -I${includedir}
    -
    --- /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 @@
    +if get_option('gtk3')
    +
    +###############################################################################
    +# Build Info
    +###############################################################################
    +GTK3 = dependency('gtk+-3.0', version : '>=3.0.0')
    +
    +GPLUGIN_GTK_LD_CURRENT = 0
    +GPLUGIN_GTK_LD_REVISION = 1
    +GPLUGIN_GTK_LD_AGE = 0
    +GPLUGIN_GTK_LD_VERSION = '@0@.@1@.@2@'.format(
    + GPLUGIN_GTK_LD_CURRENT,
    + GPLUGIN_GTK_LD_REVISION,
    + GPLUGIN_GTK_LD_AGE)
    +
    +GPLUGIN_GTK_SOURCES = [
    + 'gplugin-gtk-plugin-info.c',
    + 'gplugin-gtk-store.c',
    + 'gplugin-gtk-view.c',
    +]
    +
    +GPLUGIN_GTK_HEADERS = [
    + 'gplugin-gtk-plugin-info.h',
    + 'gplugin-gtk-store.h',
    + 'gplugin-gtk-view.h',
    +]
    +
    +GPLUGIN_GTK_PRIVATE_SOURCES = [
    +]
    +
    +GPLUGIN_GTK_PRIVATE_HEADERS = [
    +]
    +
    +GPLUGIN_GTK_BUILT_SOURCES = [
    +]
    +
    +GPLUGIN_GTK_BUILT_HEADERS = [
    +]
    +
    +###############################################################################
    +# Configure Files
    +###############################################################################
    +GPLUGIN_GTK_H_INCLUDES = ''
    +
    +foreach header : GPLUGIN_GTK_HEADERS
    + GPLUGIN_GTK_H_INCLUDES = '@0@\n#include <gplugin-gtk/@1@>'.format(
    + GPLUGIN_GTK_H_INCLUDES,
    + header)
    +endforeach
    +
    +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',
    + configuration : conf,
    + install : true,
    + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0'))
    +
    +###############################################################################
    +# Library Target
    +###############################################################################
    +gplugin_gtk = shared_library('gplugin-gtk',
    + GPLUGIN_GTK_SOURCES,
    + GPLUGIN_GTK_HEADERS,
    + 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 : true
    +)
    +
    +# install the normal includes into the gplugin-gtk subdirectory
    +install_headers(
    + GPLUGIN_GTK_HEADERS,
    + subdir : 'gplugin-1.0/gplugin-gtk'
    +)
    +
    +# install the GtkBuilder files
    +install_data(
    + 'gplugin-gtk-plugin-info.ui',
    + install_dir : join_paths(get_option('datadir'), 'gplugin', 'gplugin-gtk')
    +)
    +
    +pkgconfig.generate(
    + 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'],
    + variables : [
    + 'plugindir=${libdir}',
    + ],
    +)
    +
    +###############################################################################
    +# Application Target
    +###############################################################################
    +gplugin_gtk_viewer = executable('gplugin-gtk-viewer',
    + 'gplugin-gtk-viewer.c',
    + link_with : [gplugin_gtk],
    + dependencies : [gplugin_dep, GTK3],
    + install : true
    +)
    +
    +if get_option('help2man')
    + gplugin_gtk_viewer_man = custom_target('gplugin-gtk-viewer.1',
    + command : [help2man,
    + '--name=View installed plugins', '--section=1',
    + '--help-option=--help-all', '--no-info',
    + '--output', '@OUTPUT@',
    + gplugin_gtk_viewer],
    + output : 'gplugin-gtk-viewer.1',
    + install : true,
    + install_dir : join_paths(get_option('mandir'), 'man1'))
    +endif
    +
    +endif # gtk3
    --- /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 @@
    -###############################################################################
    -# Library
    -###############################################################################
    -
    -set(GPLUGIN_LD_CURRENT 0)
    -set(GPLUGIN_LD_REVISION 1)
    -set(GPLUGIN_LD_AGE 0)
    -set(GPLUGIN_LD_VERSION ${GPLUGIN_LD_CURRENT}.${GPLUGIN_LD_REVISION}.${GPLUGIN_LD_AGE})
    -
    -add_definitions(
    - -DGPLUGIN_COMPILATION
    - -DG_LOG_DOMAIN="GPlugin"
    - -DGI_TYPELIB_PATH="${CMAKE_CURRENT_BINARY_DIR}"
    -)
    -
    -set(GPLUGIN_HEADERS
    - gplugin-core.h
    - gplugin-loader.h
    - gplugin-manager.h
    - gplugin-options.h
    - gplugin-plugin.h
    - gplugin-plugin-info.h
    -)
    -
    -set(GPLUGIN_SOURCES
    - gplugin-core.c
    - gplugin-plugin.c
    - gplugin-loader.c
    - gplugin-manager.c
    - gplugin-options.c
    - gplugin-plugin-info.c
    - gplugin-private.c
    - gplugin-version.c
    -)
    -
    -set(GPLUGIN_PUBLIC_BUILT_HEADERS
    - gplugin-enums.h
    - gplugin-version.h
    -)
    -
    -set(GPLUGIN_PUBLIC_BUILT_SOURCES
    - gplugin-enums.c
    -)
    -
    -set(GPLUGIN_PRIVATE_HEADERS
    - gplugin-file-tree.h
    -)
    -
    -set(GPLUGIN_PRIVATE_SOURCES
    - gplugin-file-tree.c
    -)
    -
    -set(GPLUGIN_PRIVATE_BUILT_HEADERS
    - gplugin-marshallers.h
    -)
    -
    -set(GPLUGIN_PRIVATE_BUILT_SOURCES
    - gplugin-marshallers.c
    -)
    -
    -set(GPLUGIN_NATIVE_HEADERS
    - gplugin-native-plugin.h
    - gplugin-native-loader.h
    -)
    -
    -set(GPLUGIN_NATIVE_SOURCES
    - gplugin-native-plugin.c
    - gplugin-native-loader.c
    -)
    -
    -##############################################################################
    -# Helper Variables
    -###############################################################################
    -# 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-private.h
    - gplugin-native-private.h
    -)
    -
    -###############################################################################
    -# Configure Files
    -###############################################################################
    -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
    - @ONLY)
    -
    -
    -# build gplugin.h
    -set(GPLUGIN_H_INCLUDES "")
    -
    -foreach(HEADER ${PUBLIC_HEADERS})
    - set(GPLUGIN_H_INCLUDES "${GPLUGIN_H_INCLUDES}\n#include <gplugin/${HEADER}>")
    -endforeach(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}>")
    -endforeach(HEADER)
    -
    -configure_file(gplugin-native.h.in gplugin-native.h @ONLY)
    -
    -###############################################################################
    -# gplugin-enum.[ch] generation
    -###############################################################################
    -set(ENUM_HEADERS
    - gplugin-plugin.h
    -)
    -
    -add_custom_command(
    - OUTPUT gplugin-enums.h
    - 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
    -)
    -
    -add_custom_command(
    - OUTPUT gplugin-enums.c
    - 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
    -###############################################################################
    -add_custom_command(
    - 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
    -)
    -
    -add_custom_command(
    - 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
    -)
    -
    -###############################################################################
    -# Library target
    -###############################################################################
    -add_library(gplugin SHARED
    - ${GPLUGIN_SOURCES}
    - ${GPLUGIN_NATIVE_SOURCES}
    - ${GPLUGIN_PUBLIC_BUILT_SOURCES}
    - ${GPLUGIN_PRIVATE_SOURCES}
    - ${GPLUGIN_PRIVATE_BUILT_SOURCES}
    - ${GPLUGIN_NATIVE_HEADERS}
    - ${PUBLIC_HEADERS}
    - ${PRIVATE_HEADERS}
    - gplugin.h
    - gplugin-native.h
    -)
    -
    -set_target_properties(gplugin PROPERTIES
    - SOVERSION ${GPLUGIN_LD_CURRENT}
    - VERSION ${GPLUGIN_LD_VERSION}
    -)
    -
    -target_link_libraries(gplugin
    - ${GLIB_LIBRARIES}
    - ${GMODULE_LIBRARIES}
    -)
    -
    -# nls
    -gettextize_pot_file(
    - SORT
    - LANGUAGES C
    - SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c
    - BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES}
    - FILENAME gplugin.pot
    -)
    -
    -###############################################################################
    -# gplugin-query executable
    -###############################################################################
    -add_executable(gplugin-query gplugin-query.c)
    -target_link_libraries(gplugin-query ${GLIB_LIBRARIES} gplugin)
    -
    -help2man(
    - TARGET gplugin-query
    - OUTPUT gplugin-query.1
    - SECTION 1
    - NAME "Query installed plugins"
    - HELP_OPTION --help-all
    -)
    -
    -###############################################################################
    -# loader-tests static library
    -###############################################################################
    -add_library(gplugin-loader-tests STATIC
    - gplugin-loader-tests.c
    - gplugin-loader-tests.h
    -)
    -
    -target_link_libraries(gplugin-loader-tests gplugin)
    -
    -###############################################################################
    -# GObject Introspection
    -###############################################################################
    -if(BUILD_GIR)
    - if(APPLE)
    - message("The GObject Introspection build always fails on OS X, "
    - "skipping")
    - else(APPLE)
    - include(GObjectIntrospection)
    -
    - set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_BINARY_DIR}")
    -
    - gobject_introspection(
    - FILENAME GPlugin-${GPLUGIN_MAJOR_VERSION}.${GPLUGIN_MINOR_VERSION}.gir
    - PACKAGES glib-2.0 gmodule-2.0 gobject-2.0
    - LIBRARY gplugin
    - QUIET
    - 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)
    - endif(APPLE)
    -endif(BUILD_GIR)
    -
    -###############################################################################
    -# Install Stuff
    -###############################################################################
    -# install the main library
    -install(TARGETS gplugin DESTINATION ${CMAKE_INSTALL_LIBDIR})
    -
    -# install gplugin-query
    -install(TARGETS gplugin-query RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
    -
    -# install the single includes into the main directory
    -install(
    - 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})
    - install(
    - FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}
    - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin
    - )
    -endforeach(HEADER)
    -
    -# install the built include into the gplugin subdirectory
    -foreach(HEADER ${GPLUGIN_PUBLIC_BUILT_HEADERS})
    - install(
    - FILES ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}
    - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gplugin-1.0/gplugin
    - )
    -endforeach(HEADER)
    -
    -# pkg-config files
    -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gplugin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
    -
    -###############################################################################
    -# subdirectories
    -###############################################################################
    -if(TESTING_ENABLED)
    - add_subdirectory(tests)
    -endif(TESTING_ENABLED)
    -
    --- 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 @@
    enum {
    SIG_LOADING,
    SIG_LOADED,
    + SIG_LOAD_FAILED,
    SIG_UNLOADING,
    SIG_UNLOADED,
    N_SIGNALS,
    @@ -89,6 +90,7 @@
    GError **error);
    void (*loaded_plugin)(GObject *manager,
    GPluginPlugin *plugin);
    + void (*load_failed)(GObject *manager, GPluginPlugin *plugin);
    gboolean (*unloading_plugin)(GObject *manager,
    GPluginPlugin *plugin,
    GError **error);
    @@ -149,7 +151,7 @@
    *****************************************************************************/
    static void
    gplugin_manager_real_append_path(GPluginManager *manager,
    - const gchar *path)
    + const gchar *path)
    {
    GList *l = NULL;
    @@ -165,7 +167,7 @@
    static void
    gplugin_manager_real_prepend_path(GPluginManager *manager,
    - const gchar *path)
    + const gchar *path)
    {
    GList *l = NULL;
    @@ -181,7 +183,7 @@
    static void
    gplugin_manager_real_remove_path(GPluginManager *manager,
    - const gchar *path)
    + const gchar *path)
    {
    GList *l = NULL, *link = NULL;
    @@ -209,7 +211,7 @@
    static void
    gplugin_manager_real_register_loader(GPluginManager *manager,
    - GType type)
    + GType type)
    {
    GPluginLoader *loader = NULL;
    GPluginLoaderClass *lo_class = NULL;
    @@ -273,7 +275,7 @@
    static void
    gplugin_manager_real_unregister_loader(GPluginManager *manager,
    - GType type)
    + GType type)
    {
    GPluginLoaderClass *klass = NULL;
    GSList *exts = NULL;
    @@ -550,7 +552,7 @@
    static GSList *
    gplugin_manager_real_find_plugins(GPluginManager *manager,
    - const gchar *id)
    + const gchar *id)
    {
    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);
    + if(ret)
    + g_signal_emit(manager, signals[SIG_LOADED], 0, plugin);
    + else
    + g_signal_emit(manager, signals[SIG_LOAD_FAILED], 0, plugin);
    return ret;
    }
    static gboolean
    gplugin_manager_real_unload_plugin(GPluginManager *manager,
    - GPluginPlugin *plugin,
    - GError **error)
    + GPluginPlugin *plugin,
    + GError **error)
    {
    GPluginLoader *loader = NULL;
    gboolean ret = TRUE;
    @@ -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);
    -#else
    - GList *iter = NULL;
    - GSList *l = NULL;
    -
    - for(iter = manager->paths->head; iter; iter = iter->next)
    - g_free(iter->data);
    - 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 @@
    GPLUGIN_TYPE_PLUGIN);
    /**
    + * 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_SIGNAL_RUN_LAST,
    + G_STRUCT_OFFSET(GPluginManagerClass, load_failed),
    + NULL,
    + NULL,
    + gplugin_marshal_VOID__OBJECT,
    + G_TYPE_NONE,
    + 1,
    + GPLUGIN_TYPE_PLUGIN);
    +
    + /**
    * 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 @@
    if(module)
    g_module_close(module);
    - if(error) {
    + if(error && !*error) {
    *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)) {
    g_module_close(module);
    - if(error) {
    + if(error && !*error) {
    *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 @@
    -Name: libgplugin
    -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@
    -libdir=${prefix}/lib
    -includedir=${prefix}/include/gplugin-1.0/
    -
    -plugindir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
    -
    -Name: libgplugin
    -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
    -Cflags: -I${includedir}
    -
    --- /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 @@
    +###############################################################################
    +# Library
    +###############################################################################
    +
    +GPLUGIN_LD_CURRENT = 0
    +GPLUGIN_LD_REVISION = 1
    +GPLUGIN_LD_AGE = 0
    +GPLUGIN_LD_VERSION = '@0@.@1@.@2@'.format(
    + GPLUGIN_LD_CURRENT,
    + GPLUGIN_LD_REVISION,
    + GPLUGIN_LD_AGE)
    +
    +GPLUGIN_HEADERS = [
    + 'gplugin-core.h',
    + 'gplugin-loader.h',
    + 'gplugin-manager.h',
    + 'gplugin-options.h',
    + 'gplugin-plugin.h',
    + 'gplugin-plugin-info.h',
    +]
    +
    +GPLUGIN_SOURCES = [
    + 'gplugin-core.c',
    + 'gplugin-plugin.c',
    + 'gplugin-loader.c',
    + 'gplugin-manager.c',
    + 'gplugin-options.c',
    + 'gplugin-plugin-info.c',
    + 'gplugin-private.c',
    + 'gplugin-version.c',
    +]
    +
    +GPLUGIN_PUBLIC_BUILT_HEADERS = [
    + # Modified below.
    +]
    +
    +GPLUGIN_PUBLIC_BUILT_SOURCES = [
    + # Modified below.
    +]
    +
    +GPLUGIN_PRIVATE_HEADERS = [
    + 'gplugin-file-tree.h',
    +]
    +
    +GPLUGIN_PRIVATE_SOURCES = [
    + 'gplugin-file-tree.c',
    +]
    +
    +GPLUGIN_PRIVATE_BUILT_HEADERS = [
    + # Modified below.
    +]
    +
    +GPLUGIN_PRIVATE_BUILT_SOURCES = [
    + # Modified below.
    +]
    +
    +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
    +###############################################################################
    +ENUM_HEADERS = [
    + 'gplugin-plugin.h',
    +]
    +
    +enums = gnome.mkenums('gplugin-enums',
    + sources : ENUM_HEADERS,
    + c_template : 'gplugin-enums.c.tmpl',
    + h_template : 'gplugin-enums.h.tmpl',
    + identifier_prefix : 'GPlugin',
    + install_header : true,
    + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin'))
    +enums_c = enums[0]
    +enums_h = enums[1]
    +
    +GPLUGIN_PUBLIC_BUILT_HEADERS += [
    + enums_h
    +]
    +
    +GPLUGIN_PUBLIC_BUILT_SOURCES += [
    + enums_c
    +]
    +
    +###############################################################################
    +# 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 += [
    + marshallers_h
    +]
    +
    +GPLUGIN_PRIVATE_BUILT_SOURCES += [
    + marshallers_c
    +]
    +
    +##############################################################################
    +# Helper Variables
    +###############################################################################
    +PRIVATE_HEADERS = GPLUGIN_PRIVATE_HEADERS + GPLUGIN_PRIVATE_BUILT_HEADERS + ['gplugin-private.h', 'gplugin-native-private.h']
    +
    +###############################################################################
    +# Configure Files
    +###############################################################################
    +gplugin_version_h = configure_file(
    + input : 'gplugin-version.h.in',
    + output : 'gplugin-version.h',
    + configuration : version_conf,
    + install : true,
    + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin'))
    +GPLUGIN_PUBLIC_BUILT_HEADERS += [
    + gplugin_version_h
    +]
    +
    +
    +# Build gplugin.h
    +GPLUGIN_H_INCLUDES = ''
    +
    +foreach header : GPLUGIN_HEADERS
    + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
    + GPLUGIN_H_INCLUDES,
    + header)
    +endforeach
    +foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS
    + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
    + GPLUGIN_H_INCLUDES,
    + header)
    +endforeach
    +
    +conf = configuration_data()
    +conf.set('GPLUGIN_H_INCLUDES', GPLUGIN_H_INCLUDES)
    +gplugin_h = configure_file(
    + input : 'gplugin.h.in',
    + output : 'gplugin.h',
    + configuration : conf,
    + install : true,
    + 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,
    + header)
    +endforeach
    +
    +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',
    + configuration : conf,
    + install : true,
    + install_dir : join_paths(get_option('includedir'), 'gplugin-1.0'))
    +
    +###############################################################################
    +# Library target
    +###############################################################################
    +gplugin = shared_library('gplugin',
    + GPLUGIN_SOURCES,
    + GPLUGIN_NATIVE_SOURCES,
    + GPLUGIN_PUBLIC_BUILT_SOURCES,
    + GPLUGIN_PRIVATE_SOURCES,
    + GPLUGIN_PRIVATE_BUILT_SOURCES,
    + GPLUGIN_NATIVE_HEADERS,
    + GPLUGIN_HEADERS,
    + GPLUGIN_PUBLIC_BUILT_HEADERS,
    + PRIVATE_HEADERS,
    + gplugin_h,
    + gplugin_native_h,
    + c_args : ['-DGPLUGIN_COMPILATION', '-DG_LOG_DOMAIN="GPlugin"'],
    + include_directories : toplevel_inc,
    + dependencies : [GLIB, GOBJECT, GMODULE],
    + soversion : GPLUGIN_LD_CURRENT,
    + version : GPLUGIN_LD_VERSION,
    + install : true
    +)
    +gplugin_dep = declare_dependency(
    + include_directories : [toplevel_inc, include_directories('.')],
    + link_with : gplugin,
    + sources : GPLUGIN_PUBLIC_BUILT_HEADERS, # Ensure they're built before use.
    + dependencies : [GLIB, GOBJECT]
    +)
    +
    +pkgconfig.generate(
    + name : 'libgplugin',
    + description : 'A fully featured GModule based plugin library',
    + version : meson.project_version(),
    + filebase : 'gplugin',
    + subdirs : 'gplugin-1.0',
    + libraries : gplugin,
    + requires : ['glib-2.0', 'gobject-2.0', 'gmodule-2.0'],
    + variables : [
    + 'plugindir=${libdir}',
    + ],
    +)
    +
    +# nls
    +if get_option('nls')
    +# gettextize_pot_file(
    +# SORT
    +# LANGUAGES C
    +# SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c
    +# BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES}
    +# FILENAME gplugin.pot
    +# )
    +endif
    +
    +###############################################################################
    +# gplugin-query executable
    +###############################################################################
    +gplugin_query = executable('gplugin-query',
    + 'gplugin-query.c',
    + dependencies : [gplugin_dep, GLIB, GOBJECT],
    + install : true)
    +
    +if get_option('help2man')
    + custom_target('gplugin-query.1',
    + command : [help2man,
    + '--name=Query installed plugins', '--section=1',
    + '--help-option=--help-all', '--no-info',
    + '--output', '@OUTPUT@',
    + gplugin_query],
    + output : 'gplugin-query.1',
    + install : true,
    + install_dir : join_paths(get_option('mandir'), 'man1'))
    +endif
    +
    +###############################################################################
    +# 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],
    +)
    +
    +###############################################################################
    +# GObject Introspection
    +###############################################################################
    +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'],
    + namespace : 'GPlugin',
    + symbol_prefix : 'gplugin',
    + nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION),
    + install : true)
    +endif
    +
    +###############################################################################
    +# Install Stuff
    +###############################################################################
    +# install the normal includes into the gplugin subdirectory
    +install_headers(
    + GPLUGIN_HEADERS,
    + GPLUGIN_NATIVE_HEADERS,
    + subdir : 'gplugin-1.0/gplugin'
    +)
    +
    +###############################################################################
    +# subdirectories
    +###############################################################################
    +if get_option('testing')
    + subdir('tests')
    +endif
    --- 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 @@
    -###############################################################################
    -# Macros
    -###############################################################################
    -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)
    -
    -macro(add_gtest target)
    - add_executable(${target} ${target}.c)
    - target_link_libraries(${target} ${GLIB_LIBRARIES} gplugin)
    -
    - get_target_property(_output_name ${target} RUNTIME_OUTPUT_NAME)
    - if(${_output_name})
    - else(${_output_name})
    - get_target_property(_output_name ${target} LOCATION)
    - endif(${_output_name})
    -
    - list(APPEND TESTS ${_output_name})
    -endmacro(add_gtest)
    -
    -###############################################################################
    -# Subdirectories
    -###############################################################################
    -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)
    -
    -###############################################################################
    -# Tests
    -###############################################################################
    -
    -#######################################
    -# Simple Tests (single file)
    -#######################################
    -add_gtest(test-core)
    -add_gtest(test-option-group)
    -add_gtest(test-plugin-manager-paths)
    -add_gtest(test-plugin-info)
    -add_gtest(test-signals)
    -add_gtest(test-version-compare)
    -
    -#######################################
    -# Dynamic Type
    -#######################################
    -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/")
    -
    -#######################################
    -# ID Collision
    -#######################################
    -add_gtest(test-id-collision)
    -add_dependencies(test-id-collision id-collision1 id-collision2)
    -
    -#######################################
    -# Load On Query
    -#######################################
    -add_gtest(test-load-on-query)
    -add_dependencies(test-load-on-query load-on-query-pass load-on-query-fail)
    -add_definitions(
    - -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
    - super-dependent
    - no-version
    - exact1
    - exact2
    - greater
    - greater-equal
    - less
    - less-equal
    - bar
    - baz
    - fez
    -)
    -add_definitions(
    - -DTEST_VERSIONED_DEPENDENCY_DIR="${CMAKE_CURRENT_BINARY_DIR}/versioned-dependencies"
    -)
    -
    -#######################################
    -# Native Loader
    -#######################################
    -add_gtest(test-native-loader)
    -add_dependencies(test-native-loader
    - basic-plugin
    - dependent-plugin
    - broken-dependent-plugin
    - query-error
    -
    - load-exception
    - load-failed
    - unload-failed
    -)
    -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/")
    -
    -###############################################################################
    -# Bind Local
    -###############################################################################
    -add_gtest(test-bind-local)
    -add_dependencies(test-bind-local bind-local)
    -add_definitions(-DTEST_BIND_LOCAL_DIR="${CMAKE_CURRENT_BINARY_DIR}/bind-local/")
    -
    -###############################################################################
    -# GTester Stuff
    -###############################################################################
    -set(GTESTER_TESTS "${TESTS}")
    -set(GTESTER_LOG "testgplugin.xml")
    -set(GTESTER_JUNIT "testgplugin-junit.xml")
    -
    -add_custom_command(
    - COMMAND ${GTESTER} -k --verbose -o ${GTESTER_LOG} ${GTESTER_TESTS}
    - OUTPUT ${GTESTER_LOG}
    - DEPENDS ${TESTS}
    - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    -)
    -
    -add_custom_command(
    - COMMAND ${XSLTPROC} -o ${GTESTER_JUNIT} --nonet
    - ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
    - ${GTESTER_LOG}
    - OUTPUT ${GTESTER_JUNIT}
    - DEPENDS ${GTESTER_LOG}
    - 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',
    + name_prefix : '',
    + 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',
    + name_prefix : '',
    + 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',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_module('dynamic-type-user', 'dynamic-type-user.c',
    + name_prefix : '',
    + 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',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('id-collision2', 'id-collision2.c',
    + name_prefix : '',
    + 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',
    + name_prefix : '',
    + 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',
    + name_prefix : '',
    + 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 @@
    +###############################################################################
    +# Subdirectories
    +###############################################################################
    +subdir('plugins')
    +subdir('bad-plugins')
    +subdir('dynamic-type')
    +subdir('id-collision')
    +subdir('load-on-query-pass')
    +subdir('load-on-query-fail')
    +subdir('versioned-dependencies')
    +subdir('bind-local')
    +subdir('unresolved-symbol')
    +
    +###############################################################################
    +# Tests
    +###############################################################################
    +
    +#######################################
    +# Simple Tests (single file)
    +#######################################
    +e = executable('test-core', 'test-core.c',
    + c_args : [
    + '-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])
    +test('Core', e)
    +
    +e = executable('test-option-group', 'test-option-group.c',
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('Option Group', e)
    +
    +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])
    +test('Plugin Info', e)
    +
    +e = executable('test-signals', 'test-signals.c',
    + c_args : ['-DTEST_DIR="@0@/plugins/"'.format(meson.current_build_dir())],
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('Signals', e)
    +
    +e = executable('test-version-compare', 'test-version-compare.c',
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('Version Compare', e)
    +
    +#######################################
    +# Dynamic Type
    +#######################################
    +e = executable('test-dynamic-type', 'test-dynamic-type.c',
    + c_args : [
    + '-DTEST_DYNAMIC_DIR="@0@/dynamic-type/"'.format(
    + meson.current_build_dir())
    + ],
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('Dynamic Type', e)
    +
    +#######################################
    +# ID Collision
    +#######################################
    +e = executable('test-id-collision', 'test-id-collision.c',
    + c_args : [
    + '-DTEST_ID_DIR="@0@/id-collision/"'.format(
    + meson.current_build_dir()),
    + ],
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('ID Collision', e)
    +
    +#######################################
    +# Load On Query
    +#######################################
    +e = executable('test-load-on-query', 'test-load-on-query.c',
    + c_args : [
    + '-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',
    + c_args : [
    + '-DTEST_VERSIONED_DEPENDENCY_DIR="@0@/versioned-dependencies"'.format(
    + meson.current_build_dir()),
    + ],
    + dependencies : [gplugin_dep, GLIB, GOBJECT])
    +test('Versioned Dependencies', e)
    +
    +#######################################
    +# Native Loader
    +#######################################
    +e = executable('test-native-loader', 'test-native-loader.c',
    + c_args : [
    + '-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)
    +
    +###############################################################################
    +# Bind Local
    +###############################################################################
    +e = executable('test-bind-local', 'test-bind-local.c',
    + c_args : [
    + '-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])
    +test('Bind Local', e)
    +
    +###############################################################################
    +# Unresolved Symbol
    +###############################################################################
    +e = executable('test-unresolved-symbol', 'test-unresolved-symbol.c',
    + c_args : [
    + '-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',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('dependent-plugin', 'dependent-plugin.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('broken-dependent-plugin', 'broken-dependent-plugin.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('load-failed', 'load-failed.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('load-exception', 'load-exception.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('unload-failed', 'unload-failed.c',
    + name_prefix : '',
    + 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 @@
    gboolean loaded;
    gboolean unloading;
    gboolean unloaded;
    + gboolean load_failed;
    } TestGPluginManagerSignalsData;
    /******************************************************************************
    @@ -105,6 +106,16 @@
    return FALSE;
    }
    +static void
    +test_gplugin_manager_signals_load_failed(GPLUGIN_UNUSED GObject *manager,
    + GPLUGIN_UNUSED GPluginPlugin *plugin,
    + gpointer d)
    +{
    + TestGPluginManagerSignalsData *data = (TestGPluginManagerSignalsData *)d;
    +
    + data->load_failed = TRUE;
    +}
    +
    /******************************************************************************
    * Tests
    *****************************************************************************/
    @@ -113,7 +124,7 @@
    GPluginPlugin *plugin = NULL;
    GObject *manager = gplugin_manager_get_instance();
    GError *error = NULL;
    - TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
    + TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE };
    gulong signals[] = { 0, 0, 0, 0};
    signals[0] =
    @@ -158,7 +169,7 @@
    GPluginPlugin *plugin = NULL;
    GObject *manager = gplugin_manager_get_instance();
    GError *error = NULL;
    - TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
    + TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE };
    gulong signals[] = { 0, 0, 0, 0};
    signals[0] =
    @@ -200,7 +211,7 @@
    GPluginPlugin *plugin = NULL;
    GObject *manager = gplugin_manager_get_instance();
    GError *error = NULL;
    - TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE };
    + TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE };
    gulong signals[] = { 0, 0, 0, 0};
    signals[0] =
    @@ -240,6 +251,36 @@
    g_signal_handler_disconnect(manager, signals[3]);
    }
    +static void
    +test_gplugin_manager_signals_load_failure(void) {
    + GPluginPlugin *plugin = NULL;
    + GObject *manager = gplugin_manager_get_instance();
    + GError *error = NULL;
    + TestGPluginManagerSignalsData data = { FALSE, FALSE, FALSE, FALSE, FALSE };
    + gulong signals[] = { 0, 0, 0, 0, 0};
    +
    + signals[0] =
    + g_signal_connect(manager, "loading-plugin",
    + G_CALLBACK(test_gplugin_manager_signals_normal_loading),
    + &data);
    + signals[1] =
    + g_signal_connect(manager, "load-failed",
    + G_CALLBACK(test_gplugin_manager_signals_load_failed),
    + &data);
    +
    + 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]);
    +}
    +
    /******************************************************************************
    * Main
    *****************************************************************************/
    @@ -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);
    return g_test_run();
    }
    --- /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 <stdlib.h>
    +
    +#include <gplugin.h>
    +#include <gplugin-native.h>
    +
    +#include <glib.h>
    +
    +/******************************************************************************
    + * Tests
    + *****************************************************************************/
    +
    +static void
    +test_unresolved_symbol(void) {
    + g_test_expect_message(
    + G_LOG_DOMAIN,
    + G_LOG_LEVEL_WARNING,
    + "*some_unresolved_symbol*"
    + );
    +
    + gplugin_manager_remove_paths();
    + gplugin_manager_append_path(PLUGIN_DIR);
    + gplugin_manager_refresh();
    +
    + g_test_assert_expected_messages();
    +}
    +
    +/******************************************************************************
    + * Main
    + *****************************************************************************/
    +gint
    +main(gint argc, gchar **argv) {
    +
    + g_test_init(&argc, &argv, NULL);
    +
    + gplugin_init();
    +
    + /* test the load on query flag */
    + g_test_add_func("/loaders/native/unresolved-symbol",
    + test_unresolved_symbol);
    +
    + return g_test_run();
    +}
    +
    --- /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',
    + name_prefix : '',
    + 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.h>
    +#include <gplugin-native.h>
    +
    +void some_unresolved_symbol(void);
    +
    +G_MODULE_EXPORT GPluginPluginInfo *
    +gplugin_query(GPLUGIN_UNUSED GError **error) {
    + some_unresolved_symbol();
    +
    + return NULL;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    --- 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(exact1)
    -add_test_plugin(exact2)
    -add_test_plugin(greater)
    -add_test_plugin(greater-equal)
    -add_test_plugin(less)
    -add_test_plugin(less-equal)
    -add_test_plugin(bar)
    -add_test_plugin(baz)
    -add_test_plugin(fez)
    -
    --- /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',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('no-version', 'no-version.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('exact1', 'exact1.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('exact2', 'exact2.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('greater', 'greater.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('greater-equal', 'greater-equal.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('less', 'less.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('less-equal', 'less-equal.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('bar', 'bar.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('baz', 'baz.c',
    + name_prefix : '',
    + dependencies : [gplugin_dep, GLIB])
    +
    +shared_library('fez', 'fez.c',
    + name_prefix : '',
    + 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 @@
    -option(
    - BUILD_LUA
    - "Whether or not to build the Lua plugin loader"
    - "On"
    -)
    -
    -if(BUILD_LUA)
    - if(NOT BUILD_GIR)
    - message(FATAL_ERROR "Lua plugin requires GObject Introspection.")
    - endif(NOT BUILD_GIR)
    -
    - set(GPLUGIN_LUA_SOURCES
    - gplugin-lua-core.c
    - gplugin-lua-loader.c
    - gplugin-lua-plugin.c
    - )
    -
    - set(GPLUGIN_LUA_HEADERS
    - gplugin-lua-loader.h
    - gplugin-lua-plugin.h
    - )
    -
    - set(_LUAS "luajit>=2.0.0;lua>=5.1.0;lua5.2>=5.2.0;lua5.1>=5.1.0")
    - foreach(_LUA ${_LUAS})
    - if(NOT LUA_FOUND)
    - pkg_check_modules(LUA ${_LUA})
    - endif(NOT LUA_FOUND)
    - endforeach(_LUA)
    -
    - if(NOT LUA_FOUND)
    - message(FATAL_ERROR "No usable Lua library was found")
    - endif(NOT LUA_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
    - CMAKE_FLAGS
    - -DINCLUDE_DIRECTORIES:STRING=${LUA_INCLUDE_DIRS}
    - -DLINK_LIBRARIES:STRING=${LUA_LIBRARIES}
    - OUTPUT_VARIABLE OUTPUT
    - 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
    - execute_process(
    - 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)
    -
    - option(
    - MOONSCRIPT_TESTS
    - "Whether or not to run the moonscript tests"
    - "Off"
    - )
    -
    - # now add the library
    - add_library(gplugin-lua MODULE
    - ${GPLUGIN_LUA_SOURCES}
    - ${GPLUGIN_LUA_HEADERS}
    - )
    -
    - set_target_properties(gplugin-lua PROPERTIES PREFIX "")
    -
    - target_link_libraries(gplugin-lua
    - ${LUA_LIBRARIES}
    - gplugin
    - )
    -
    - install(TARGETS gplugin-lua DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
    -endif(BUILD_LUA)
    -
    -if(TESTING_ENABLED)
    - add_subdirectory(tests)
    -endif(TESTING_ENABLED)
    -
    --- 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 @@
    */
    #include <stdio.h>
    +#include <string.h>
    #include <lua.h>
    #include <lauxlib.h>
    #include <lualib.h>
    +static void
    +_add_require_path(lua_State *L, const char *path) {
    + const char *pkg_path = NULL;
    + char buff[255];
    +
    + 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
    +}
    +
    int
    main(int argc, char *argv[]) {
    - lua_State *L = luaL_newstate();
    + lua_State *L = NULL;
    int ret = 0;
    + L = luaL_newstate();
    + if(L == NULL) {
    + return 134;
    + }
    +
    luaL_openlibs(L);
    + /* 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 get_option('lua')
    + if not get_option('gobject-introspection')
    + error('Lua plugin requires GObject Introspection.')
    + endif
    +
    + GPLUGIN_LUA_SOURCES = [
    + 'gplugin-lua-core.c',
    + 'gplugin-lua-loader.c',
    + 'gplugin-lua-plugin.c',
    + ]
    +
    + GPLUGIN_LUA_HEADERS = [
    + 'gplugin-lua-loader.h',
    + 'gplugin-lua-plugin.h',
    + ]
    +
    + _LUAS = [['lua', '>=5.1.0'],
    + ['lua5.1', '>=5.1.0'],
    + ['luajit', '>=2.0.0'],
    + ['lua5.2', '>=5.2.0']]
    + LUA_FOUND = false
    + foreach _LUA : _LUAS
    + if not LUA_FOUND
    + LUA = dependency(_LUA[0], version : _LUA[1], required : false)
    + LUA_FOUND = LUA.found()
    + endif
    + endforeach
    +
    + if not LUA_FOUND
    + error('No usable Lua library was found')
    + endif
    +
    + # Compile and run our lua-lgi test program
    + lua_lgi_test = compiler.run(files('gplugin-lua-test-lgi.c'),
    + dependencies : LUA,
    + name : 'lua "lgi" module')
    + if not lua_lgi_test.compiled() or lua_lgi_test.returncode() != 0
    + error('Failed to find the "lgi" lua module')
    + endif
    +
    + # now add the library
    + shared_library('gplugin-lua',
    + GPLUGIN_LUA_SOURCES,
    + GPLUGIN_LUA_HEADERS,
    + name_prefix : '',
    + dependencies : [LUA, gplugin_dep],
    + install : true,
    + install_dir : join_paths(get_option('libdir'), 'gplugin')
    + )
    +endif # lua
    +
    +if get_option('testing')
    + subdir('tests')
    +endif
    --- 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 @@
    -if(BUILD_LUA)
    -
    -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})
    -endmacro(add_lua_gtest)
    -
    -add_definitions(
    - -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)
    -
    -if(${MOONSCRIPT_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")
    -
    -add_custom_command(
    - 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}
    -)
    -
    -add_custom_command(
    - COMMAND ${XSLTPROC} -o ${GTESTER_LUA_JUNIT} --nonet
    - ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
    - ${GTESTER_LUA_LOG}
    - 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}
    -)
    -
    -endif(BUILD_LUA)
    -
    --- /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,
    + name = "basic plugin",
    + category = "test",
    + version = "version",
    + license_id = "license",
    + summary = "summary",
    + description = "description",
    + authors = { "author1" },
    + website = "website"
    + }
    +end
    +
    +function gplugin_load(plugin)
    + return true
    +end
    +
    +function gplugin_unload(plugin)
    + return true
    +end
    +
    --- /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"},
    + }
    +end
    +
    +function gplugin_load(plugin)
    + return false
    +end
    +
    +function gplugin_unload(plugin)
    + return false
    +end
    +
    --- /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",
    + }
    +end
    +
    +function gplugin_load(plugin)
    + error('explosion!')
    +end
    +
    +function gplugin_unload(plugin)
    + return false
    +end
    +
    --- /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",
    + }
    +end
    +
    +function gplugin_load(plugin)
    + return false
    +end
    +
    +function gplugin_unload(plugin)
    + return true
    +end
    +
    --- /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",
    + }
    +end
    +
    +function gplugin_load(plugin)
    + return true
    +end
    +
    +function gplugin_unload(plugin)
    + return false
    +end
    +
    --- /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 @@
    +if get_option('lua')
    +
    +e = executable('test-lua-loader', 'test-lua-loader.c',
    + c_args : [
    + '-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 Loader', e)
    +
    +if get_option('moonscript-tests')
    + e = executable('test-lua-moon-loader', 'test-lua-moon-loader.c',
    + c_args : [
    + '-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)
    +endif
    +
    +endif # lua
    --- /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/>.
    +
    +lgi = require 'lgi'
    +GPlugin = lgi.GPlugin
    +
    +export gplugin_query = ->
    + return GPlugin.PluginInfo {
    + id: "gplugin/moon-basic-plugin",
    + abi_version: 0x01020304,
    + name: "basic plugin",
    + category: "test",
    + version: "version",
    + license_id: "license",
    + summary: "summary",
    + description: "description",
    + authors: { "author1" },
    + website: "website"
    + }
    +
    +export gplugin_load = ->
    + return true
    +
    +
    +export gplugin_unload = ->
    + return true
    +
    --- /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/>.
    +
    +lgi = require 'lgi'
    +GPlugin = lgi.GPlugin
    +
    +export gplugin_query = ->
    + return GPlugin.PluginInfo {
    + id: "gplugin/moon-dependent-plugin",
    + dependencies: {"dependency1", "dependency2"}
    + }
    +
    +export gplugin_load = ->
    + return false
    +
    +
    +export gplugin_unload = ->
    + return false
    --- /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/>.
    +
    +lgi = require 'lgi'
    +GPlugin = lgi.GPlugin
    +
    +export gplugin_query = ->
    + return GPlugin.PluginInfo {
    + id: "gplugin/moon-load-exception"
    + }
    +
    +export gplugin_load = ->
    + error("explode")
    + return false
    +
    +
    +export gplugin_unload = ->
    + return false
    --- /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/>.
    +
    +lgi = require 'lgi'
    +GPlugin = lgi.GPlugin
    +
    +export gplugin_query = ->
    + return GPlugin.PluginInfo {
    + id: "gplugin/moon-load-failed"
    + }
    +
    +
    +export gplugin_load = ->
    + return false
    +
    +
    +export gplugin_unload = ->
    + return true
    --- /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/>.
    +
    +lgi = require 'lgi'
    +GPlugin = lgi.GPlugin
    +
    +export gplugin_query = ->
    + return GPlugin.PluginInfo {
    + id: "gplugin/moon-unload-failed"
    + }
    +
    +
    +export gplugin_load = ->
    + return true
    +
    +
    +export gplugin_unload = ->
    + return false
    --- 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,
    - name = "basic plugin",
    - category = "test",
    - version = "version",
    - license_id = "license",
    - summary = "summary",
    - description = "description",
    - authors = { "author1" },
    - website = "website"
    - }
    -end
    -
    -function gplugin_load(plugin)
    - return true
    -end
    -
    -function gplugin_unload(plugin)
    - return true
    -end
    -
    --- 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/>.
    -
    -lgi = require 'lgi'
    -GPlugin = lgi.GPlugin
    -
    -export gplugin_query = ->
    - return GPlugin.PluginInfo {
    - id: "gplugin/moon-basic-plugin",
    - abi_version: 0x01020304,
    - name: "basic plugin",
    - category: "test",
    - version: "version",
    - license_id: "license",
    - summary: "summary",
    - description: "description",
    - authors: { "author1" },
    - website: "website"
    - }
    -
    -export gplugin_load = ->
    - return true
    -
    -
    -export gplugin_unload = ->
    - return true
    -
    --- 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"},
    - }
    -end
    -
    -function gplugin_load(plugin)
    - return false
    -end
    -
    -function gplugin_unload(plugin)
    - return false
    -end
    -
    --- 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/>.
    -
    -lgi = require 'lgi'
    -GPlugin = lgi.GPlugin
    -
    -export gplugin_query = ->
    - return GPlugin.PluginInfo {
    - id: "gplugin/moon-dependent-plugin",
    - dependencies: {"dependency1", "dependency2"}
    - }
    -
    -export gplugin_load = ->
    - return false
    -
    -
    -export gplugin_unload = ->
    - return false
    --- 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",
    - }
    -end
    -
    -function gplugin_load(plugin)
    - error('explosion!')
    -end
    -
    -function gplugin_unload(plugin)
    - return false
    -end
    -
    --- 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/>.
    -
    -lgi = require 'lgi'
    -GPlugin = lgi.GPlugin
    -
    -export gplugin_query = ->
    - return GPlugin.PluginInfo {
    - id: "gplugin/moon-load-exception"
    - }
    -
    -export gplugin_load = ->
    - error("explode")
    - return false
    -
    -
    -export gplugin_unload = ->
    - return false
    --- 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",
    - }
    -end
    -
    -function gplugin_load(plugin)
    - return false
    -end
    -
    -function gplugin_unload(plugin)
    - return true
    -end
    -
    --- 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/>.
    -
    -lgi = require 'lgi'
    -GPlugin = lgi.GPlugin
    -
    -export gplugin_query = ->
    - return GPlugin.PluginInfo {
    - id: "gplugin/moon-load-failed"
    - }
    -
    -
    -export gplugin_load = ->
    - return false
    -
    -
    -export gplugin_unload = ->
    - return true
    --- 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",
    - }
    -end
    -
    -function gplugin_load(plugin)
    - return true
    -end
    -
    -function gplugin_unload(plugin)
    - return false
    -end
    -
    --- 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/>.
    -
    -lgi = require 'lgi'
    -GPlugin = lgi.GPlugin
    -
    -export gplugin_query = ->
    - return GPlugin.PluginInfo {
    - id: "gplugin/moon-unload-failed"
    - }
    -
    -
    -export gplugin_load = ->
    - return true
    -
    -
    -export gplugin_unload = ->
    - return false
    --- 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");
    return g_test_run();
    }
    --- /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 Info
    +###############################################################################
    +project('gplugin', 'c', version : '0.28.0-dev',
    + meson_version : '>0.36.0',
    + default_options : ['c_std=c99'])
    +
    +parts = meson.project_version().split('-')
    +if parts.length() > 1
    + extra = parts[1]
    +else
    + extra = ''
    +endif
    +
    +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')
    +
    +###############################################################################
    +# Dependencies
    +###############################################################################
    +gnome = import('gnome')
    +pkgconfig = import('pkgconfig')
    +
    +if get_option('help2man')
    + help2man = find_program('help2man')
    +endif
    +
    +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')
    +endif
    +
    +###############################################################################
    +# NLS
    +###############################################################################
    +GETTEXT_PACKAGE = 'gplugin'
    +
    +add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE),
    + language : 'c')
    +
    +if get_option('nls')
    + i18n = import('i18n')
    +endif
    +
    +###############################################################################
    +# Build Info
    +###############################################################################
    +compiler = meson.get_compiler('c')
    +
    +add_global_arguments(
    + '-DPREFIX="@0@"'.format(get_option('prefix')),
    + '-DLIBDIR="@0@"'.format(get_option('libdir')),
    + '-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"',
    + language : 'c'
    +)
    +
    +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')
    + endif
    +endif
    +
    +configure_file(
    + 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'
    + add_global_arguments(
    + '-DGPLUGIN_UNUSED=__attribute__((unused))',
    + '-ggdb',
    + language : 'c'
    + )
    +else
    + add_global_arguments(
    + '-DGPLUGIN_UNUSED=',
    + language : 'c'
    + )
    +endif
    +
    +toplevel_inc = include_directories('.')
    +
    +###############################################################################
    +# Subdirectories
    +###############################################################################
    +subdir('gplugin')
    +subdir('gplugin-gtk')
    +subdir('packaging')
    +subdir('plugins')
    +subdir('po')
    +
    +subdir('lua')
    +subdir('perl')
    +subdir('python')
    +subdir('tcc')
    +
    +###############################################################################
    +# Install stuff
    +###############################################################################
    +# documentation
    +install_data('ChangeLog', 'INSTALL', 'README', 'HACKING',
    + install_dir : join_paths(get_option('datadir'), 'doc', 'gplugin'))
    +
    +###############################################################################
    +# make dist
    +###############################################################################
    +#set(ARCHIVES
    +# gplugin-${GPLUGIN_VERSION}.tar.bz2
    +# gplugin-${GPLUGIN_VERSION}.tar.gz
    +# gplugin-${GPLUGIN_VERSION}.zip
    +#)
    +
    +#set(SIGNATURES)
    +
    +#foreach(ARCHIVE ${ARCHIVES})
    +# add_custom_command(
    +# COMMAND hg archive ${ARCHIVE}
    +# OUTPUT ${ARCHIVE}
    +# DEPENDS .
    +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    +# )
    +#
    +# add_custom_command(
    +# COMMAND gpg --yes -abs ${ARCHIVE}
    +# OUTPUT ${ARCHIVE}.asc
    +# DEPENDS . ${ARCHIVE}
    +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
    +# )
    +#
    +# list(APPEND SIGNATURES ${ARCHIVE}.asc)
    +#endforeach(ARCHIVE)
    +#
    +#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 @@
    +###############################################################################
    +# Options
    +###############################################################################
    +option(
    + 'gobject-introspection',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build a GObject Introspection type library'
    +)
    +
    +option(
    + 'nls',
    + type : 'boolean', value : true,
    + description : 'Install translation files'
    +)
    +
    +option(
    + 'testing',
    + type : 'boolean', value : true,
    + description : 'Whether or not to run unit tests while compiling'
    +)
    +
    +option(
    + 'help2man',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build man pages from --help output'
    +)
    +
    +option(
    + 'gtk3',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build the gtk3 library'
    +)
    +
    +option(
    + 'lua',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build the Lua plugin loader'
    +)
    +
    +option(
    + 'moonscript-tests',
    + type : 'boolean', value : false,
    + description : 'Whether or not to run the moonscript tests'
    +)
    +
    +option(
    + 'perl',
    + type : 'boolean', value : false,
    + description : 'Whether or not to build the Perl plugin loader'
    +)
    +
    +option(
    + 'python',
    + type : 'boolean', value : true,
    + description : 'Whether or not to build the Python 3.x plugin loader'
    +)
    +
    +option(
    + 'tcc',
    + 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 @@
    Section: libs
    Priority: optional
    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
    -Architecture: any
    -Section: debug
    -Priority: extra
    -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.
    -
    Package: libgplugin-dev
    Architecture: any
    Section: libdevel
    @@ -68,18 +57,6 @@
    .
    This library provides some default GTK+-3 widgets for GPlugin.
    -Package: libgplugin-gtk0-dbg
    -Architecture: any
    -Section: debug
    -Priority: extra
    -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
    Architecture: any
    Section: libdevel
    @@ -116,7 +93,7 @@
    Package: libgplugin-lua
    Architecture: any
    -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/bin/dh-exec
    +usr/lib/${DEB_HOST_MULTIARCH}/girepository-1.0/
    usr/share/gir-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/bin/dh-exec
    usr/include/gplugin-1.0/gplugin
    usr/include/gplugin-1.0/gplugin.h
    usr/include/gplugin-1.0/gplugin-native.h
    -usr/lib/*/libgplugin.so
    -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/bin/dh-exec
    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/bin/dh-exec
    +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 @@
    #DEBHELPER#
    exit 0
    -
    --- 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 @@
    #DEBHELPER#
    exit 0
    -
    --- 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/bin/dh-exec
    +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/bin/dh-exec
    +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/bin/dh-exec
    +usr/lib/${DEB_HOST_MULTIARCH}/libgplugin.so.*
    usr/bin/gplugin-query
    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 @@
    #DEBHELPER#
    exit 0
    -
    --- 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 @@
    #DEBHELPER#
    exit 0
    -
    --- 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
    - instance@Base 0.0.17
    - regex@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 $@
    -override_dh_makeshlibs:
    - dh_makeshlibs -plibgplugin0
    - dh_makeshlibs -plibgplugin-gtk0
    -
    -override_dh_strip:
    - dh_strip -plibgplugin0 --dbg-package=libgplugin0-dbg
    - dh_strip -plibgplugin-gtk0 --dbg-package=libgplugin-gtk0-dbg
    - dh_strip
    -
    --- /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 @@
    +Name: gplugin
    +Version: @GPLUGIN_VERSION@
    +Release: %{?build_number}%{?!build_number:1}
    +License: LGPL-2.0+
    +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: gettext
    +BuildRequires: gtk3-devel
    +BuildRequires: help2man
    +BuildRequires: libxslt
    +BuildRequires: lua-devel
    +BuildRequires: lua-lgi
    +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
    +%define notownedhack 1
    +%else
    +%define notownedhack 0
    +%endif
    +
    +
    +%package -n libgplugin0
    +Summary: A GObject based library that implements a reusable plugin system
    +Group: Development/Libraries
    +
    +%package devel
    +Summary: A GObject based library that implements a reusable plugin system
    +Group: Development/Libraries
    +Requires: %{name}%{?_isa} = %{version}-%{release}
    +
    +%package gtk3
    +Summary: A GObject based library that implements a reusable plugin system
    +Group: Development/Libraries
    +
    +%package gtk3-devel
    +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}
    +
    +%package lua
    +Summary: A GObject based library that implements a reusable plugin system
    +Group: Development/Libraries
    +
    +%package python3
    +Summary: A GObject based library that implements a reusable plugin system
    +Group: Development/Libraries
    +
    +
    +%description
    +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.
    +
    +%description devel
    +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.
    +
    +%description gtk3
    +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.
    +
    +%description gtk3-devel
    +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.
    +
    +%description lua
    +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.
    +
    +%description python3
    +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.
    +
    +
    +%build
    +mkdir -p build
    +pushd build
    +
    +CFLAGS="%{optflags}" meson \
    + -Wno-dev \
    + --prefix=%{_prefix} \
    + -Dlua=true \
    + -Dpython=true \
    + ..
    +
    +ninja %{?_smp_mflags}
    +
    +
    +%install
    +pushd build
    +
    +ninja install DESTDIR=%{buildroot}
    +
    +# Unneeded files
    +rm -rf %{buildroot}%{_datadir}/doc/gplugin/
    +%if %{notownedhack} == 1
    +rm -rf %{buildroot}%{_datadir}/gplugin/
    +%endif
    +
    +%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
    +
    +
    +%files
    +%defattr(-,root,root)
    +%doc README ChangeLog
    +%if %{notownedhack} == 0
    +%license COPYING
    +%endif
    +%{_bindir}/gplugin-query
    +%{_libdir}/gplugin/
    +%{_mandir}/man1/gplugin-query.1*
    +
    +%files -n libgplugin0
    +%defattr(-,root,root)
    +%{_libdir}/libgplugin.so.0.1.0
    +
    +%files devel
    +%defattr(-,root,root)
    +%doc README HACKING
    +%if %{notownedhack} == 0
    +%license COPYING
    +%endif
    +%{_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
    +
    +%files gtk3
    +%defattr(-,root,root)
    +%doc README
    +%if %{notownedhack} == 0
    +%license COPYING
    +%endif
    +%{_bindir}/gplugin-gtk-viewer
    +%{_libdir}/libgplugin-gtk.so.0.1.0
    +%if %{notownedhack} == 0
    +%{_datadir}/gplugin/gplugin-gtk/
    +%endif
    +%{_mandir}/man1/gplugin-gtk-viewer.1*
    +
    +%files gtk3-devel
    +%defattr(-,root,root)
    +%doc README
    +%if %{notownedhack} == 0
    +%license COPYING
    +%endif
    +%{_libdir}/libgplugin-gtk.so
    +%{_libdir}/libgplugin-gtk.so.0
    +
    +%files lua
    +%defattr(-,root,root)
    +%doc README
    +%license COPYING
    +%{_libdir}/gplugin/gplugin-lua.so
    +
    +%files python3
    +%defattr(-,root,root)
    +%doc README
    +%if %{notownedhack} == 0
    +%license COPYING
    +%endif
    +%{_libdir}/gplugin/gplugin-python.so
    +
    +
    +%changelog
    +* 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 @@
    +configure_file(
    + 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 @@
    -option(
    - BUILD_PERL
    - "Whether or not to build the Perl plugin loader"
    - "Off"
    -)
    -
    -if(BUILD_PERL)
    - if(NOT BUILD_GIR)
    - message(FATAL_ERROR "Perl plugin requires GObject Introspection.")
    - endif(NOT BUILD_GIR)
    -
    - find_package(PerlLibs)
    -
    - if(PERLLIBS_FOUND)
    - set(GPLUGIN_PERL_SOURCES
    - gplugin-perl-core.c
    - gplugin-perl-loader.c
    - gplugin-perl-plugin.c
    - )
    -
    - set(GPLUGIN_PERL_HEADERS
    - gplugin-perl-loader.h
    - gplugin-perl-plugin.h
    - )
    -
    - 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)
    - else(PERLLIBS_FOUND)
    - message(FATAL_ERROR "Failed to find the Perl libraries")
    - endif(PERLLIBS_FOUND)
    -endif(BUILD_PERL)
    -
    --- 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 @@
    * API
    *****************************************************************************/
    void
    -gplugin_perl_loader_register(GPluginNativePlugin *plugin) {
    +gplugin_perl_plugin_loader_register(GPluginNativePlugin *plugin) {
    if(g_once_init_enter(&type_real)) {
    GType type = 0;
    @@ -154,7 +154,7 @@
    }
    GType
    -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 get_option('perl')
    + if not get_option('gobject-introspection')
    + error('Perl plugin requires GObject Introspection.')
    + endif
    +
    + GPLUGIN_PERL_SOURCES = [
    + 'gplugin-perl-core.c',
    + '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',
    + GPLUGIN_PERL_SOURCES,
    + GPLUGIN_PERL_HEADERS,
    + c_args : PERL_CFLAGS,
    + link_args : PERL_LDFLAGS,
    + name_prefix : '',
    + dependencies : [gplugin_dep],
    + install : true,
    + install_dir : join_paths(get_option('libdir'), 'gplugin')
    + )
    +endif # perl
    --- 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)
    -endmacro(add_plugin)
    -
    -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',
    + name_prefix : '',
    + dependencies : [gplugin_dep],
    + install : true,
    + 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 @@
    -if(NLS)
    - GETTEXTIZE_TRANSLATIONS(UPDATE)
    -endif(NLS)
    -
    --- /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 @@
    +if get_option('nls')
    +# GETTEXTIZE_TRANSLATIONS(UPDATE)
    +endif
    --- 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 @@
    -option(
    - BUILD_PYTHON
    - "Whether or not to build the Python 3.x plugin loader"
    - "On"
    -)
    -
    -if(BUILD_PYTHON)
    - if(NOT BUILD_GIR)
    - message(FATAL_ERROR "Python plugin requires GObject Introspection.")
    - endif(NOT BUILD_GIR)
    -
    - set(GPLUGIN_PYTHON_SOURCES
    - gplugin-python-core.c
    - gplugin-python-loader.c
    - gplugin-python-plugin.c
    - gplugin-python-utils.c
    - )
    -
    - set(GPLUGIN_PYTHON_HEADERS
    - gplugin-python-loader.h
    - gplugin-python-plugin.h
    - gplugin-python-utils.h
    - )
    -
    - pkg_check_modules(PYTHON3 REQUIRED python3)
    -
    - pkg_check_modules(PYGOBJECT REQUIRED pygobject-3.0>=3.0.0)
    -
    - include_directories(
    - ${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}")
    - endforeach(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
    - CMAKE_FLAGS
    - -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}
    - OUTPUT_VARIABLE OUTPUT
    - 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
    - execute_process(
    - 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
    - ${PYTHON3_LIBRARIES}
    - ${PYGOBJECT_LIBRARIES}
    - gplugin
    - )
    -
    - target_link_libraries(gplugin-python-static
    - ${PYTHON3_LIBRARIES}
    - ${PYGOBJECT_LIBRARIES}
    - gplugin
    - )
    -
    - install(TARGETS gplugin-python DESTINATION ${CMAKE_INSTALL_LIBDIR}/gplugin)
    -endif(BUILD_PYTHON)
    -
    -if(TESTING_ENABLED)
    - add_subdirectory(tests)
    -endif(TESTING_ENABLED)
    -
    --- /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 get_option('python')
    + if not get_option('gobject-introspection')
    + error('Python plugin requires GObject Introspection.')
    + endif
    +
    + 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],
    + name : 'Python GI')
    + if not python_gi_test.compiled() or python_gi_test.returncode() != 0
    + error('pygobject does not work with python3')
    + endif
    +
    + # Now add our libraries
    + gplugin_python_inc = include_directories('.')
    + gplugin_python = shared_library('gplugin-python',
    + GPLUGIN_PYTHON_SOURCES,
    + GPLUGIN_PYTHON_HEADERS,
    + name_prefix : '',
    + dependencies : [PYTHON3, PYGOBJECT, gplugin_dep],
    + install : true,
    + 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,
    + )
    +endif # python
    +
    +if get_option('testing')
    + subdir('tests')
    +endif
    --- 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 @@
    -if(BUILD_PYTHON)
    -
    -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
    -# version for testing
    -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")
    -
    -add_custom_command(
    - 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}
    -)
    -
    -add_custom_command(
    - COMMAND ${XSLTPROC} -o ${GTESTER_PYTHON_JUNIT} --nonet
    - ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl
    - ${GTESTER_PYTHON_LOG}
    - 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}
    -)
    -
    -endif(BUILD_PYTHON)
    -
    --- /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 @@
    +if get_option('python')
    +
    +e = executable('test-python-loader', 'test-python-loader.c',
    + include_directories : include_directories('.'),
    + c_args : [
    + '-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
    +# version for testing
    +e = executable('test-python-utils', 'test-python-utils.c',
    + include_directories : include_directories('.'),
    + c_args : [
    + '-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])
    +test('Python utils', e)
    +
    +endif # python
    --- 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 @@
    GirFFI.setup :GPlugin
    def gplugin_query()
    - return GPlugin::PluginInfo.new(
    - 'ruby/ruby-basic-plugin',
    - 0x01020304,
    - {:name => 'basic plugin'}
    - )
    + return GPlugin::PluginInfo.new({
    + :id => 'ruby/ruby-basic-plugin',
    + :abi_version => 0x01020304,
    + :name => 'basic plugin',
    + })
    end
    def gplugin_load(plugin)
    @@ -24,7 +24,3 @@
    return true
    end
    -
    -i = gplugin_query()
    -puts i.name
    -
    --- /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.h>
    +#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>",
    + NULL
    + };
    +
    + return gplugin_plugin_info_new(
    + "gplugin/tcc-loader",
    + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    + "internal", TRUE,
    + "load-on-query", TRUE,
    + "name", "C source plugin loader",
    + "version", GPLUGIN_VERSION,
    + "license-id", "LGPL2",
    + "summary", "A plugin that can load C source plugins",
    + "description", "This plugin allows the loading of plugins written in C.",
    + "authors", authors,
    + "website", GPLUGIN_WEBSITE,
    + "category", "loaders",
    + NULL
    + );
    +}
    +
    +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());
    +
    + return TRUE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return FALSE;
    +}
    +
    --- /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"
    +
    +#include <glib/gi18n.h>
    +
    +#include <libtcc.h>
    +
    +/******************************************************************************
    + * Globals
    + *****************************************************************************/
    +static GObjectClass *parent_class = NULL;
    +static GType type_real = 0;
    +
    +/******************************************************************************
    + * GPluginLoaderInterface API
    + *****************************************************************************/
    +static GSList *
    +gplugin_tcc_loader_class_supported_extensions(GPLUGIN_UNUSED const GPluginLoaderClass *klass) {
    + GSList *exts = NULL;
    +
    + exts = g_slist_append(exts, "c");
    +
    + return exts;
    +}
    +
    +static GPluginPlugin *
    +gplugin_tcc_loader_query(GPluginLoader *loader, const gchar *filename,
    + GError **error)
    +{
    + GPluginPlugin *plugin = NULL;
    + GPluginPluginInfo *info = NULL;
    + TCCState *s = NULL;
    + gpointer memneeded = NULL;
    + int memsize = -1;
    +
    + GPluginTccPluginQueryFunc gplugin_query = NULL;
    +
    + s = tcc_new();
    +
    + tcc_set_output_type(s, TCC_OUTPUT_MEMORY);
    +
    + if(tcc_add_file(s, filename) == -1) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "couldn't load file %s", filename);
    +
    + tcc_delete(s);
    +
    + return NULL;
    + }
    +
    + /* copy code into memory */
    + if((memsize = tcc_relocate(s, NULL)) < 0) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "couldn't work out how much memory is needed");
    +
    + tcc_delete(s);
    + return NULL;
    + }
    +
    + memneeded = g_malloc0(memsize);
    + if(tcc_relocate(s, memneeded) < 0) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "could not relocate plugin into memory");
    +
    + tcc_delete(s);
    + g_free(memneeded);
    + return NULL;
    + }
    +
    + gplugin_query = (GPluginTccPluginQueryFunc) tcc_get_symbol(s, "gplugin_query");
    + if (gplugin_query == NULL) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_query function found");
    +
    + tcc_delete(s);
    + g_free(memneeded);
    + return NULL;
    + }
    +
    + info = gplugin_query(error);
    + if(info == NULL) {
    + tcc_delete(s);
    + g_free(memneeded);
    + return NULL;
    + }
    +
    + plugin = g_object_new(GPLUGIN_TYPE_TCC_PLUGIN,
    + "filename", filename,
    + "loader", loader,
    + "state", s,
    + "memory", memneeded,
    + "info", info,
    + NULL);
    +
    + return plugin;
    +}
    +
    +static gboolean
    +gplugin_tcc_loader_load(GPLUGIN_UNUSED GPluginLoader *loader,
    + GPluginPlugin *plugin,
    + GError **error)
    +{
    + 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) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_load function found");
    +
    + return FALSE;
    + }
    +
    + return gplugin_load(GPLUGIN_NATIVE_PLUGIN(plugin), error);
    +}
    +
    +static gboolean
    +gplugin_tcc_loader_unload(GPLUGIN_UNUSED GPluginLoader *loader,
    + GPluginPlugin *plugin,
    + GError **error)
    +{
    + 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) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "no gplugin_unload function found");
    +
    + return FALSE;
    + }
    +
    + return gplugin_unload(GPLUGIN_NATIVE_PLUGIN(plugin), error);
    +}
    +
    +/******************************************************************************
    + * GObject Stuff
    + *****************************************************************************/
    +static void
    +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;
    +}
    +
    +/******************************************************************************
    + * API
    + *****************************************************************************/
    +void
    +gplugin_tcc_loader_register(GPluginNativePlugin *plugin) {
    + if(g_once_init_enter(&type_real)) {
    + GType type = 0;
    +
    + 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,
    + GPLUGIN_TYPE_LOADER,
    + "GPluginTccLoader",
    + &info,
    + 0);
    +
    + g_once_init_leave(&type_real, type);
    + }
    +}
    +
    +GType
    +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");
    + }
    +
    + return type_real;
    +}
    +
    --- /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.h>
    +#include <gplugin-native.h>
    +
    +struct _GPluginTccLoader {
    + GPluginLoader parent;
    +
    + 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);
    +};
    +
    +G_BEGIN_DECLS
    +
    +void gplugin_tcc_loader_register(GPluginNativePlugin *plugin);
    +GType gplugin_tcc_loader_get_type(void);
    +
    +G_END_DECLS
    +
    +#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"
    +
    +#include <libtcc.h>
    +
    +#define GPLUGIN_TCC_PLUGIN_GET_PRIVATE(obj) \
    + (G_TYPE_INSTANCE_GET_PRIVATE((obj), GPLUGIN_TYPE_TCC_PLUGIN, GPluginTccPluginPrivate))
    +
    +/******************************************************************************
    + * Typedefs
    + *****************************************************************************/
    +typedef struct {
    + TCCState *s;
    + gpointer mem;
    +} GPluginTccPluginPrivate;
    +
    +/******************************************************************************
    + * Enums
    + *****************************************************************************/
    +enum {
    + PROP_ZERO,
    + PROP_STATE,
    + PROP_MEM,
    + PROP_LAST,
    +};
    +
    +/******************************************************************************
    + * Globals
    + *****************************************************************************/
    +static GObjectClass *parent_class = NULL;
    +static GType type_real = 0;
    +
    +/******************************************************************************
    + * Private Stuff
    + *****************************************************************************/
    +static void
    +gplugin_tcc_plugin_set_state(GPluginTccPlugin *plugin, TCCState *s) {
    + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin);
    +
    + priv->s = s;
    +}
    +
    +static void
    +gplugin_tcc_plugin_set_memory(GPluginTccPlugin *plugin, gpointer mem) {
    + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin);
    +
    + priv->mem = mem;
    +}
    +
    +/******************************************************************************
    + * Object Stuff
    + *****************************************************************************/
    +static void
    +gplugin_tcc_plugin_get_property(GObject *obj, guint param_id, GValue *value,
    + GParamSpec *pspec)
    +{
    + GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj);
    +
    + switch(param_id) {
    + case PROP_STATE:
    + g_value_set_pointer(value,
    + gplugin_tcc_plugin_get_state(plugin));
    + break;
    + default:
    + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
    + break;
    + }
    +}
    +
    +static void
    +gplugin_tcc_plugin_set_property(GObject *obj, guint param_id,
    + const GValue *value, GParamSpec *pspec)
    +{
    + GPluginTccPlugin *plugin = GPLUGIN_TCC_PLUGIN(obj);
    +
    + switch(param_id) {
    + case PROP_STATE:
    + gplugin_tcc_plugin_set_state(plugin,
    + g_value_get_pointer(value));
    + break;
    + case PROP_MEM:
    + gplugin_tcc_plugin_set_memory(plugin,
    + g_value_get_pointer(value));
    + break;
    + default:
    + G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec);
    + break;
    + }
    +}
    +
    +static void
    +gplugin_tcc_plugin_finalize(GObject *obj) {
    + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(obj);
    +
    + if(priv->s)
    + tcc_delete(priv->s);
    +
    + if(priv->mem)
    + g_free(priv->mem);
    +
    + G_OBJECT_CLASS(parent_class)->finalize(obj);
    +}
    +
    +static void
    +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));
    +}
    +
    +/******************************************************************************
    + * API
    + *****************************************************************************/
    +void
    +gplugin_tcc_plugin_register(GPluginNativePlugin *plugin) {
    + if(g_once_init_enter(&type_real)) {
    + GType type = 0;
    +
    + 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,
    + GPLUGIN_TYPE_PLUGIN,
    + "GPluginTccPlugin",
    + &info,
    + 0);
    +
    + g_once_init_leave(&type_real, type);
    + }
    +}
    +
    +GType
    +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");
    + }
    +
    + return type_real;
    +}
    +
    +TCCState *
    +gplugin_tcc_plugin_get_state(const GPluginTccPlugin *plugin) {
    + GPluginTccPluginPrivate *priv = GPLUGIN_TCC_PLUGIN_GET_PRIVATE(plugin);
    +
    + return priv->s;
    +}
    +
    --- /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.h>
    +#include <gplugin-native.h>
    +
    +#include <libtcc.h>
    +
    +struct _GPluginTccPlugin {
    + GPluginPlugin parent;
    +};
    +
    +struct _GPluginTccPluginClass {
    + GPluginPluginClass parent;
    +
    + void (*_gplugin_reserved_1)(void);
    + void (*_gplugin_reserved_2)(void);
    + void (*_gplugin_reserved_3)(void);
    + void (*_gplugin_reserved_4)(void);
    +};
    +
    +G_BEGIN_DECLS
    +
    +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);
    +
    +G_END_DECLS
    +
    +#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 @@
    +if get_option('tcc')
    + GPLUGIN_TCC_SOURCES = [
    + 'gplugin-tcc-core.c',
    + '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')
    + endif
    + TCC = compiler.find_library('tcc')
    +
    + gplugin_tcc = shared_library('gplugin-tcc',
    + GPLUGIN_TCC_SOURCES,
    + GPLUGIN_TCC_HEADERS,
    + name_prefix : '',
    + dependencies : [TCC, gplugin_dep],
    + install : true,
    + install_dir : join_paths(get_option('libdir'), 'gplugin')
    + )
    +endif # tcc
    +
    +if get_option('testing')
    + subdir('tests')
    +endif
    --- /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 @@
    +if get_option('tcc')
    +
    +e = executable('test-tcc-loader', 'test-tcc-loader.c',
    + c_args : [
    + '-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])
    +test('TCC Loader', e)
    +
    +endif # tcc
    --- /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.h>
    +#include <gplugin-native.h>
    +
    +G_MODULE_EXPORT GPluginPluginInfo *
    +gplugin_query(GPLUGIN_UNUSED GError **error) {
    + const gchar * const authors[] = {
    + "author1",
    + NULL
    + };
    +
    + return gplugin_plugin_info_new(
    + "gplugin/native-basic-plugin",
    + 0x01020304,
    + "name", "basic plugin",
    + "category", "test",
    + "version", "version",
    + "summary", "summary",
    + "license-id", "license",
    + "description", "description",
    + "authors", authors,
    + "website", "website",
    + NULL
    + );
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    --- /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.h>
    +#include <gplugin-native.h>
    +
    +G_MODULE_EXPORT GPluginPluginInfo *
    +gplugin_query(GPLUGIN_UNUSED GError **error) {
    + const gchar * const dependencies[] = {
    + "dependency1",
    + "dependency2",
    + NULL
    + };
    +
    + return gplugin_plugin_info_new(
    + "gplugin/native-dependent-plugin",
    + GPLUGIN_NATIVE_PLUGIN_ABI_VERSION,
    + "dependencies", dependencies,
    + NULL
    + );
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    --- /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.h>
    +#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,
    + NULL
    + );
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return FALSE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    --- /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.h>
    +#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,
    + NULL
    + );
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin, GError **error) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "expected error");
    +
    + return FALSE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    --- /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.h>
    +#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,
    + NULL
    + );
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_load(GPLUGIN_UNUSED GPluginNativePlugin *plugin,
    + GPLUGIN_UNUSED GError **error)
    +{
    + return TRUE;
    +}
    +
    +G_MODULE_EXPORT gboolean
    +gplugin_unload(GPLUGIN_UNUSED GPluginNativePlugin *plugin, GError **error) {
    + if(error)
    + *error = g_error_new(GPLUGIN_DOMAIN, 0, "expected error");
    +
    + return FALSE;
    +}
    +
    --- /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 <glib.h>
    +#include <gplugin.h>
    +
    +#include <gplugin/gplugin-loader-tests.h>
    +
    +gint
    +main(gint argc, gchar **argv) {
    + g_test_init(&argc, &argv, NULL);
    +
    + gplugin_loader_tests_main(TCC_LOADER_DIR, TCC_PLUGIN_DIR, "c");
    +
    + return g_test_run();
    +}
    +
    --- 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 @@
    -#! /usr/bin/perl
    -
    -use warnings;
    -use File::Basename;
    -use Safe;
    -
    -# glib-mkenums.pl
    -# 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
    -
    -sub parse_trigraph {
    - my $opts = shift;
    - my @opts;
    -
    - for $opt (split /\s*,\s*/, $opts) {
    - $opt =~ s/^\s*//;
    - $opt =~ s/\s*$//;
    - my ($key,$val) = $opt =~ /(\w+)(?:=(.+))?/;
    - defined $val or $val = 1;
    - push @opts, $key, $val;
    - }
    - @opts;
    -}
    -sub parse_entries {
    - my $file = shift;
    - my $file_name = shift;
    - my $looking_for_name = 0;
    -
    - while (<$file>) {
    - # read lines until we have no open comments
    - while (m@/\*([^*]|\*(?!/))*$@) {
    - my $new;
    - defined ($new = <$file>) || die "Unmatched comment in $ARGV";
    - $_ .= $new;
    - }
    - # strip comments w/o options
    - s@/\*(?!<)
    - ([^*]+|\*(?!/))*
    - \*/@@gx;
    -
    - # strip newlines
    - s@\n@ @;
    -
    - # skip empty lines
    - next if m@^\s*$@;
    -
    - if ($looking_for_name) {
    - if (/^\s*(\w+)/) {
    - $enumname = $1;
    - return 1;
    - }
    - }
    -
    - # Handle include files
    - if (/^\#include\s*<([^>]*)>/ ) {
    - my $file= "../$1";
    - open NEWFILE, $file or die "Cannot open include file $file: $!\n";
    -
    - if (parse_entries (\*NEWFILE, $NEWFILE)) {
    - return 1;
    - } else {
    - next;
    - }
    - }
    -
    - if (/^\s*\}\s*(\w+)/) {
    - $enumname = $1;
    - $enumindex++;
    - return 1;
    - }
    -
    - if (/^\s*\}/) {
    - $enumindex++;
    - $looking_for_name = 1;
    - next;
    - }
    -
    - if (m@^\s*
    - (\w+)\s* # name
    - (?:=( # value
    - \s*\w+\s*\(.*\)\s* # macro with multiple args
    - | # OR
    - (?:[^,/]|/(?!\*))* # anything but a comma or comment
    - ))?,?\s*
    - (?:/\*< # options
    - (([^*]|\*(?!/))*)
    - >\s*\*/)?,?
    - \s*$
    - @x) {
    - my ($name, $value, $options) = ($1,$2,$3);
    -
    - if (!defined $flags && defined $value && $value =~ /<</) {
    - $seenbitshift = 1;
    - }
    -
    - if (defined $options) {
    - my %options = parse_trigraph($options);
    - if (!defined $options{skip}) {
    - push @entries, [ $name, $value, $options{nick} ];
    - }
    - } else {
    - push @entries, [ $name, $value ];
    - }
    - } elsif (m@^\s*\#@) {
    - # ignore preprocessor directives
    - } else {
    - print STDERR "$0: $file_name:$.: Failed to parse `$_'\n";
    - }
    - }
    -
    - return 0;
    -}
    -
    -sub version {
    - 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";
    - exit 0;
    -}
    -sub usage {
    - print "Usage:\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";
    - exit 0;
    -}
    -
    -# production variables:
    -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 ($file) = @_;
    - my %tmpl = ('file-header', $fhead,
    - 'file-production', $fprod,
    - 'file-tail', $ftail,
    - 'enumeration-production', $eprod,
    - 'value-header', $vhead,
    - 'value-production', $vprod,
    - 'value-tail', $vtail,
    - 'comment', $comment_tmpl);
    - my $in = 'junk';
    - open (FILE, $file) || die "Can't open $file: $!\n";
    - while (<FILE>) {
    - if (/^\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\//) {
    - if (($in eq 'junk') && ($1 eq 'BEGIN') && (exists($tmpl{$2}))) {
    - $in = $2;
    - next;
    - }
    - elsif (($in eq $2) && ($1 eq 'END') && (exists($tmpl{$2}))) {
    - $in = 'junk';
    - next;
    - } else {
    - die "Malformed template file $file\n";
    - }
    - }
    - if (!($in eq 'junk')) {
    - $tmpl{$in} .= $_;
    - }
    - }
    - close (FILE);
    - 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]) {
    - usage;
    -}
    -while ($_=$ARGV[0],/^-/) {
    - shift;
    - last if /^--$/;
    - 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; }
    - else { usage; }
    - 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";
    -}
    -
    -if (length($fhead)) {
    - my $prod = $fhead;
    - 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;
    - chomp ($prod);
    -
    - print "$prod\n";
    -}
    -
    -while (<>) {
    - if (eof) {
    - close (ARGV); # reset line numbering
    - $firstenum = 1; # Flag to print filename at next enum
    - }
    -
    - # read lines until we have no open comments
    - while (m@/\*([^*]|\*(?!/))*$@) {
    - my $new;
    - defined ($new = <>) || die "Unmatched comment in $ARGV";
    - $_ .= $new;
    - }
    - # strip comments w/o options
    - s@/\*(?!<)
    - ([^*]+|\*(?!/))*
    - \*/@@gx;
    -
    - # ignore forward declarations
    - next if /^\s*typedef\s+enum.*;/;
    -
    - if (m@^\s*typedef\s+enum\s*
    - ({)?\s*
    - (?:/\*<
    - (([^*]|\*(?!/))*)
    - >\s*\*/)?
    - \s*({)?
    - @x) {
    - if (defined $2) {
    - 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};
    - } else {
    - $enum_prefix = undef;
    - $flags = undef;
    - $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;
    - } else {
    - 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) {
    - while (<>) {
    - if (eof) {
    - die "Hit end of file while parsing enum in $ARGV";
    - }
    - if (s/^\s*\{//) {
    - last;
    - }
    - }
    - }
    -
    - $seenbitshift = 0;
    - @entries = ();
    -
    - # Now parse the entries
    - parse_entries (\*ARGV, $ARGV);
    -
    - # figure out if this was a flags or enums enumeration
    - if (!defined $flags) {
    - $flags = $seenbitshift;
    - }
    -
    - # Autogenerate a prefix
    - if (!defined $enum_prefix) {
    - for (@entries) {
    - my $nick = $_->[2];
    - if (!defined $nick) {
    - my $name = $_->[0];
    - if (defined $enum_prefix) {
    - my $tmp = ~ ($name ^ $enum_prefix);
    - ($tmp) = $tmp =~ /(^\xff*)/;
    - $enum_prefix = $enum_prefix & $tmp;
    - } else {
    - $enum_prefix = $name;
    - }
    - }
    - }
    - if (!defined $enum_prefix) {
    - $enum_prefix = "";
    - } else {
    - # Trim so that it ends in an underscore
    - $enum_prefix =~ s/_[^_]*$/_/;
    - }
    - } else {
    - # 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};
    - if (!defined $nick) {
    - ($nick = $name) =~ s/^$enum_prefix//;
    - $nick =~ tr/_/-/;
    - $nick = lc($nick);
    - @{$entry} = ($name, $num, $nick);
    - }
    - }
    -
    -
    - # Spit out the output
    - 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 = $enumname;
    - $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;
    - }
    - } else {
    - $enumshort = $enumname;
    - if ($idprefix) {
    - $enumshort =~ s/^${idprefix}//;
    - } else {
    - $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);
    - }
    -
    - if ($firstenum) {
    - $firstenum = 0;
    -
    - if (length($fprod)) {
    - my $prod = $fprod;
    - 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;
    - chomp ($prod);
    -
    - print "$prod\n";
    - }
    - }
    -
    - if (length($eprod)) {
    - my $prod = $eprod;
    -
    - $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;
    - chomp ($prod);
    -
    - print "$prod\n";
    - }
    -
    - if (length($vhead)) {
    - my $prod = $vhead;
    -
    - $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;
    - chomp ($prod);
    -
    - print "$prod\n";
    - }
    -
    - if (length($vprod)) {
    - my $prod = $vprod;
    - my $next_num = 0;
    -
    - $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;
    - for (@entries) {
    - my ($name,$num,$nick) = @{$_};
    - my $tmp_prod = $prod;
    -
    - if ($prod =~ /\@valuenum\@/) {
    - # only attempt to eval the value if it is requested
    - # this prevents us from throwing errors otherwise
    - if (defined $num) {
    - # 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'";
    - }
    - } else {
    - $num = $next_num;
    - }
    -
    - $tmp_prod =~ s/\@valuenum\@/$num/g;
    - $next_num = $num + 1;
    - }
    -
    - $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; }
    - chomp ($tmp_prod);
    -
    - print "$tmp_prod\n";
    - }
    - }
    -
    - if (length($vtail)) {
    - my $prod = $vtail;
    -
    - $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;
    - chomp ($prod);
    -
    - print "$prod\n";
    - }
    - }
    -}
    -
    -if (length($ftail)) {
    - my $prod = $ftail;
    - 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;
    - chomp ($prod);
    -
    - print "$prod\n";
    -}
    -
    -# 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)"/>