[Pkg-mongodb-maintainers] [pkg-mongodb] 259/394: debian/patches: Add preparation for kFreeBSD.

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Wed Sep 21 13:59:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository pkg-mongodb.

commit 50e5786877ddd6aba22652091bfae8b7c34ce35d
Author: Rogério Brito <rbrito at ime.usp.br>
Date:   Sat Apr 20 18:18:18 2013 -0300

    debian/patches: Add preparation for kFreeBSD.
---
 ...eate-kfreebsd-like-linux-in-most-respects.patch | 29 ++++++++++++++++++++++
 debian/patches/0002-kfreebsd-has-dev-urandom.patch | 20 +++++++++++++++
 ...latforms-but-Windows-find-hash-in-std-tr1.patch | 24 ++++++++++++++++++
 .../0004-kfreebsd-does-not-have-sys-prctl.h.patch  | 27 ++++++++++++++++++++
 debian/patches/series                              |  4 +++
 5 files changed, 104 insertions(+)

diff --git a/debian/patches/0001-Treate-kfreebsd-like-linux-in-most-respects.patch b/debian/patches/0001-Treate-kfreebsd-like-linux-in-most-respects.patch
new file mode 100644
index 0000000..474ffa7
--- /dev/null
+++ b/debian/patches/0001-Treate-kfreebsd-like-linux-in-most-respects.patch
@@ -0,0 +1,29 @@
+From be5026fb86bdfb7502904ddf7a20f2f2351dbb5a Mon Sep 17 00:00:00 2001
+From: Jeff Epler <jepler at unpythonic.net>
+Date: Fri, 19 Apr 2013 08:15:18 -0500
+Subject: [PATCH 1/6] Treate kfreebsd like linux in most respects
+
+---
+ SConstruct |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/SConstruct
++++ b/SConstruct
+@@ -326,6 +326,8 @@
+ 
+ if env['PYSYSPLATFORM'] == 'linux3':
+     env['PYSYSPLATFORM'] = 'linux2'
++if 'gnukfreebsd' in env['PYSYSPLATFORM']:
++    env['PYSYSPLATFORM'] = 'linux2'
+ if 'freebsd' in env['PYSYSPLATFORM']:
+     env['PYSYSPLATFORM'] = 'freebsd'
+ 
+@@ -506,7 +508,7 @@
+        env.Append( EXTRACPPPATH=filterExists(["/sw/include" , "/opt/local/include"]) )
+        env.Append( EXTRALIBPATH=filterExists(["/sw/lib/", "/opt/local/lib"]) )
+ 
+-elif os.sys.platform.startswith("linux"):
++elif os.sys.platform.startswith("linux") or os.sys.platform.startswith("gnukfreebsd"):
+     linux = True
+     platform = "linux"
+ 
diff --git a/debian/patches/0002-kfreebsd-has-dev-urandom.patch b/debian/patches/0002-kfreebsd-has-dev-urandom.patch
new file mode 100644
index 0000000..57a64ee
--- /dev/null
+++ b/debian/patches/0002-kfreebsd-has-dev-urandom.patch
@@ -0,0 +1,20 @@
+From 774020a83b892307d066edd1d7f1f286c247b182 Mon Sep 17 00:00:00 2001
+From: Jeff Epler <jepler at unpythonic.net>
+Date: Fri, 19 Apr 2013 08:16:19 -0500
+Subject: [PATCH 2/6] kfreebsd has /dev/urandom
+
+---
+ src/mongo/platform/random.cpp |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/mongo/platform/random.cpp
++++ b/src/mongo/platform/random.cpp
+@@ -105,7 +105,7 @@
+         return new WinSecureRandom();
+     }
+ 
+-#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__)
++#elif defined(__linux__) || defined(__sunos__) || defined(__APPLE__) || defined(__FreeBSD_kernel__)
+ 
+     class InputStreamSecureRandom : public SecureRandom {
+     public:
diff --git a/debian/patches/0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch b/debian/patches/0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
new file mode 100644
index 0000000..8ded15b
--- /dev/null
+++ b/debian/patches/0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
@@ -0,0 +1,24 @@
+From 63d6800e630c3c528076db31d5e7b42e6fa316f2 Mon Sep 17 00:00:00 2001
+From: Jeff Epler <jepler at unpythonic.net>
+Date: Fri, 19 Apr 2013 08:16:31 -0500
+Subject: [PATCH 3/6] All platforms but Windows find hash in std::tr1
+
+---
+ src/third_party/s2/hash.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/third_party/s2/hash.h
++++ b/src/third_party/s2/hash.h
+@@ -7,10 +7,10 @@
+ #include "mongo/platform/unordered_set.h"
+ #define hash_set mongo::unordered_set
+ 
+-#if defined OS_LINUX || defined OS_MACOSX || defined __sunos__ || defined __freebsd__
++#if ! defined OS_WINDOWS
+ #define HASH_NAMESPACE_START namespace std { namespace tr1 {
+ #define HASH_NAMESPACE_END }}
+-#elif defined OS_WINDOWS
++#else
+ #define HASH_NAMESPACE_START namespace std {
+ #define HASH_NAMESPACE_END }
+ #endif
diff --git a/debian/patches/0004-kfreebsd-does-not-have-sys-prctl.h.patch b/debian/patches/0004-kfreebsd-does-not-have-sys-prctl.h.patch
new file mode 100644
index 0000000..0f0d136
--- /dev/null
+++ b/debian/patches/0004-kfreebsd-does-not-have-sys-prctl.h.patch
@@ -0,0 +1,27 @@
+From d24210674ea68032343db19027c6aa6e5cba3429 Mon Sep 17 00:00:00 2001
+From: Jeff Epler <jepler at unpythonic.net>
+Date: Fri, 19 Apr 2013 08:16:47 -0500
+Subject: [PATCH 4/6] kfreebsd does not have <sys/prctl.h>
+
+This change was reviewed by Pino Toscano in:
+
+    https://github.com/rbrito/mongo-debian/pull/2/files#r3884772
+
+and edited by Rogério Theodoro de Brito accordingly.
+
+---
+ src/third_party/v8/src/platform-linux.cc |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/third_party/v8/src/platform-linux.cc
++++ b/src/third_party/v8/src/platform-linux.cc
+@@ -31,7 +31,9 @@
+ #include <pthread.h>
+ #include <semaphore.h>
+ #include <signal.h>
++#ifdef __linux__
+ #include <sys/prctl.h>
++#endif
+ #include <sys/time.h>
+ #include <sys/resource.h>
+ #include <sys/syscall.h>
diff --git a/debian/patches/series b/debian/patches/series
index 0dcae83..b3f5937 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,5 @@
 0001-Use-libstemmer-when-using-system-libraries.patch
+0001-Treate-kfreebsd-like-linux-in-most-respects.patch
+0002-kfreebsd-has-dev-urandom.patch
+0003-All-platforms-but-Windows-find-hash-in-std-tr1.patch
+0004-kfreebsd-does-not-have-sys-prctl.h.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git



More information about the Pkg-mongodb-maintainers mailing list