Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,28 @@
$NetBSD: patch-deps_uv_src_unix_netbsd.c,v 1.4 2016/04/13 09:37:35 ryoon Exp $
--- deps/uv/src/unix/netbsd.c.orig 2016-04-05 21:52:30.000000000 +0000
+++ deps/uv/src/unix/netbsd.c
@@ -43,6 +43,11 @@
#include <unistd.h>
#include <time.h>
+/* For __NetBSD_Version__ */
+#ifdef __NetBSD__
+# include <sys/param.h>
+#endif
+
#undef NANOSEC
#define NANOSEC ((uint64_t) 1e9)
@@ -90,7 +95,11 @@ int uv_exepath(char* buffer, size_t* siz
mib[0] = CTL_KERN;
mib[1] = KERN_PROC_ARGS;
mib[2] = mypid;
+#if __NetBSD_Version__ >= 799000000
+ mib[3] = KERN_PROC_PATHNAME;
+#else
mib[3] = KERN_PROC_ARGV;
+#endif
cb = *size;
if (sysctl(mib, 4, buffer, &cb, NULL, 0))

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-deps_v8_src_arm_cpu-arm.cc,v 1.2 2016/04/27 15:03:10 fhajny Exp $
--- deps/v8/src/arm/cpu-arm.cc.orig 2016-04-26 19:50:10.000000000 +0000
+++ deps/v8/src/arm/cpu-arm.cc
@@ -7,6 +7,9 @@
#ifdef __QNXNTO__
#include <sys/mman.h> // for cache flushing.
#undef MAP_TYPE
+#elif defined(__NetBSD__)
+#include <sys/types.h>
+#include <machine/sysarch.h> // for cache flushing.
#else
#include <sys/syscall.h> // for cache flushing.
#endif
@@ -24,6 +27,9 @@ void CpuFeatures::FlushICache(void* star
#if !defined(USE_SIMULATOR)
#if V8_OS_QNX
msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE);
+#elif defined(__NetBSD__)
+ struct arm_sync_icache_args args = { .addr = (uintptr_t)start, .len = size };
+ sysarch(ARM_SYNC_ICACHE, (void *)&args);
#else
register uint32_t beg asm("r0") = reinterpret_cast<uint32_t>(start);
register uint32_t end asm("r1") = beg + size;

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-deps_v8_src_base_atomicops.h,v 1.1 2015/10/21 23:46:28 jmcneill Exp $
--- deps/v8/src/base/atomicops.h.orig 2015-10-13 17:20:07.000000000 +0000
+++ deps/v8/src/base/atomicops.h
@@ -54,9 +54,13 @@ typedef intptr_t Atomic64;
#endif // defined(V8_HOST_ARCH_64_BIT)
#endif // defined(__native_client__)
+#if defined(__NetBSD__) && defined(__arm__)
+typedef int32_t AtomicWord;
+#else
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.
typedef intptr_t AtomicWord;
+#endif
// Atomically execute:
// result = *ptr;

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-deps_v8_src_base_atomicops__internals__arm__gcc.h,v 1.2 2016/09/13 10:10:42 fhajny Exp $
--- deps/v8/src/base/atomicops_internals_arm_gcc.h.orig 2016-08-26 15:27:18.000000000 +0000
+++ deps/v8/src/base/atomicops_internals_arm_gcc.h
@@ -13,6 +13,11 @@
#include <sys/cpuinline.h>
#endif
+#if defined(__NetBSD__)
+#include <sys/types.h>
+#include <machine/sysarch.h>
+#endif
+
namespace v8 {
namespace base {
@@ -50,6 +55,8 @@ inline void MemoryBarrier() {
((KernelMemoryBarrierFunc)0xffff0fa0)();
#elif defined(__QNXNTO__)
__cpu_membarrier();
+#elif defined(__NetBSD__)
+ sysarch(ARM_DRAIN_WRITEBUF, (void *)0);
#else
// Fallback to GCC built-in function
__sync_synchronize();

View File

@@ -0,0 +1,53 @@
$NetBSD: patch-deps_v8_src_base_platform_platform-openbsd.cc,v 1.1 2015/10/21 23:46:28 jmcneill Exp $
--- deps/v8/src/base/platform/platform-openbsd.cc.orig 2015-10-13 17:20:07.000000000 +0000
+++ deps/v8/src/base/platform/platform-openbsd.cc
@@ -34,6 +34,48 @@
namespace v8 {
namespace base {
+#ifdef __arm__
+
+bool OS::ArmUsingHardFloat() {
+ // GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
+ // the Floating Point ABI used (PCS stands for Procedure Call Standard).
+ // We use these as well as a couple of other defines to statically determine
+ // what FP ABI used.
+ // GCC versions 4.4 and below don't support hard-fp.
+ // GCC versions 4.5 may support hard-fp without defining __ARM_PCS or
+ // __ARM_PCS_VFP.
+
+#define GCC_VERSION (__GNUC__ * 10000 \
+ + __GNUC_MINOR__ * 100 \
+ + __GNUC_PATCHLEVEL__)
+#if GCC_VERSION >= 40600
+#if defined(__ARM_PCS_VFP)
+ return true;
+#else
+ return false;
+#endif
+
+#elif GCC_VERSION < 40500
+ return false;
+
+#else
+#if defined(__ARM_PCS_VFP)
+ return true;
+#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \
+ !defined(__VFP_FP__)
+ return false;
+#else
+#error "Your version of GCC does not report the FP ABI compiled for." \
+ "Please report it on this issue" \
+ "http://code.google.com/p/v8/issues/detail?id=2140"
+
+#endif
+#endif
+#undef GCC_VERSION
+}
+
+#endif // def __arm__
+
const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
if (std::isnan(time)) return "";

View File

@@ -0,0 +1,17 @@
$NetBSD: patch-deps_v8_src_log-utils.h,v 1.1 2015/11/09 20:19:35 fhajny Exp $
Need stdarg.h for va_list.
--- deps/v8/src/log-utils.h.orig 2015-10-29 12:22:04.000000000 +0000
+++ deps/v8/src/log-utils.h
@@ -9,6 +9,10 @@
#include "src/base/platform/mutex.h"
#include "src/flags.h"
+#if defined(__NetBSD__)
+#include <stdarg.h>
+#endif
+
namespace v8 {
namespace internal {

View File

@@ -1,20 +1,21 @@
$NetBSD: patch-deps_v8_src_types.h,v 1.1 2015/09/12 21:35:15 fhajny Exp $
$NetBSD: patch-deps_v8_src_types.h,v 1.3 2016/06/02 09:57:32 fhajny Exp $
NetBSD 6 doesn't have nearbyint.
NetBSD 6 doesn't have nearbyint/nearbyintf.
--- deps/v8/src/types.h.orig 2015-09-08 15:30:40.000000000 +0000
--- deps/v8/src/types.h.orig 2015-10-29 12:22:04.000000000 +0000
+++ deps/v8/src/types.h
@@ -10,6 +10,13 @@
#include "src/handles.h"
#include "src/ostreams.h"
@@ -5,6 +5,14 @@
#ifndef V8_TYPES_H_
#define V8_TYPES_H_
+#ifdef __NetBSD__
+#include <sys/param.h>
+#if __NetBSD_Version__ - 0 < 699001700
+#define nearbyint rint
+#define nearbyintf rintf
+#endif
+#endif
+
namespace v8 {
namespace internal {
#include "src/conversions.h"
#include "src/handles.h"
#include "src/objects.h"

View File

@@ -1,68 +0,0 @@
$NetBSD: patch-deps_v8_tools_gyp_v8.gyp,v 1.3 2015/09/09 00:04:54 ryoon Exp $
Fix path to Python.
--- deps/v8/tools/gyp/v8.gyp.orig 2015-09-08 15:30:44.000000000 +0000
+++ deps/v8/tools/gyp/v8.gyp
@@ -1696,14 +1696,14 @@
'<(PRODUCT_DIR)/natives_blob_host.bin',
],
'action': [
- 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
+ '@PYTHONBIN@', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
],
}, {
'outputs': [
'<(PRODUCT_DIR)/natives_blob.bin',
],
'action': [
- 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+ '@PYTHONBIN@', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
],
}],
],
@@ -1712,7 +1712,7 @@
'<(PRODUCT_DIR)/natives_blob.bin',
],
'action': [
- 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+ '@PYTHONBIN@', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
],
}],
],
@@ -1812,7 +1812,7 @@
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
],
'action': [
- 'python',
+ '@PYTHONBIN@',
'../../tools/js2c.py',
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
'CORE',
@@ -1838,7 +1838,7 @@
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
],
'action': [
- 'python',
+ '@PYTHONBIN@',
'../../tools/js2c.py',
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
'EXPERIMENTAL',
@@ -1863,7 +1863,7 @@
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
],
'action': [
- 'python',
+ '@PYTHONBIN@',
'../../tools/js2c.py',
'<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
'EXTRAS',
@@ -1900,7 +1900,7 @@
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
],
'action': [
- 'python',
+ '@PYTHONBIN@',
'../../tools/gen-postmortem-metadata.py',
'<@(_outputs)',
'<@(heapobject_files)'

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-src_node.cc,v 1.1 2016/05/27 23:30:51 fhajny Exp $
Handle NetBSD the same way as FreeBSD.
--- src/node.cc.orig 2016-05-17 19:53:07.000000000 +0000
+++ src/node.cc
@@ -3801,7 +3801,7 @@ static int RegisterDebugSignalHandler()
// Don't shrink the thread's stack on FreeBSD. Said platform decided to
// follow the pthreads specification to the letter rather than in spirit:
// https://lists.freebsd.org/pipermail/freebsd-current/2014-March/048885.html
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
CHECK_EQ(0, pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN));
#endif // __FreeBSD__
CHECK_EQ(0, pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED));

View File

@@ -1,18 +1,18 @@
$NetBSD: patch-tools_install.py,v 1.3 2015/09/09 00:04:54 ryoon Exp $
$NetBSD: patch-tools_install.py,v 1.4 2016/01/21 11:45:30 fhajny Exp $
Install man pages under the right directory.
--- tools/install.py.orig 2015-09-08 15:30:49.000000000 +0000
--- tools/install.py.orig 2016-01-21 01:08:27.000000000 +0000
+++ tools/install.py
@@ -141,9 +141,9 @@ def files(action):
@@ -141,10 +141,7 @@ def files(action):
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
- if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
- action(['doc/node.1'], 'man/man1/')
+ action(['doc/node.1'], '@PKGMANDIR@/man1/')
else:
- else:
- action(['doc/node.1'], 'share/man/man1/')
+ action(['doc/node.1'], '@PKGMANDIR@/man1/')
+ action(['doc/node.1'], os.environ.get('PKGMANDIR') + '/man1/')
if 'true' == variables.get('node_install_npm'): npm_files(action)