Add preliminary meson build.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin-gtk/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,119 @@
+############################################################################### +############################################################################### +GTK3 = dependency('gtk+-3.0', version : '>=3.0.0') +GPLUGIN_GTK_LD_CURRENT = 0 +GPLUGIN_GTK_LD_REVISION = 1 +GPLUGIN_GTK_LD_VERSION = '@0@.@1@.@2@'.format( + GPLUGIN_GTK_LD_CURRENT, + GPLUGIN_GTK_LD_REVISION, + 'gplugin-gtk-plugin-info.c', + 'gplugin-gtk-plugin-info.h', +GPLUGIN_GTK_PRIVATE_SOURCES = [ +GPLUGIN_GTK_PRIVATE_HEADERS = [ +GPLUGIN_GTK_BUILT_SOURCES = [ +GPLUGIN_GTK_BUILT_HEADERS = [ +############################################################################### +############################################################################### +GPLUGIN_GTK_H_INCLUDES = '' +foreach header : GPLUGIN_GTK_HEADERS + GPLUGIN_GTK_H_INCLUDES = '@0@\n#include <gplugin-gtk/@1@>'.format( + GPLUGIN_GTK_H_INCLUDES, +conf = configuration_data() +conf.set('GPLUGIN_GTK_H_INCLUDES', GPLUGIN_GTK_H_INCLUDES) +gplugin_gtk_h = configure_file( + input : 'gplugin-gtk.h.in', + output : 'gplugin-gtk.h', + install_dir : get_option('includedir') + '/gplugin-1.0') + input : 'gplugin-gtk.pc.in', + output : 'gplugin-gtk.pc', + install_dir : get_option('libdir') + '/pkgconfig') +############################################################################### +############################################################################### +gplugin_gtk = shared_library('gplugin-gtk', + GPLUGIN_GTK_PRIVATE_SOURCES, + GPLUGIN_GTK_PRIVATE_HEADERS, + GPLUGIN_GTK_BUILT_SOURCES, + GPLUGIN_GTK_BUILT_HEADERS, + c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_DOMAIN="GPluginGtk"'], + include_directories : toplevel_inc, + dependencies : [gplugin_dep, GTK3], + soversion : GPLUGIN_GTK_LD_CURRENT, + version : GPLUGIN_GTK_LD_VERSION, +# install the normal includes into the gplugin-gtk subdirectory + subdir : 'gplugin-1.0/gplugin-gtk' +# install the GtkBuilder files + 'gplugin-gtk-plugin-info.ui', + install_dir : get_option('datadir') + '/gplugin/gplugin-gtk/' +############################################################################### +############################################################################### +gplugin_gtk_viewer = executable('gplugin-gtk-viewer', + 'gplugin-gtk-viewer.c', + link_with : [gplugin_gtk], + dependencies : [gplugin_dep, GTK3], +if get_option('help2man') + gplugin_gtk_viewer_man = custom_target('gplugin-gtk-viewer.1', + '--name=View installed plugins', '--section=1', + '--help-option=--help-all', + '--output', '@OUTPUT@', + output : 'gplugin-gtk-viewer.1', + install_dir : get_option('mandir') + '/man1') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,281 @@
+############################################################################### +############################################################################### +GPLUGIN_LD_VERSION = '@0@.@1@.@2@'.format( + 'gplugin-plugin-info.h', + 'gplugin-plugin-info.c', +GPLUGIN_PUBLIC_BUILT_HEADERS = [ +GPLUGIN_PUBLIC_BUILT_SOURCES = [ +GPLUGIN_PRIVATE_HEADERS = [ +GPLUGIN_PRIVATE_SOURCES = [ +GPLUGIN_PRIVATE_BUILT_HEADERS = [ +GPLUGIN_PRIVATE_BUILT_SOURCES = [ +GPLUGIN_NATIVE_HEADERS = [ + 'gplugin-native-plugin.h', + 'gplugin-native-loader.h', +GPLUGIN_NATIVE_SOURCES = [ + 'gplugin-native-plugin.c', + 'gplugin-native-loader.c', +############################################################################### +# gplugin-enum.[ch] generation +############################################################################### +enums_h = gnome.mkenums('gplugin-enums.h', + sources : ENUM_HEADERS, + template : 'gplugin-enums.h.tmpl', + identifier_prefix : 'GPlugin', + install_dir : get_option('includedir') + '/gplugin-1.0/gplugin') +enums_c = gnome.mkenums('gplugin-enums.c', + sources : ENUM_HEADERS, + template : 'gplugin-enums.c.tmpl', + identifier_prefix : 'GPlugin') +GPLUGIN_PUBLIC_BUILT_HEADERS += [ +GPLUGIN_PUBLIC_BUILT_SOURCES += [ +############################################################################### +# gplugin-marshallers.[ch] generation +############################################################################### +marshallers = gnome.genmarshal('gplugin-marshallers', + sources : 'gplugin-marshallers.list', + prefix : 'gplugin_marshal') +marshallers_c = marshallers[0] +marshallers_h = marshallers[1] +GPLUGIN_PRIVATE_BUILT_HEADERS += [ +GPLUGIN_PRIVATE_BUILT_SOURCES += [ +############################################################################## +############################################################################### +PRIVATE_HEADERS = GPLUGIN_PRIVATE_HEADERS + GPLUGIN_PRIVATE_BUILT_HEADERS + ['gplugin-private.h', 'gplugin-native-private.h'] +############################################################################### +############################################################################### +gplugin_version_h = configure_file( + input : 'gplugin-version.h.in', + output : 'gplugin-version.h', + configuration : version_conf, + install_dir : get_option('includedir') + '/gplugin-1.0/gplugin') +GPLUGIN_PUBLIC_BUILT_HEADERS += [ + input : 'gplugin.pc.in', + configuration : version_conf, + install_dir : get_option('libdir') + '/pkgconfig') + input : 'gplugin-uninstalled.pc.in', + output : 'gplugin-uninstalled.pc', + configuration : version_conf) +foreach header : GPLUGIN_HEADERS + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( +foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS + GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( +conf = configuration_data() +conf.set('GPLUGIN_H_INCLUDES', GPLUGIN_H_INCLUDES) +gplugin_h = configure_file( + input : 'gplugin.h.in', + install_dir : get_option('includedir') + '/gplugin-1.0') +# Build gplugin-native.h +GPLUGIN_NATIVE_H_INCLUDES = '' +foreach header : GPLUGIN_NATIVE_HEADERS + GPLUGIN_NATIVE_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format( + GPLUGIN_NATIVE_H_INCLUDES, +conf = configuration_data() +conf.set('GPLUGIN_NATIVE_H_INCLUDES', GPLUGIN_NATIVE_H_INCLUDES) +gplugin_native_h = configure_file( + input : 'gplugin-native.h.in', + output : 'gplugin-native.h', + install_dir : get_option('includedir') + '/gplugin-1.0') +############################################################################### +############################################################################### +gplugin = shared_library('gplugin', + GPLUGIN_NATIVE_SOURCES, + GPLUGIN_PUBLIC_BUILT_SOURCES, + GPLUGIN_PRIVATE_SOURCES, + GPLUGIN_PRIVATE_BUILT_SOURCES, + GPLUGIN_NATIVE_HEADERS, + GPLUGIN_PUBLIC_BUILT_HEADERS, + c_args : ['-DGPLUGIN_COMPILATION', '-DG_LOG_DOMAIN="GPlugin"'], + include_directories : toplevel_inc, + dependencies : [GLIB, GOBJECT, GMODULE], + soversion : GPLUGIN_LD_CURRENT, + version : GPLUGIN_LD_VERSION, +gplugin_dep = declare_dependency( + include_directories : [toplevel_inc, include_directories('.')], + dependencies : [GLIB, GOBJECT] +# SOURCES ${GPLUGIN_SOURCES} ${GPLUGIN_NATIVE_SOURCES} gplugin-query.c +# BUILT_SOURCES ${GPLUGIN_PUBLIC_BUILT_SOURCES} +############################################################################### +# gplugin-query executable +############################################################################### +gplugin_query = executable('gplugin-query', + dependencies : [gplugin_dep, GLIB, GOBJECT], +if get_option('help2man') + custom_target('gplugin-query.1', + '--name=Query installed plugins', '--section=1', + '--help-option=--help-all', + '--output', '@OUTPUT@', + output : 'gplugin-query.1', + install_dir : get_option('mandir') + '/man1') +############################################################################### +# loader-tests static library +############################################################################### +gplugin_loader_tests = static_library('gplugin-loader-tests', + 'gplugin-loader-tests.c', + 'gplugin-loader-tests.h', + c_args : ['-DGI_TYPELIB_PATH="@0@"'.format(meson.current_build_dir())], + dependencies : [gplugin_dep], +############################################################################### +############################################################################### +if get_option('gobject-introspection') + gplugin_gir = gnome.generate_gir(gplugin, + sources : GPLUGIN_SOURCES + GPLUGIN_HEADERS + + GPLUGIN_PUBLIC_BUILT_SOURCES + + GPLUGIN_PUBLIC_BUILT_HEADERS, + includes : ['GModule-2.0', 'GObject-2.0'], + symbol_prefix : 'gplugin', + nsversion : '@0@.0'.format(GPLUGIN_MAJOR_VERSION), +# # For loader plugin tests dependencies +# set(GPLUGIN_GIR_TARGETS ${GPLUGIN_GIR_TARGETS} PARENT_SCOPE) +############################################################################### +############################################################################### +# install the normal includes into the gplugin subdirectory + GPLUGIN_NATIVE_HEADERS, + subdir : 'gplugin-1.0/gplugin' +############################################################################### +############################################################################### +if get_option('testing') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/bad-plugins/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,3 @@
+shared_library('query-error', 'query-error.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/bind-local/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,3 @@
+shared_library('bind-local', 'bind-local.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/dynamic-type/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,10 @@
+dynamic_type_provider = shared_library('dynamic-type-provider', + 'dynamic-type-provider.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('dynamic-type-user', 'dynamic-type-user.c', + # FIXME: Only here because meson defaults to -Wl,--no-undefined. + link_with : [dynamic_type_provider], + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/id-collision/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,7 @@
+shared_library('id-collision1', 'id-collision1.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('id-collision2', 'id-collision2.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/load-on-query-fail/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,3 @@
+shared_library('load-on-query-fail', 'load-on-query-fail.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/load-on-query-pass/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,3 @@
+shared_library('load-on-query-pass', 'load-on-query-pass.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,182 @@
+############################################################################### +############################################################################### +subdir('load-on-query-pass') +subdir('load-on-query-fail') +subdir('versioned-dependencies') +############################################################################### +############################################################################### +####################################### +# Simple Tests (single file) +####################################### +e = executable('test-core', 'test-core.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-option-group', 'test-option-group.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-plugin-manager-paths', 'test-plugin-manager-paths.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Plugin Manager Paths', e) +e = executable('test-plugin-info', 'test-plugin-info.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-signals', 'test-signals.c', + c_args : ['-DTEST_DIR="@0@/plugins/"'.format(meson.current_build_dir())], + dependencies : [gplugin_dep, GLIB, GOBJECT]) +e = executable('test-version-compare', 'test-version-compare.c', + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Version Compare', e) +####################################### +####################################### +e = executable('test-dynamic-type', 'test-dynamic-type.c', + '-DTEST_DYNAMIC_DIR="@0@/dynamic-type/"'.format( + meson.current_build_dir()) + dependencies : [gplugin_dep, GLIB, GOBJECT]) +#add_dependencies(test-dynamic-type dynamic-type-provider dynamic-type-user) +####################################### +####################################### +e = executable('test-id-collision', 'test-id-collision.c', + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +#add_dependencies(test-id-collision id-collision1 id-collision2) +####################################### +####################################### +e = executable('test-load-on-query', 'test-load-on-query.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_LOAD_ON_QUERY_PASS_DIR="@0@/load-on-query-pass"'.format( + meson.current_build_dir()), + '-DTEST_LOAD_ON_QUERY_FAIL_DIR="@0@/load-on-query-fail"'.format( + meson.current_build_dir()) + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Load On Query', e) +#add_dependencies(test-load-on-query load-on-query-pass load-on-query-fail) +####################################### +# Versioned Dependencies +####################################### +e = executable('test-versioned-dependencies', 'test-versioned-dependencies.c', + '-DTEST_VERSIONED_DEPENDENCY_DIR="@0@/versioned-dependencies"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Versioned Dependencies', e) +#add_dependencies(test-versioned-dependencies +####################################### +####################################### +e = executable('test-native-loader', 'test-native-loader.c', + '-DTEST_DIR="@0@/plugins/"'.format( + meson.current_build_dir()), + '-DTEST_BAD_DIR="@0@/bad-plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + link_with : gplugin_loader_tests, + dependencies : [gplugin_dep, GLIB, GOBJECT]) +test('Native Loader', e) +#add_dependencies(test-native-loader +# broken-dependent-plugin +############################################################################### +############################################################################### +e = executable('test-bind-local', 'test-bind-local.c', + '-DTEST_BIND_LOCAL_DIR="@0@/bind-local/"'.format( + meson.current_build_dir()), + '-DTEST_BAD_DIR="@0@/bad-plugins/"'.format( + meson.current_build_dir()), + '-DTEST_ID_DIR="@0@/id-collision/"'.format( + meson.current_build_dir()), + dependencies : [gplugin_dep, GLIB, GOBJECT]) +#add_dependencies(test-bind-local bind-local) +############################################################################### +############################################################################### +#set(GTESTER_TESTS "${TESTS}") +#set(GTESTER_LOG "testgplugin.xml") +#set(GTESTER_JUNIT "testgplugin-junit.xml") +# COMMAND ${GTESTER} -k --verbose -o ${GTESTER_LOG} ${GTESTER_TESTS} +# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +# COMMAND ${XSLTPROC} -o ${GTESTER_JUNIT} --nonet +# ${CMAKE_SOURCE_DIR}/xsl/gtester-junit.xsl +# OUTPUT ${GTESTER_JUNIT} +# DEPENDS ${GTESTER_LOG} +# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +#add_custom_target(tests ALL +# DEPENDS ${GTESTER_LOG} ${GTESTER_JUNIT} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/plugins/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,23 @@
+shared_library('basic-plugin', 'basic-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('dependent-plugin', 'dependent-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('broken-dependent-plugin', 'broken-dependent-plugin.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('load-failed', 'load-failed.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('load-exception', 'load-exception.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('unload-failed', 'unload-failed.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/versioned-dependencies/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,43 @@
+shared_library('super-dependent', 'super-dependent.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('no-version', 'no-version.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('exact1', 'exact1.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('exact2', 'exact2.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('greater', 'greater.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('greater-equal', 'greater-equal.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('less', 'less.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('less-equal', 'less-equal.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('bar', 'bar.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('baz', 'baz.c', + dependencies : [gplugin_dep, GLIB]) +shared_library('fez', 'fez.c', + dependencies : [gplugin_dep, GLIB]) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,54 @@
+ if not get_option('gobject-introspection') + error('Lua plugin requires GObject Introspection.') + GPLUGIN_LUA_SOURCES = [ + 'gplugin-lua-loader.c', + 'gplugin-lua-plugin.c', + GPLUGIN_LUA_HEADERS = [ + 'gplugin-lua-loader.h', + 'gplugin-lua-plugin.h', + _LUAS = [['lua', '>=5.1.0'], + LUA = dependency(_LUA[0], version : _LUA[1], required : false) + LUA_FOUND = LUA.found() + error('No usable Lua library was found') + # Compile and run our lua-lgi test program + lua_lgi_test = compiler.run(files('gplugin-lua-test-lgi.c'), + name : 'lua "lgi" module') + if not lua_lgi_test.compiled() or lua_lgi_test.returncode() != 0 +# error('Failed to find the "lgi" lua module') + shared_library('gplugin-lua', + dependencies : [LUA, gplugin_dep], + install_dir : get_option('libdir') + '/gplugin' +if get_option('testing') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lua/tests/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,29 @@
+e = executable('test-lua-loader', 'test-lua-loader.c', + '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()), + '-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format( + meson.current_source_dir()), + '-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format( + meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, LUA, gplugin_dep]) +if get_option('moonscript-tests') + e = executable('test-lua-moon-loader', 'test-lua-moon-loader.c', + '-DLUA_LOADER_DIR="@0@/lua"'.format(meson.build_root()), + '-DLUA_PLUGIN_DIR="@0@/lua-plugins"'.format( + meson.current_source_dir()), + '-DMOONSCRIPT_PLUGIN_DIR="@0@/moonscript-plugins"'.format( + meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, LUA, gplugin_dep]) + test('Lua Moon Loader', e) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,145 @@
+############################################################################### +############################################################################### +project('gplugin', 'c', meson_version : '>0.34.0', + default_options : ['c_std=c99']) +GPLUGIN_MAJOR_VERSION = 0 +GPLUGIN_MINOR_VERSION = 25 +GPLUGIN_MICRO_VERSION = 0 +GPLUGIN_EXTRA_VERSION = '' +GPLUGIN_VERSION = '@0@.@1@.@2@@3@'.format( +version_conf = configuration_data() +version_conf.set('GPLUGIN_MAJOR_VERSION', GPLUGIN_MAJOR_VERSION) +version_conf.set('GPLUGIN_MINOR_VERSION', GPLUGIN_MINOR_VERSION) +version_conf.set('GPLUGIN_MICRO_VERSION', GPLUGIN_MICRO_VERSION) +version_conf.set('GPLUGIN_EXTRA_VERSION', GPLUGIN_EXTRA_VERSION) +version_conf.set('GPLUGIN_VERSION', GPLUGIN_VERSION) +LOCALE_DIR = get_option('prefix') + '/locale' +add_global_arguments('-DLOCALEDIR="@0@"'.format(LOCALE_DIR), language : 'c') +############################################################################### +############################################################################### +if get_option('help2man') + help2man = find_program('help2man') +GLIB = dependency('glib-2.0', version : '>=2.32.0') +GOBJECT = dependency('gobject-2.0') +# we separate gmodule out so our test aren't linked to it +GMODULE = dependency('gmodule-2.0') +if get_option('testing') + GTESTER = find_program('gtester') + XSLTPROC = find_program('xsltproc') +############################################################################### +############################################################################### +GETTEXT_PACKAGE = 'gplugin' +add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(GETTEXT_PACKAGE), +############################################################################### +############################################################################### +compiler = meson.get_compiler('c') + '-DPREFIX="@0@"'.format(get_option('prefix')), + '-DLIBDIR="@0@"'.format(get_option('libdir')), + '-DGPLUGIN_WEBSITE="http://bitbucket.org/gplugin/main"', +if compiler.has_argument('-Wformat') + add_global_arguments('-Wformat', language : 'c') + if compiler.compiles('int i;\n', + name : '-Werror=format-security', + args : ['-Wformat', '-Werror=format-security']) + add_global_arguments('-Werror=format-security', language : 'c') +# check if we're using gcc +if compiler.get_id() == 'gcc' + '-DGPLUGIN_UNUSED=__attribute__((unused))', +toplevel_inc = include_directories('.') +############################################################################### +############################################################################### +############################################################################### +############################################################################### +install_data('ChangeLog', 'INSTALL', 'README', 'HACKING', + install_dir : get_option('datadir')) +############################################################################### +############################################################################### +# gplugin-${GPLUGIN_VERSION}.tar.bz2 +# gplugin-${GPLUGIN_VERSION}.tar.gz +# gplugin-${GPLUGIN_VERSION}.zip +#foreach(ARCHIVE ${ARCHIVES}) +# COMMAND hg archive ${ARCHIVE} +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +# COMMAND gpg --yes -abs ${ARCHIVE} +# WORKING_DIRECTORY ${CMAKE_BINARY_DIR} +# list(APPEND SIGNATURES ${ARCHIVE}.asc) +#add_custom_target(dist DEPENDS ${ARCHIVES} ${SIGNATURES}) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meson_options.txt Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,56 @@
+############################################################################### +############################################################################### + 'gobject-introspection', + type : 'boolean', value : true, + description : 'Whether or not to build a GObject Introspection type library' + type : 'boolean', value : true, + description : 'Install translation files' + type : 'boolean', value : true, + description : 'Whether or not to run unit tests while compiling' + type : 'boolean', value : true, + description : 'Whether or not to build man pages from --help output' + type : 'boolean', value : true, + description : 'Whether or not to build the gtk3 library' + type : 'boolean', value : true, + description : 'Whether or not to build the Lua plugin loader' + type : 'boolean', value : false, + description : 'Whether or not to run the moonscript tests' + type : 'boolean', value : false, + description : 'Whether or not to build the Perl plugin loader' + type : 'boolean', value : true, + description : 'Whether or not to build the Python 3.x plugin loader' --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/perl/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,37 @@
+ if not get_option('gobject-introspection') + error('Perl plugin requires GObject Introspection.') + GPLUGIN_PERL_SOURCES = [ + 'gplugin-perl-loader.c', + 'gplugin-perl-plugin.c', + GPLUGIN_PERL_HEADERS = [ + 'gplugin-perl-loader.h', + 'gplugin-perl-plugin.h', + PERL = find_program('perl') + PERL_CFLAGS = run_command(PERL, '-MExtUtils::Embed', '-e', 'ccopts').stdout() + PERL_LDFLAGS = run_command(PERL, '-MExtUtils::Embed', '-e', 'ldopts').stdout() + message('PERL_CFLAGS ' + PERL_CFLAGS) + message('PERL_LDFLAGS ' + PERL_LDFLAGS) + PERL_CFLAGS = PERL_CFLAGS.split() + PERL_LDFLAGS = PERL_LDFLAGS.split() + shared_library('gplugin-perl', + link_args : PERL_LDFLAGS, + dependencies : [gplugin_dep], + install_dir : get_option('libdir') + '/gplugin' --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,6 @@
+shared_library('gplugin-license-check', + 'gplugin-license-check.c', + dependencies : [gplugin_dep], + install_dir : get_option('libdir') + '/gplugin') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/po/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,3 @@
+# GETTEXTIZE_TRANSLATIONS(UPDATE) --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,59 @@
+ if not get_option('gobject-introspection') + error('Python plugin requires GObject Introspection.') + GPLUGIN_PYTHON_SOURCES = [ + 'gplugin-python-core.c', + 'gplugin-python-loader.c', + 'gplugin-python-plugin.c', + 'gplugin-python-utils.c', + GPLUGIN_PYTHON_HEADERS = [ + 'gplugin-python-loader.h', + 'gplugin-python-plugin.h', + 'gplugin-python-utils.h', + PYTHON3 = dependency('python3') + PYGOBJECT = dependency('pygobject-3.0', version : '>=3.0.0') + # Compile and run our python-gi test program + python_gi_test = compiler.run(files('gplugin-python-test-pygobject.c'), + dependencies : [GLIB, PYTHON3, PYGOBJECT], + if not python_gi_test.compiled() or python_gi_test.returncode() != 0 +# error('pygobject does not work with python3') + # Now add our libraries + gplugin_python_inc = include_directories('.') + gplugin_python = shared_library('gplugin-python', + GPLUGIN_PYTHON_SOURCES, + GPLUGIN_PYTHON_HEADERS, + dependencies : [PYTHON3, PYGOBJECT, gplugin_dep], + install_dir : get_option('libdir') + '/gplugin' + gplugin_python_dep = declare_dependency( + include_directories : gplugin_python_inc, + link_with : gplugin_python, + gplugin_python_static = static_library('gplugin-python-static', + GPLUGIN_PYTHON_SOURCES, + GPLUGIN_PYTHON_HEADERS, + dependencies : [PYTHON3, PYGOBJECT, gplugin_dep], + gplugin_python_static_dep = declare_dependency( + include_directories : gplugin_python_inc, + link_with : gplugin_python_static, +if get_option('testing') --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/tests/meson.build Mon Sep 26 03:24:14 2016 -0400
@@ -0,0 +1,26 @@
+e = executable('test-python-loader', 'test-python-loader.c', + include_directories : include_directories('.'), + '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()), + '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()), + link_with : gplugin_loader_tests, + dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT, gplugin_dep]) +test('Python loader', e) +# we can't see the symbols in gplugin-python externally, so use the static +e = executable('test-python-utils', 'test-python-utils.c', + include_directories : include_directories('.'), + '-DPYTHON_LOADER_DIR="@0@/python"'.format(meson.build_root()), + '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()), + link_with : [gplugin_loader_tests], + dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT, + gplugin_python_static_dep])