databases/postgresql-plv8js: Update to 3.0.0
Unbreak the build, needs C++14 and CXXFLAGS passed to the build in a non-standard way. PR: 259262
This commit is contained in:
parent
5290fb1d92
commit
9013d2fa7d
|
@ -1,9 +1,8 @@
|
|||
# Created by: vanilla@
|
||||
|
||||
PORTNAME= plv8
|
||||
PORTVERSION= 1.4.8
|
||||
PORTVERSION= 3.0.0
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTREVISION= 6
|
||||
CATEGORIES= databases
|
||||
PKGNAMEPREFIX= postgresql${PGSQL_VER:S/.//}-
|
||||
PKGNAMESUFFIX= js
|
||||
|
@ -13,13 +12,16 @@ COMMENT= PL/v8js procedural language for PostgreSQL database
|
|||
|
||||
LICENSE= PostgreSQL
|
||||
|
||||
BROKEN= fails to build
|
||||
|
||||
BUILD_DEPENDS= bash:shells/bash
|
||||
LIB_DEPENDS= libv8.so:lang/v8
|
||||
|
||||
USES= compiler:c++11-lang gmake perl5 pgsql:9.6-10
|
||||
USES= compiler:c++14-lang gmake perl5 pgsql:9.6-10
|
||||
USE_PERL5= build
|
||||
USE_GITHUB= yes
|
||||
PLIST_SUB= PORTVERSION="${PORTVERSION}"
|
||||
|
||||
CXXFLAGS+= -std=c++14
|
||||
MAKEFILE= Makefile.shared
|
||||
MAKE_ARGS= CUSTOM_CC=${CXX} CCFLAGS="${CXXFLAGS}"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1483464767
|
||||
SHA256 (plv8-plv8-v1.4.8_GH0.tar.gz) = 485c4bb02cc4e7300d249d9ec0dc2be8f7f6b69ded0fd91ba4f7a4ed90ad384a
|
||||
SIZE (plv8-plv8-v1.4.8_GH0.tar.gz) = 155736
|
||||
TIMESTAMP = 1634572468
|
||||
SHA256 (plv8-plv8-v3.0.0_GH0.tar.gz) = de030f5d6b0439710efa05f4c35ffb8ef36ae754fa0e3c46d334352cf1507661
|
||||
SIZE (plv8-plv8-v3.0.0_GH0.tar.gz) = 9312158
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- Makefile.orig 2015-05-26 17:46:56 UTC
|
||||
+++ Makefile
|
||||
@@ -21,7 +21,7 @@ PG_VERSION_NUM := $(shell cat `$(PG_CONF
|
||||
| perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/')
|
||||
|
||||
# set your custom C++ compler
|
||||
-CUSTOM_CC = g++
|
||||
+CUSTOM_CC := $(CXX)
|
||||
JSS = coffee-script.js livescript.js
|
||||
# .cc created from .js
|
||||
JSCS = $(JSS:.js=.cc)
|
|
@ -1,27 +0,0 @@
|
|||
--- plv8.cc.orig 2015-05-26 19:46:56.000000000 +0200
|
||||
+++ plv8.cc 2016-04-04 17:11:11.340628000 +0200
|
||||
@@ -9,11 +9,6 @@
|
||||
#include <new>
|
||||
|
||||
extern "C" {
|
||||
-#define delete delete_
|
||||
-#define namespace namespace_
|
||||
-#define typeid typeid_
|
||||
-#define typename typename_
|
||||
-#define using using_
|
||||
|
||||
#if PG_VERSION_NUM >= 90300
|
||||
#include "access/htup_details.h"
|
||||
@@ -32,12 +27,6 @@ extern "C" {
|
||||
#include "utils/rel.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
-#undef delete
|
||||
-#undef namespace
|
||||
-#undef typeid
|
||||
-#undef typename
|
||||
-#undef using
|
||||
-
|
||||
PG_MODULE_MAGIC;
|
||||
|
||||
PG_FUNCTION_INFO_V1(plv8_call_handler);
|
47
databases/postgresql-plv8js/files/patch-plv8__type.cc
Normal file
47
databases/postgresql-plv8js/files/patch-plv8__type.cc
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- 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);
|
|
@ -1,26 +0,0 @@
|
|||
--- plv8_func.cc.orig 2015-05-26 19:46:56.000000000 +0200
|
||||
+++ plv8_func.cc 2016-04-04 17:11:11.341047000 +0200
|
||||
@@ -10,11 +10,6 @@
|
||||
#include <sstream>
|
||||
|
||||
extern "C" {
|
||||
-#define delete delete_
|
||||
-#define namespace namespace_
|
||||
-#define typeid typeid_
|
||||
-#define typename typename_
|
||||
-#define using using_
|
||||
|
||||
#include "access/xact.h"
|
||||
#include "catalog/pg_type.h"
|
||||
@@ -23,11 +18,6 @@ extern "C" {
|
||||
#include "utils/builtins.h"
|
||||
#include "utils/lsyscache.h"
|
||||
|
||||
-#undef delete
|
||||
-#undef namespace
|
||||
-#undef typeid
|
||||
-#undef typename
|
||||
-#undef using
|
||||
} // extern "C"
|
||||
|
||||
using namespace v8;
|
|
@ -1,26 +0,0 @@
|
|||
--- plv8_type.cc.orig 2015-05-26 19:46:56.000000000 +0200
|
||||
+++ plv8_type.cc 2016-04-04 17:11:11.341361000 +0200
|
||||
@@ -8,11 +8,6 @@
|
||||
#include "plv8.h"
|
||||
|
||||
extern "C" {
|
||||
-#define delete delete_
|
||||
-#define namespace namespace_
|
||||
-#define typeid typeid_
|
||||
-#define typename typename_
|
||||
-#define using using_
|
||||
|
||||
#if PG_VERSION_NUM >= 90300
|
||||
#include "access/htup_details.h"
|
||||
@@ -29,11 +24,6 @@ extern "C" {
|
||||
#include "utils/syscache.h"
|
||||
#include "utils/typcache.h"
|
||||
|
||||
-#undef delete
|
||||
-#undef namespace
|
||||
-#undef typeid
|
||||
-#undef typename
|
||||
-#undef using
|
||||
} // extern "C"
|
||||
|
||||
//#define CHECK_INTEGER_OVERFLOW
|
|
@ -1,6 +1,30 @@
|
|||
lib/postgresql/plv8.so
|
||||
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
|
||||
share/postgresql/extension/plv8--1.5.3--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--1.5.4--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--1.5.5--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--1.5.6--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--1.5.7--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.0.0--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.0.1--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.0.3--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.1.0--%%PORTVERSION%%.sql
|
||||
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.2--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.3.3--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.3.4--%%PORTVERSION%%.sql
|
||||
share/postgresql/extension/plv8--2.3.5--%%PORTVERSION%%.sql
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user