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

@@ -1,65 +1,71 @@
$NetBSD: patch-base_process.cc,v 1.3 2013/09/07 18:42:14 ryoon Exp $
$NetBSD: patch-base_process.cc,v 1.4 2016/05/16 11:51:49 ryoon Exp $
--- base/process.cc.orig 2013-08-28 05:26:13.000000000 +0000
--- base/process.cc.orig 2016-05-15 08:11:10.000000000 +0000
+++ base/process.cc
@@ -46,7 +46,7 @@
@@ -46,12 +46,12 @@
#include "base/mac_process.h"
#endif // OS_MACOSX
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL) || defined(OS_NETBSD)
#include <fcntl.h>
#include <signal.h>
#include <spawn.h> // for posix_spawn().
@@ -121,12 +121,12 @@ bool Process::OpenBrowser(const string &
#include <sys/types.h>
-#endif // OS_LINUX || OS_ANDROID || OS_NACL
+#endif // OS_LINUX || OS_ANDROID || OS_NACL || OS_NETBSD
#include <cstdlib>
#include <memory>
@@ -125,12 +125,12 @@ bool Process::OpenBrowser(const string &
return ShellExecuteInSystemDir(L"open", wurl.c_str(), NULL, SW_SHOW);
#endif
-#ifdef OS_LINUX
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL)
- static const char kBrowserCommand[] = "/usr/bin/xdg-open";
+#if defined(OS_LINUX) || defined(OS_NETBSD)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL) || defined(OS_NETBSD)
+ static const char kBrowserCommand[] = "@PREFIX@/bin/xdg-open";
// xdg-open which uses kfmclient or gnome-open internally works both on KDE
// and GNOME environments.
return SpawnProcess(kBrowserCommand, url);
-#endif // LINUX
+#endif // OS_LINUX || OS_NETBSD
-#endif // OS_LINUX || OS_ANDROID || OS_NACL
+#endif // OS_LINUX || OS_ANDROID || OS_NACL || OS_NETBSD
#ifdef OS_MACOSX
return MacProcess::OpenBrowserForMac(url);
@@ -205,7 +205,7 @@ bool Process::SpawnProcess(const string
@@ -209,7 +209,7 @@ bool Process::SpawnProcess(const string
}
#endif
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL) || defined(OS_NETBSD)
// Do not call posix_spawn() for obviously bad path.
if (!S_ISREG(statbuf.st_mode)) {
LOG(ERROR) << "Not a regular file: " << path;
@@ -228,7 +228,7 @@ bool Process::SpawnProcess(const string
@@ -232,7 +232,7 @@ bool Process::SpawnProcess(const string
// (www.gnu.org/software/libc/manual/html_node/Heap-Consistency-Checking.html)
const int kOverwrite = 0; // Do not overwrite.
::setenv("MALLOC_CHECK_", "2", kOverwrite);
-#endif // OS_LINUX
+#endif // OS_LINUX || OS_NETBSD
-#endif // OS_LINUX || OS_ANDROID || OS_NACL
+#endif // OS_LINUX || OS_ANDROID || OS_NACL || OS_NETBSD
pid_t tmp_pid = 0;
// Spawn new process.
@@ -399,7 +399,7 @@ bool Process::LaunchErrorMessageDialog(c
@@ -403,7 +403,7 @@ bool Process::LaunchErrorMessageDialog(c
}
#endif // OS_WIN
-#ifdef OS_LINUX
+#if defined(OS_LINUX) || defined(OS_NETBSD)
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_NACL) || defined(OS_NETBSD)
const char kMozcTool[] = "mozc_tool";
const string arg = "--mode=error_message_dialog --error_type=" + error_type;
size_t pid = 0;
@@ -407,7 +407,7 @@ bool Process::LaunchErrorMessageDialog(c
@@ -411,7 +411,7 @@ bool Process::LaunchErrorMessageDialog(c
LOG(ERROR) << "cannot launch " << kMozcTool;
return false;
}
-#endif // OS_LINUX
+#endif // OS_LINUX || OS_NETBSD
-#endif // OS_LINUX || OS_ANDROID || OS_NACL
+#endif // OS_LINUX || OS_ANDROID || OS_NACL || OS_NETBSD
return true;
}