Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit75e95dd

Browse files
committed
Attempt to fix jsonb_plpython build on Windows
1 parente81fc9b commit75e95dd

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

‎src/tools/msvc/Install.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ sub CopyContribFiles
465465
nextif ($deq"xml2" && !defined($config->{xml}));
466466
nextif ($deq"hstore_plperl" && !defined($config->{perl}));
467467
nextif ($deq"hstore_plpython" && !defined($config->{python}));
468+
nextif ($deq"jsonb_plpython" && !defined($config->{python}));
468469
nextif ($deq"ltree_plpython" && !defined($config->{python}));
469470
nextif ($deq"sepgsql");
470471

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ my $contrib_extrasource = {
4343
my@contrib_excludes = (
4444
'commit_ts','hstore_plperl',
4545
'hstore_plpython','intagg',
46+
'jsonb_plpython',
4647
'ltree_plpython','pgcrypto',
4748
'sepgsql','brin',
4849
'test_extensions','test_pg_dump',
@@ -506,6 +507,11 @@ sub mkvcbuild
506507
'hstore','contrib/hstore');
507508
$hstore_plpython->AddDefine(
508509
'PLPYTHON_LIBNAME="plpython' .$pymajorver .'"');
510+
my$jsonb_plpython = AddTransformModule(
511+
'jsonb_plpython' .$pymajorver,'contrib/jsonb_plpython',
512+
'plpython' .$pymajorver,'src/pl/plpython');
513+
$jsonb_plpython->AddDefine(
514+
'PLPYTHON_LIBNAME="plpython' .$pymajorver .'"');
509515
my$ltree_plpython = AddTransformModule(
510516
'ltree_plpython' .$pymajorver,'contrib/ltree_plpython',
511517
'plpython' .$pymajorver,'src/pl/plpython',
@@ -850,20 +856,23 @@ sub AddTransformModule
850856
my$n_src =shift;
851857
my$pl_proj_name =shift;
852858
my$pl_src =shift;
853-
my$transform_name =shift;
854-
my$transform_src =shift;
859+
my$type_name =shift;
860+
my$type_src =shift;
855861

856-
my$transform_proj =undef;
857-
foreachmy$proj (@{$solution->{projects}->{'contrib'} })
862+
my$type_proj =undef;
863+
if ($type_name)
858864
{
859-
if ($proj->{name}eq$transform_name)
865+
foreachmy$proj (@{$solution->{projects}->{'contrib'} })
860866
{
861-
$transform_proj =$proj;
862-
last;
867+
if ($proj->{name}eq$type_name)
868+
{
869+
$type_proj =$proj;
870+
last;
871+
}
863872
}
873+
die"could not find base module$type_name for transform module$n"
874+
if (!defined($type_proj));
864875
}
865-
die"could not find base module$transform_name for transform module$n"
866-
if (!defined($transform_proj));
867876

868877
my$pl_proj =undef;
869878
foreachmy$proj (@{$solution->{projects}->{'PLs'} })
@@ -894,13 +903,16 @@ sub AddTransformModule
894903
}
895904

896905
# Add base module dependencies
897-
$p->AddIncludeDir($transform_src);
898-
$p->AddIncludeDir($transform_proj->{includes});
899-
foreachmy$trans_lib (@{$transform_proj->{libraries} })
906+
if ($type_proj)
900907
{
901-
$p->AddLibrary($trans_lib);
908+
$p->AddIncludeDir($type_src);
909+
$p->AddIncludeDir($type_proj->{includes});
910+
foreachmy$type_lib (@{$type_proj->{libraries} })
911+
{
912+
$p->AddLibrary($type_lib);
913+
}
914+
$p->AddReference($type_proj);
902915
}
903-
$p->AddReference($transform_proj);
904916

905917
return$p;
906918
}

‎src/tools/msvc/vcregress.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ sub subdircheck
326326
# Makefile for more details regarding Python-version specific
327327
# dependencies.
328328
if ($moduleeq"hstore_plpython"
329+
||$moduleeq"jsonb_plpython"
329330
||$moduleeq"ltree_plpython")
330331
{
331332
die"Python not enabled in configuration"
@@ -376,6 +377,7 @@ sub contribcheck
376377
nextif ($moduleeq"xml2" && !defined($config->{xml}));
377378
nextif ($moduleeq"hstore_plperl" && !defined($config->{perl}));
378379
nextif ($moduleeq"hstore_plpython" && !defined($config->{python}));
380+
nextif ($moduleeq"jsonb_plpython" && !defined($config->{python}));
379381
nextif ($moduleeq"ltree_plpython" && !defined($config->{python}));
380382
nextif ($moduleeq"sepgsql");
381383

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp