View | Details | Raw Unified | Return to bug 259262 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/postgresql-plv8js/Makefile (-5 / +7 lines)
Lines 1-9 Link Here
1
# Created by: vanilla@
1
# Created by: vanilla@
2
2
3
PORTNAME=	plv8
3
PORTNAME=	plv8
4
PORTVERSION=	1.4.8
4
PORTVERSION=	3.0.0
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
PORTREVISION=	6
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
PKGNAMEPREFIX=	postgresql${PGSQL_VER:S/.//}-
7
PKGNAMEPREFIX=	postgresql${PGSQL_VER:S/.//}-
9
PKGNAMESUFFIX=	js
8
PKGNAMESUFFIX=	js
Lines 13-25 COMMENT= PL/v8js procedural language for PostgreSQL database Link Here
13
12
14
LICENSE=	PostgreSQL
13
LICENSE=	PostgreSQL
15
14
16
BROKEN=		fails to build
15
BUILD_DEPENDS=	bash:shells/bash
17
18
LIB_DEPENDS=	libv8.so:lang/v8
16
LIB_DEPENDS=	libv8.so:lang/v8
19
17
20
USES=		compiler:c++11-lang gmake perl5 pgsql:9.6-10
18
USES=		compiler:c++14-lang gmake perl5 pgsql:9.6-10
21
USE_PERL5=	build
19
USE_PERL5=	build
22
USE_GITHUB=	yes
20
USE_GITHUB=	yes
23
PLIST_SUB=	PORTVERSION="${PORTVERSION}"
21
PLIST_SUB=	PORTVERSION="${PORTVERSION}"
24
22
23
CXXFLAGS+=	-std=c++14
24
MAKEFILE=	Makefile.shared
25
MAKE_ARGS=	CUSTOM_CC=${CXX} CCFLAGS="${CXXFLAGS}"
26
25
.include <bsd.port.mk>
27
.include <bsd.port.mk>
(-)b/databases/postgresql-plv8js/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1483464767
1
TIMESTAMP = 1634572468
2
SHA256 (plv8-plv8-v1.4.8_GH0.tar.gz) = 485c4bb02cc4e7300d249d9ec0dc2be8f7f6b69ded0fd91ba4f7a4ed90ad384a
2
SHA256 (plv8-plv8-v3.0.0_GH0.tar.gz) = de030f5d6b0439710efa05f4c35ffb8ef36ae754fa0e3c46d334352cf1507661
3
SIZE (plv8-plv8-v1.4.8_GH0.tar.gz) = 155736
3
SIZE (plv8-plv8-v3.0.0_GH0.tar.gz) = 9312158
(-)a/databases/postgresql-plv8js/files/patch-Makefile (-11 lines)
Removed Link Here
1
--- Makefile.orig	2015-05-26 17:46:56 UTC
2
+++ Makefile
3
@@ -21,7 +21,7 @@ PG_VERSION_NUM := $(shell cat `$(PG_CONF
4
 		   | perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/')
5
 
6
 # set your custom C++ compler
7
-CUSTOM_CC = g++
8
+CUSTOM_CC := $(CXX)
9
 JSS  = coffee-script.js livescript.js
10
 # .cc created from .js
11
 JSCS = $(JSS:.js=.cc)
(-)a/databases/postgresql-plv8js/files/patch-plv8.cc (-27 lines)
Removed Link Here
1
--- plv8.cc.orig	2015-05-26 19:46:56.000000000 +0200
2
+++ plv8.cc	2016-04-04 17:11:11.340628000 +0200
3
@@ -9,11 +9,6 @@
4
 #include <new>
5
 
6
 extern "C" {
7
-#define delete		delete_
8
-#define namespace	namespace_
9
-#define	typeid		typeid_
10
-#define	typename	typename_
11
-#define	using		using_
12
 
13
 #if PG_VERSION_NUM >= 90300
14
 #include "access/htup_details.h"
15
@@ -32,12 +27,6 @@ extern "C" {
16
 #include "utils/rel.h"
17
 #include "utils/syscache.h"
18
 
19
-#undef delete
20
-#undef namespace
21
-#undef typeid
22
-#undef typename
23
-#undef using
24
-
25
 PG_MODULE_MAGIC;
26
 
27
 PG_FUNCTION_INFO_V1(plv8_call_handler);
(-)b/databases/postgresql-plv8js/files/patch-plv8__type.cc (+47 lines)
Added Link Here
1
--- plv8_type.cc.orig	2021-10-19 07:08:47 UTC
2
+++ plv8_type.cc
3
@@ -600,7 +600,7 @@ CreateExternalArray(void *data, plv8_external_array_ty
4
 	array->SetInternalField(0, External::New(isolate, DatumGetPointer(datum)));
5
 
6
 	// needs to be a copy, as the data could go away
7
-	memcpy(buffer->GetContents().Data(), data, byte_size);
8
+	memcpy(buffer->GetBackingStore()->Data(), data, byte_size);
9
 
10
 	return array;
11
 }
12
@@ -710,7 +710,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p
13
 		{
14
 			if (value->IsUint8Array() || value->IsInt8Array()) {
15
 				v8::Handle<v8::Uint8Array> array = v8::Handle<v8::Uint8Array>::Cast(value);
16
-				void *data = array->Buffer()->GetContents().Data();
17
+				void *data = array->Buffer()->GetBackingStore()->Data();
18
 				int		len = array->Length();
19
 				size_t		size = len + VARHDRSZ;
20
 				void	   *result = (void *) palloc(size);
21
@@ -722,7 +722,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p
22
 
23
 			if (value->IsUint16Array() || value->IsInt16Array()) {
24
 				v8::Handle<v8::Uint16Array> array = v8::Handle<v8::Uint16Array>::Cast(value);
25
-				void *data = array->Buffer()->GetContents().Data();
26
+				void *data = array->Buffer()->GetBackingStore()->Data();
27
 				int		len = array->Length();
28
 				size_t		size = (len * 2) + VARHDRSZ;
29
 				void	   *result = (void *) palloc(size);
30
@@ -734,7 +734,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p
31
 
32
 			if (value->IsUint32Array() || value->IsInt32Array()) {
33
 				v8::Handle<v8::Uint32Array> array = v8::Handle<v8::Uint32Array>::Cast(value);
34
-				void *data = array->Buffer()->GetContents().Data();
35
+				void *data = array->Buffer()->GetBackingStore()->Data();
36
 				int		len = array->Length();
37
 				size_t		size = (len * 4) + VARHDRSZ;
38
 				void	   *result = (void *) palloc(size);
39
@@ -746,7 +746,7 @@ ToScalarDatum(Handle<v8::Value> value, bool *isnull, p
40
 
41
 			if (value->IsArrayBuffer()) {
42
 				v8::Handle<v8::ArrayBuffer> array = v8::Handle<v8::ArrayBuffer>::Cast(value);
43
-				void *data = array->GetContents().Data();
44
+				void *data = array->GetBackingStore()->Data();
45
 				int		len = array->ByteLength();
46
 				size_t		size = len + VARHDRSZ;
47
 				void	   *result = (void *) palloc(size);
(-)a/databases/postgresql-plv8js/files/patch-plv8_func.cc (-26 lines)
Removed Link Here
1
--- plv8_func.cc.orig	2015-05-26 19:46:56.000000000 +0200
2
+++ plv8_func.cc	2016-04-04 17:11:11.341047000 +0200
3
@@ -10,11 +10,6 @@
4
 #include <sstream>
5
 
6
 extern "C" {
7
-#define delete		delete_
8
-#define namespace	namespace_
9
-#define	typeid		typeid_
10
-#define	typename	typename_
11
-#define	using		using_
12
 
13
 #include "access/xact.h"
14
 #include "catalog/pg_type.h"
15
@@ -23,11 +18,6 @@ extern "C" {
16
 #include "utils/builtins.h"
17
 #include "utils/lsyscache.h"
18
 
19
-#undef delete
20
-#undef namespace
21
-#undef typeid
22
-#undef typename
23
-#undef using
24
 } // extern "C"
25
 
26
 using namespace v8;
(-)a/databases/postgresql-plv8js/files/patch-plv8_type.cc (-26 lines)
Removed Link Here
1
--- plv8_type.cc.orig	2015-05-26 19:46:56.000000000 +0200
2
+++ plv8_type.cc	2016-04-04 17:11:11.341361000 +0200
3
@@ -8,11 +8,6 @@
4
 #include "plv8.h"
5
 
6
 extern "C" {
7
-#define delete		delete_
8
-#define namespace	namespace_
9
-#define	typeid		typeid_
10
-#define	typename	typename_
11
-#define	using		using_
12
 
13
 #if PG_VERSION_NUM >= 90300
14
 #include "access/htup_details.h"
15
@@ -29,11 +24,6 @@ extern "C" {
16
 #include "utils/syscache.h"
17
 #include "utils/typcache.h"
18
 
19
-#undef delete
20
-#undef namespace
21
-#undef typeid
22
-#undef typename
23
-#undef using
24
 } // extern "C"
25
 
26
 //#define CHECK_INTEGER_OVERFLOW
(-)b/databases/postgresql-plv8js/pkg-plist (-2 / +25 lines)
Lines 1-6 Link Here
1
lib/postgresql/plv8.so
1
lib/postgresql/plv8-%%PORTVERSION%%.so
2
share/postgresql/extension/plv8.control
2
share/postgresql/extension/plv8.control
3
share/postgresql/extension/plv8--%%PORTVERSION%%.sql
3
share/postgresql/extension/plv8--%%PORTVERSION%%.sql
4
share/postgresql/extension/plv8--1.5.0--%%PORTVERSION%%.sql
5
share/postgresql/extension/plv8--1.5.1--%%PORTVERSION%%.sql
6
share/postgresql/extension/plv8--1.5.2--%%PORTVERSION%%.sql
7
share/postgresql/extension/plv8--1.5.3--%%PORTVERSION%%.sql
8
share/postgresql/extension/plv8--1.5.4--%%PORTVERSION%%.sql
9
share/postgresql/extension/plv8--1.5.5--%%PORTVERSION%%.sql
10
share/postgresql/extension/plv8--1.5.6--%%PORTVERSION%%.sql
11
share/postgresql/extension/plv8--1.5.7--%%PORTVERSION%%.sql
12
share/postgresql/extension/plv8--2.0.0--%%PORTVERSION%%.sql
13
share/postgresql/extension/plv8--2.0.1--%%PORTVERSION%%.sql
14
share/postgresql/extension/plv8--2.0.3--%%PORTVERSION%%.sql
15
share/postgresql/extension/plv8--2.1.0--%%PORTVERSION%%.sql
16
share/postgresql/extension/plv8--2.1.2--%%PORTVERSION%%.sql
17
share/postgresql/extension/plv8--2.3.0--%%PORTVERSION%%.sql
18
share/postgresql/extension/plv8--2.3.1--%%PORTVERSION%%.sql
19
share/postgresql/extension/plv8--2.3.10--%%PORTVERSION%%.sql
20
share/postgresql/extension/plv8--2.3.2--%%PORTVERSION%%.sql
21
share/postgresql/extension/plv8--2.3.3--%%PORTVERSION%%.sql
22
share/postgresql/extension/plv8--2.3.4--%%PORTVERSION%%.sql
23
share/postgresql/extension/plv8--2.3.5--%%PORTVERSION%%.sql
24
share/postgresql/extension/plv8--2.3.6--%%PORTVERSION%%.sql
25
share/postgresql/extension/plv8--2.3.7--%%PORTVERSION%%.sql
26
share/postgresql/extension/plv8--2.3.8--%%PORTVERSION%%.sql
27
share/postgresql/extension/plv8--2.3.9--%%PORTVERSION%%.sql
4
share/postgresql/extension/plcoffee.control
28
share/postgresql/extension/plcoffee.control
5
share/postgresql/extension/plcoffee--%%PORTVERSION%%.sql
29
share/postgresql/extension/plcoffee--%%PORTVERSION%%.sql
6
share/postgresql/extension/plls.control
30
share/postgresql/extension/plls.control
7
- 

Return to bug 259262