git: 771bff02ad88 - main - databases/postgresql-plv8js: bump to 3.2.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 30 Nov 2023 16:48:40 UTC
The branch main has been updated by mizhka: URL: https://cgit.FreeBSD.org/ports/commit/?id=771bff02ad8855cba80aaa454888d3eee905c327 commit 771bff02ad8855cba80aaa454888d3eee905c327 Author: Michael Zhilin <mizhka@FreeBSD.org> AuthorDate: 2022-10-17 20:14:38 +0000 Commit: Michael Zhilin <mizhka@FreeBSD.org> CommitDate: 2023-11-30 16:48:24 +0000 databases/postgresql-plv8js: bump to 3.2.0 Unbreak port There is discrepancies between official distribution and port: - port uses dynamic library, but official uses static --- databases/postgresql-plv8js/Makefile | 13 ++---- databases/postgresql-plv8js/distinfo | 6 +-- databases/postgresql-plv8js/files/patch-Makefile | 30 ++++++++++++++ .../postgresql-plv8js/files/patch-plv8__type.cc | 47 ---------------------- databases/postgresql-plv8js/pkg-message | 2 - databases/postgresql-plv8js/pkg-plist | 24 ++++++++--- 6 files changed, 54 insertions(+), 68 deletions(-) diff --git a/databases/postgresql-plv8js/Makefile b/databases/postgresql-plv8js/Makefile index 918c5a59e19f..b2d0435a25cd 100644 --- a/databases/postgresql-plv8js/Makefile +++ b/databases/postgresql-plv8js/Makefile @@ -1,6 +1,5 @@ PORTNAME= plv8 -PORTVERSION= 3.0.0 -PORTREVISION= 2 +PORTVERSION= 3.2.0 DISTVERSIONPREFIX= v CATEGORIES= databases PKGNAMEPREFIX= postgresql${PGSQL_VER:S/.//}- @@ -11,22 +10,16 @@ COMMENT= PL/v8js procedural language for PostgreSQL database WWW= https://plv8.github.io/ LICENSE= PostgreSQL - -DEPRECATED= BROKEN for more than a year -EXPIRATION_DATE= 2023-11-30 -BROKEN= does not build: plv8.cc:1397:20: error: no matching constructor for initialization of 'v8::ScriptOrigin' - BUILD_DEPENDS= bash:shells/bash LIB_DEPENDS= libv8.so:lang/v8 -USES= compiler:c++14-lang gmake perl5 pgsql +USES= compiler:c++17-lang gmake pgsql USE_PERL5= build USE_GITHUB= yes PLIST_SUB= PORTVERSION="${PORTVERSION}" -CXXFLAGS+= -std=c++14 -fno-rtti \ +CXXFLAGS+= -std=c++17 -fno-rtti \ -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1 -MAKEFILE= Makefile.shared MAKE_ARGS= CUSTOM_CC=${CXX} CCFLAGS="${CXXFLAGS}" .include <bsd.port.mk> diff --git a/databases/postgresql-plv8js/distinfo b/databases/postgresql-plv8js/distinfo index 59dc57b65113..81e8469cf62d 100644 --- a/databases/postgresql-plv8js/distinfo +++ b/databases/postgresql-plv8js/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1634572468 -SHA256 (plv8-plv8-v3.0.0_GH0.tar.gz) = de030f5d6b0439710efa05f4c35ffb8ef36ae754fa0e3c46d334352cf1507661 -SIZE (plv8-plv8-v3.0.0_GH0.tar.gz) = 9312158 +TIMESTAMP = 1701334781 +SHA256 (plv8-plv8-v3.2.0_GH0.tar.gz) = ec07b191882bfbba2cb9471ccc4f1e2a3f5360d70f1df83673bb45db81e7cca4 +SIZE (plv8-plv8-v3.2.0_GH0.tar.gz) = 8995530 diff --git a/databases/postgresql-plv8js/files/patch-Makefile b/databases/postgresql-plv8js/files/patch-Makefile new file mode 100644 index 000000000000..6082926bcfc0 --- /dev/null +++ b/databases/postgresql-plv8js/files/patch-Makefile @@ -0,0 +1,30 @@ +--- Makefile.orig 2023-08-02 04:10:12 UTC ++++ Makefile +@@ -36,17 +36,8 @@ SHLIB_LINK += -Ldeps/v8-cmake/build -g + + SHLIB_LINK += -Ldeps/v8-cmake/build -g + +-all: v8 $(OBJS) ++all: $(OBJS) + +-# For some reason, this solves parallel make dependency. +-plv8_config.h plv8.so: v8 +- +-deps/v8-cmake/build/libv8_libbase.a: +- @git submodule update --init --recursive +- @cd deps/v8-cmake && mkdir -p build && cd build && cmake -Denable-fPIC=ON -DCMAKE_BUILD_TYPE=Release ../ && make -j $(NUMPROC) +- +-v8: deps/v8-cmake/build/libv8_libbase.a +- + # enable direct jsonb conversion by default + CCFLAGS += -DJSONB_DIRECT_CONVERSION + +@@ -72,7 +63,7 @@ endif + REGRESS += bigint_graceful + endif + +-SHLIB_LINK += -lv8_base_without_compiler -lv8_compiler -lv8_snapshot -lv8_inspector -lv8_libplatform -lv8_base_without_compiler -lv8_libsampler -lv8_torque_generated -lv8_libbase ++SHLIB_LINK += -lv8_libbase -lv8 -lv8_libplatform + + OPTFLAGS = -std=c++17 -fno-rtti -O2 + CCFLAGS += -Wall $(OPTFLAGS) diff --git a/databases/postgresql-plv8js/files/patch-plv8__type.cc b/databases/postgresql-plv8js/files/patch-plv8__type.cc deleted file mode 100644 index bcfacda9646a..000000000000 --- a/databases/postgresql-plv8js/files/patch-plv8__type.cc +++ /dev/null @@ -1,47 +0,0 @@ ---- plv8_type.cc.orig 2021-10-19 07:08:47 UTC -+++ plv8_type.cc -@@ -600,7 +600,7 @@ CreateExternalArray(void *data, plv8_external_array_ty - array->SetInternalField(0, External::New(isolate, DatumGetPointer(datum))); - - // needs to be a copy, as the data could go away -- memcpy(buffer->GetContents().Data(), data, byte_size); -+ memcpy(buffer->GetBackingStore()->Data(), data, byte_size); - - return array; - } -@@ -710,7 +710,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p - { - if (value->IsUint8Array() || value->IsInt8Array()) { - v8::Handle<v8::Uint8Array> array = v8::Handle<v8::Uint8Array>::Cast(value); -- void *data = array->Buffer()->GetContents().Data(); -+ void *data = array->Buffer()->GetBackingStore()->Data(); - int len = array->Length(); - size_t size = len + VARHDRSZ; - void *result = (void *) palloc(size); -@@ -722,7 +722,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p - - if (value->IsUint16Array() || value->IsInt16Array()) { - v8::Handle<v8::Uint16Array> array = v8::Handle<v8::Uint16Array>::Cast(value); -- void *data = array->Buffer()->GetContents().Data(); -+ void *data = array->Buffer()->GetBackingStore()->Data(); - int len = array->Length(); - size_t size = (len * 2) + VARHDRSZ; - void *result = (void *) palloc(size); -@@ -734,7 +734,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p - - if (value->IsUint32Array() || value->IsInt32Array()) { - v8::Handle<v8::Uint32Array> array = v8::Handle<v8::Uint32Array>::Cast(value); -- void *data = array->Buffer()->GetContents().Data(); -+ void *data = array->Buffer()->GetBackingStore()->Data(); - int len = array->Length(); - size_t size = (len * 4) + VARHDRSZ; - void *result = (void *) palloc(size); -@@ -746,7 +746,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p - - if (value->IsArrayBuffer()) { - v8::Handle<v8::ArrayBuffer> array = v8::Handle<v8::ArrayBuffer>::Cast(value); -- void *data = array->GetContents().Data(); -+ void *data = array->GetBackingStore()->Data(); - int len = array->ByteLength(); - size_t size = len + VARHDRSZ; - void *result = (void *) palloc(size); diff --git a/databases/postgresql-plv8js/pkg-message b/databases/postgresql-plv8js/pkg-message index 4a8c17a481fa..8f19104963ad 100644 --- a/databases/postgresql-plv8js/pkg-message +++ b/databases/postgresql-plv8js/pkg-message @@ -4,8 +4,6 @@ Use the following sql script to create PL/v8js psql -c 'CREATE EXTENSION plv8' - psql -c 'CREATE EXTENSION plls' - psql -c 'CREATE EXTENSION plcoffee' EOM } ] diff --git a/databases/postgresql-plv8js/pkg-plist b/databases/postgresql-plv8js/pkg-plist index e019fa5726c1..a7521adc132d 100644 --- a/databases/postgresql-plv8js/pkg-plist +++ b/databases/postgresql-plv8js/pkg-plist @@ -1,6 +1,4 @@ lib/postgresql/plv8-%%PORTVERSION%%.so -share/postgresql/extension/plv8.control -share/postgresql/extension/plv8--%%PORTVERSION%%.sql share/postgresql/extension/plv8--1.5.0--%%PORTVERSION%%.sql share/postgresql/extension/plv8--1.5.1--%%PORTVERSION%%.sql share/postgresql/extension/plv8--1.5.2--%%PORTVERSION%%.sql @@ -17,6 +15,11 @@ share/postgresql/extension/plv8--2.1.2--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.0--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.1--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.10--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--2.3.11--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--2.3.12--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--2.3.13--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--2.3.14--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--2.3.15--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.2--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.3--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.4--%%PORTVERSION%%.sql @@ -25,7 +28,16 @@ share/postgresql/extension/plv8--2.3.6--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.7--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.8--%%PORTVERSION%%.sql share/postgresql/extension/plv8--2.3.9--%%PORTVERSION%%.sql -share/postgresql/extension/plcoffee.control -share/postgresql/extension/plcoffee--%%PORTVERSION%%.sql -share/postgresql/extension/plls.control -share/postgresql/extension/plls--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.0.0--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.0.1--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.0--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.1--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.2--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.3--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.4--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.5--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.6--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.7--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--3.1.8--%%PORTVERSION%%.sql +share/postgresql/extension/plv8--%%PORTVERSION%%.sql +share/postgresql/extension/plv8.control