--- a/perl/gplugin-perl-loader.c Sat Feb 29 03:18:44 2020 -0500
+++ b/perl/gplugin-perl-loader.c Sun Mar 01 07:31:12 2020 +0000
@@ -19,6 +19,8 @@
#include "gplugin-perl-plugin.h"
struct _GPluginPerlLoader {
--- a/perl/gplugin-perl-plugin.c Sat Feb 29 03:18:44 2020 -0500
+++ b/perl/gplugin-perl-plugin.c Sun Mar 01 07:31:12 2020 +0000
@@ -17,9 +17,6 @@
#include "gplugin-perl-plugin.h"
/******************************************************************************
*****************************************************************************/
--- a/perl/gplugin-perl-plugin.h Sat Feb 29 03:18:44 2020 -0500
+++ b/perl/gplugin-perl-plugin.h Sun Mar 01 07:31:12 2020 +0000
@@ -22,11 +22,21 @@
#include <gplugin-native.h>
#define PERL_NO_GET_CONTEXT
+/* On FreeBSD, perl.h includes libutil.h (which doesn't appear necessary), and + * that defines some generic 'properties' type. So use the preprocessor to hide +#define properties freebsd_properties /* perl define's _() to something completely different that we don't use. So
* we undef it so that we can use it for gettext.
--- a/perl/meson.build Sat Feb 29 03:18:44 2020 -0500
+++ b/perl/meson.build Sun Mar 01 07:31:12 2020 +0000
@@ -30,9 +30,27 @@
link_args : run_command(PERL, '-MExtUtils::Embed', '-e', 'ldopts', check : true).stdout().split(),
+ if host_machine.system() == 'freebsd' + perl_arch = 'sitearchexp' + perl_arch = 'vendorarchexp' + perl_arch = run_command(PERL, + '-e', 'if ($Config{@0@}) { print "$Config{@0@}" } else { exit 1 }'.format(perl_arch), + check : true).stdout().split() + glib_perl_incdir = '-I@0@/Glib/Install'.format(perl_arch[0]) + glib_perl_libdir = '@0@/auto/Glib/'.format(perl_arch[0]) + glib_perl_dep = compiler.find_library( + dirs : glib_perl_libdir, + has_headers : 'gperl.h', + header_args : glib_perl_incdir glib_perl_dep = declare_dependency(
- compile_args : run_command(PERL, '-MConfig', '-e', 'print "-I$Config{vendorarch}/Glib/Install"', check : true).stdout().split(),
- link_args : run_command(PERL, '-MConfig', '-e', 'print "$Config{vendorarch}/auto/Glib/Glib.so"', check : true).stdout().split(),
+ dependencies : glib_perl_dep, + # Annoyingly, this is not transferred over from the header_args. + compile_args : glib_perl_incdir shared_library('gplugin-perl',
--- a/python/gplugin-python3-test-pygobject.c Sat Feb 29 03:18:44 2020 -0500
+++ b/python/gplugin-python3-test-pygobject.c Sun Mar 01 07:31:12 2020 +0000
@@ -34,29 +34,28 @@
len = mbstowcs(NULL, argv[0], 0);
+ if(len == (size_t)-1) { + printf("Failed to call mbstowcs to find length of argv[0]: %s\n", argv[0]); wargv[0] = g_new0(wchar_t, len + 1);
len = mbstowcs(wargv[0], argv[0], len + 1);
+ printf("Failed to call mbstowcs to convert argv[0]: %s\n", argv[0]); -#if PY_VERSION_HEX < 0x03010300
- PySys_SetArgv(1, wargv);
- PyRun_SimpleString("import sys; sys.path.pop(0)\n");
PySys_SetArgvEx(1, wargv, 0);
/* initialize pygobject */
+ printf("Calling pygobject_init failed.\n");