Attempt to fix jsonb_plpython build on Windows
This commit is contained in:
parent
e81fc9b9db
commit
75e95dd79b
|
@ -465,6 +465,7 @@ sub CopyContribFiles
|
||||||
next if ($d eq "xml2" && !defined($config->{xml}));
|
next if ($d eq "xml2" && !defined($config->{xml}));
|
||||||
next if ($d eq "hstore_plperl" && !defined($config->{perl}));
|
next if ($d eq "hstore_plperl" && !defined($config->{perl}));
|
||||||
next if ($d eq "hstore_plpython" && !defined($config->{python}));
|
next if ($d eq "hstore_plpython" && !defined($config->{python}));
|
||||||
|
next if ($d eq "jsonb_plpython" && !defined($config->{python}));
|
||||||
next if ($d eq "ltree_plpython" && !defined($config->{python}));
|
next if ($d eq "ltree_plpython" && !defined($config->{python}));
|
||||||
next if ($d eq "sepgsql");
|
next if ($d eq "sepgsql");
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ my $contrib_extrasource = {
|
||||||
my @contrib_excludes = (
|
my @contrib_excludes = (
|
||||||
'commit_ts', 'hstore_plperl',
|
'commit_ts', 'hstore_plperl',
|
||||||
'hstore_plpython', 'intagg',
|
'hstore_plpython', 'intagg',
|
||||||
|
'jsonb_plpython',
|
||||||
'ltree_plpython', 'pgcrypto',
|
'ltree_plpython', 'pgcrypto',
|
||||||
'sepgsql', 'brin',
|
'sepgsql', 'brin',
|
||||||
'test_extensions', 'test_pg_dump',
|
'test_extensions', 'test_pg_dump',
|
||||||
|
@ -506,6 +507,11 @@ sub mkvcbuild
|
||||||
'hstore', 'contrib/hstore');
|
'hstore', 'contrib/hstore');
|
||||||
$hstore_plpython->AddDefine(
|
$hstore_plpython->AddDefine(
|
||||||
'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"');
|
'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"');
|
||||||
|
my $jsonb_plpython = AddTransformModule(
|
||||||
|
'jsonb_plpython' . $pymajorver, 'contrib/jsonb_plpython',
|
||||||
|
'plpython' . $pymajorver, 'src/pl/plpython');
|
||||||
|
$jsonb_plpython->AddDefine(
|
||||||
|
'PLPYTHON_LIBNAME="plpython' . $pymajorver . '"');
|
||||||
my $ltree_plpython = AddTransformModule(
|
my $ltree_plpython = AddTransformModule(
|
||||||
'ltree_plpython' . $pymajorver, 'contrib/ltree_plpython',
|
'ltree_plpython' . $pymajorver, 'contrib/ltree_plpython',
|
||||||
'plpython' . $pymajorver, 'src/pl/plpython',
|
'plpython' . $pymajorver, 'src/pl/plpython',
|
||||||
|
@ -850,20 +856,23 @@ sub AddTransformModule
|
||||||
my $n_src = shift;
|
my $n_src = shift;
|
||||||
my $pl_proj_name = shift;
|
my $pl_proj_name = shift;
|
||||||
my $pl_src = shift;
|
my $pl_src = shift;
|
||||||
my $transform_name = shift;
|
my $type_name = shift;
|
||||||
my $transform_src = shift;
|
my $type_src = shift;
|
||||||
|
|
||||||
my $transform_proj = undef;
|
my $type_proj = undef;
|
||||||
foreach my $proj (@{ $solution->{projects}->{'contrib'} })
|
if ($type_name)
|
||||||
{
|
{
|
||||||
if ($proj->{name} eq $transform_name)
|
foreach my $proj (@{ $solution->{projects}->{'contrib'} })
|
||||||
{
|
{
|
||||||
$transform_proj = $proj;
|
if ($proj->{name} eq $type_name)
|
||||||
last;
|
{
|
||||||
|
$type_proj = $proj;
|
||||||
|
last;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
die "could not find base module $type_name for transform module $n"
|
||||||
|
if (!defined($type_proj));
|
||||||
}
|
}
|
||||||
die "could not find base module $transform_name for transform module $n"
|
|
||||||
if (!defined($transform_proj));
|
|
||||||
|
|
||||||
my $pl_proj = undef;
|
my $pl_proj = undef;
|
||||||
foreach my $proj (@{ $solution->{projects}->{'PLs'} })
|
foreach my $proj (@{ $solution->{projects}->{'PLs'} })
|
||||||
|
@ -894,13 +903,16 @@ sub AddTransformModule
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add base module dependencies
|
# Add base module dependencies
|
||||||
$p->AddIncludeDir($transform_src);
|
if ($type_proj)
|
||||||
$p->AddIncludeDir($transform_proj->{includes});
|
|
||||||
foreach my $trans_lib (@{ $transform_proj->{libraries} })
|
|
||||||
{
|
{
|
||||||
$p->AddLibrary($trans_lib);
|
$p->AddIncludeDir($type_src);
|
||||||
|
$p->AddIncludeDir($type_proj->{includes});
|
||||||
|
foreach my $type_lib (@{ $type_proj->{libraries} })
|
||||||
|
{
|
||||||
|
$p->AddLibrary($type_lib);
|
||||||
|
}
|
||||||
|
$p->AddReference($type_proj);
|
||||||
}
|
}
|
||||||
$p->AddReference($transform_proj);
|
|
||||||
|
|
||||||
return $p;
|
return $p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -326,6 +326,7 @@ sub subdircheck
|
||||||
# Makefile for more details regarding Python-version specific
|
# Makefile for more details regarding Python-version specific
|
||||||
# dependencies.
|
# dependencies.
|
||||||
if ( $module eq "hstore_plpython"
|
if ( $module eq "hstore_plpython"
|
||||||
|
|| $module eq "jsonb_plpython"
|
||||||
|| $module eq "ltree_plpython")
|
|| $module eq "ltree_plpython")
|
||||||
{
|
{
|
||||||
die "Python not enabled in configuration"
|
die "Python not enabled in configuration"
|
||||||
|
@ -376,6 +377,7 @@ sub contribcheck
|
||||||
next if ($module eq "xml2" && !defined($config->{xml}));
|
next if ($module eq "xml2" && !defined($config->{xml}));
|
||||||
next if ($module eq "hstore_plperl" && !defined($config->{perl}));
|
next if ($module eq "hstore_plperl" && !defined($config->{perl}));
|
||||||
next if ($module eq "hstore_plpython" && !defined($config->{python}));
|
next if ($module eq "hstore_plpython" && !defined($config->{python}));
|
||||||
|
next if ($module eq "jsonb_plpython" && !defined($config->{python}));
|
||||||
next if ($module eq "ltree_plpython" && !defined($config->{python}));
|
next if ($module eq "ltree_plpython" && !defined($config->{python}));
|
||||||
next if ($module eq "sepgsql");
|
next if ($module eq "sepgsql");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue