summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2012-04-01 20:53:43 +0000
committerryoon <ryoon@pkgsrc.org>2012-04-01 20:53:43 +0000
commit2900c094960626038254683f4b9a0d54fd99cd67 (patch)
treec2a13bfb3a04aec4109bb44b68c6077248771495
parent8612613cfd557b70d31f7560bc5e133eed02c250 (diff)
downloadpkgsrc-2900c094960626038254683f4b9a0d54fd99cd67.tar.gz
Fix build on FreeBSD 9.0.
* Patches are borrowed from deve/xulrunner
-rw-r--r--mail/thunderbird/distinfo26
-rw-r--r--mail/thunderbird/patches/patch-at8
-rw-r--r--mail/thunderbird/patches/patch-bf19
-rw-r--r--mail/thunderbird/patches/patch-ipc_chromium_src_base_debug__util__posic.cc18
-rw-r--r--mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc23
-rw-r--r--mail/thunderbird/patches/patch-ipc_chromium_src_build_build__config.h13
-rw-r--r--mail/thunderbird/patches/patch-mm13
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc40
-rw-r--r--mail/thunderbird/patches/patch-pa6
-rw-r--r--mail/thunderbird/patches/patch-pb6
-rw-r--r--mail/thunderbird/patches/patch-pc6
-rw-r--r--mail/thunderbird/patches/patch-pd6
-rw-r--r--mail/thunderbird/patches/patch-pg6
13 files changed, 125 insertions, 65 deletions
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 2e20f48f8c2..3b8dc3f7a24 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.93 2012/03/24 04:29:53 ryoon Exp $
+$NetBSD: distinfo,v 1.94 2012/04/01 20:53:43 ryoon Exp $
SHA1 (comm-release-f60c071e187b.tar.bz2) = 7b3770d918a7662688d6641bc367c1c375bc7200
RMD160 (comm-release-f60c071e187b.tar.bz2) = e1efa6624eaf565b95f7e9d68ca04a3cbbe47f05
@@ -25,7 +25,7 @@ SHA1 (patch-am) = 108252ed517d9388f2a6c70ffa15782045ae23d5
SHA1 (patch-an) = 7fe9f52b2825bb2db6835a431dc4a140d4984fc7
SHA1 (patch-ao) = 644c4fcb52b3552fab5d7c5960205bf7a78a90c2
SHA1 (patch-as) = a8eb4a63122027696a5d97e76b9459dbfdc722cb
-SHA1 (patch-at) = 519a2d835e0cc9183bf7a899aee382fae72c3d5e
+SHA1 (patch-at) = 800a162d453deed47e699f900397c5f9baf3dcf4
SHA1 (patch-au) = 23a04bb48df4e54c058f09ab9036d4766d1f9e3e
SHA1 (patch-av) = 1ef659c3fe6ecdaabc247b04d8f002f2d860602d
SHA1 (patch-aw) = 480343cbefae9249f57948047d94f28312db94d4
@@ -34,18 +34,18 @@ SHA1 (patch-ay) = 7b6452a1563d5ac53d39673081f73d3da8534d32
SHA1 (patch-az) = 67cbe6fd7e09692f095ce2bfd76f0f554eec240d
SHA1 (patch-ba) = b015d5d067e21d134517410f68be43f414ffe669
SHA1 (patch-bd) = 7d23bbf11b84aaad5f2c39bb68b95ecfc7def6b5
-SHA1 (patch-bf) = bfee07121770f85a1a5f85ee6b9ac4c97066d109
+SHA1 (patch-bf) = 25852506f849cdb15de2e96d7c4a7ff4674e3374
SHA1 (patch-bg) = 9fcb2b715d5d2fdec3dceef63aa1dbbd5d40a377
SHA1 (patch-bi) = 40fe7fb45d2bce5c783cb3277a2b45e86ac84777
SHA1 (patch-directory_c-sdk_ldap_include_portable.h) = 1267429d7c38dd8d18132bd2afe6d0ffb1ea5062
-SHA1 (patch-ipc_chromium_src_base_debug__util__posic.cc) = b6c0d2866075e02364e6ce497e4a08670f97d969
+SHA1 (patch-ipc_chromium_src_base_debug__util__posic.cc) = 2e360b8f5f9ade915aad3e9abb00b3b3619686e1
SHA1 (patch-ipc_chromium_src_base_file__util.h) = 8009f5d95351778445b95bffb9628a4a60604bd7
SHA1 (patch-ipc_chromium_src_base_file__util__posix.cc) = 924f9f08e669b0bb2de6f057a6b73437451717a3
SHA1 (patch-ipc_chromium_src_base_platform__file__posix.cc) = a46f6f521fed6b20790adf2e61e8c8035ed82e62
-SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 390225a35ddbee30c267ecb49e6e94528688d6a9
+SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = c41602997d974027fb6d545a558115b8062717bf
SHA1 (patch-ipc_chromium_src_base_sys__info__posix.cc) = 41dfad0a3832617f35ffd5ad28b46629af0a4e39
SHA1 (patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h) = 953144000b151c3f66a853fbceedffb2c59af1fe
-SHA1 (patch-ipc_chromium_src_build_build__config.h) = 70f999b89dd404d9c570df392f2ebb73b2fd566f
+SHA1 (patch-ipc_chromium_src_build_build__config.h) = e22b93aea2fa16d1827affb91cd90b46fb542952
SHA1 (patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h) = baca4a739d33af57603ed59daa1f70cd7f27c643
SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = edafd776127970983c9ead2c27a925b95901f850
SHA1 (patch-js_src_jscpucfg.h) = 1e4a3dfd07b0402bfe526993e79f502654bc4748
@@ -61,7 +61,7 @@ SHA1 (patch-mi) = f880cbc91e0d82cb6dc12ca06791f7ae5b9e3fa4
SHA1 (patch-mj) = 92ff1555456133685f2b78237a39af57c4199acf
SHA1 (patch-mk) = 1dd0679019942c9c17501174331496f55fb1d028
SHA1 (patch-ml) = 37efa4fb1a6b64a02dbc8b7333825111d1ccbda3
-SHA1 (patch-mm) = e9b4e83d4fee0aee0c56f85f0a320587184e2cf4
+SHA1 (patch-mm) = f364ecb21e1bdf9c230cec4651b10afaca3d8ce0
SHA1 (patch-mn) = 043ff332b494ddc9dfff3286a4c7e296a9b352f4
SHA1 (patch-mozilla_build_autoconf_gcc-pr49911.m4) = 84f15ee18c95829b19127b6efa46e57380528315
SHA1 (patch-mozilla_build_autoconf_nss.m4) = 3344fd1a92508acf627371cebbb43b6f603652d5
@@ -74,7 +74,7 @@ SHA1 (patch-mozilla_ipc_chromium_src_base_file__util__bsd.cc) = ec55788a5b24f331
SHA1 (patch-mozilla_ipc_chromium_src_base_message__loop.cc) = 2a437553e275ed620e27564f13868a8fcf118e12
SHA1 (patch-mozilla_ipc_chromium_src_base_platform__thread.h) = 61a7c02dad19b43a3b2a5ae344179247e2a2b68d
SHA1 (patch-mozilla_ipc_chromium_src_base_process__util.h) = e76cd9f3e3ee9aaadf370e5b2caa0c9aabad2fec
-SHA1 (patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc) = 66814937d118722757803a07d4349a32c0c52740
+SHA1 (patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc) = 096d057551075657b1afe8c7ecdc4b2614005d64
SHA1 (patch-mozilla_ipc_chromium_src_base_process__util__posix.cc) = 3e1c0e528f1f0a4fe846210fa62f700a9ea62179
SHA1 (patch-mozilla_ipc_chromium_src_base_third__party_nspr_prtime.cc) = 55eb4ea80c65ecff08e2cda70e3dc3c9acf951b8
SHA1 (patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h) = f55a0be54139ed8263aefcf1bd43e32cb93c7650
@@ -95,11 +95,11 @@ SHA1 (patch-mozilla_xpcom_Makefile.in) = 9428dfcb63383b400a612109688de83666307cc
SHA1 (patch-mozilla_xpcom_idl-parser_header.py) = 20576ed95f52b4511e1c44bce7d682574b85f630
SHA1 (patch-mozilla_xulrunner_app_Makefile.in) = b2273dad40cb3b6b492836cdbb7ec2ef7ef3aeac
SHA1 (patch-mp) = c9bafe6774355e15902eca88eb1356bb1b1be0db
-SHA1 (patch-pa) = 8274a6d58f55d379d801db2d5f9fd15f438b9b4c
-SHA1 (patch-pb) = 9574ef8d5b36731ef9ee6c32c3252b63b544caf6
-SHA1 (patch-pc) = 5cd43719cfd4174f5fcfc21617e68fc43ef72749
-SHA1 (patch-pd) = f3ffe36832859e4c33b676ecc7da55c93240b546
-SHA1 (patch-pg) = 40c8a77070ea6a18f7ab263615ab0f51eea9b00d
+SHA1 (patch-pa) = 0e9a8dc2d40d3747e60b1873995d35e158db3f93
+SHA1 (patch-pb) = cea8d221a02a24e35d6dd50343c1cea26d4aa8c3
+SHA1 (patch-pc) = d7fa66c3184906af1da908b6c28f71e238de6575
+SHA1 (patch-pd) = 6df0c5541d6cdd93ebe4053e6d1ff5dd886eb038
+SHA1 (patch-pg) = e8bb4d29764dc4dfd2d0f8771d09ec6158572b2f
SHA1 (patch-rc) = f9384fc136f9b1e73dfe5b85159b1c26c9fd4143
SHA1 (patch-security_nss_cmd_shlibsign_sign.sh) = 4c4332855c9ca7d65c5e171bb51acceebb58bc13
SHA1 (patch-toolkit_toolkit-tiers.mk) = afcb2a332543d83aa2c0dc863134a25821748ff5
diff --git a/mail/thunderbird/patches/patch-at b/mail/thunderbird/patches/patch-at
index 0c697ebb5c1..59e171973a2 100644
--- a/mail/thunderbird/patches/patch-at
+++ b/mail/thunderbird/patches/patch-at
@@ -1,14 +1,12 @@
-$NetBSD: patch-at,v 1.7 2012/03/10 11:42:38 ryoon Exp $
+$NetBSD: patch-at,v 1.8 2012/04/01 20:53:43 ryoon Exp $
-Avoid silly redefinitions of standard types on NetBSD.
-
---- mozilla/gfx/qcms/qcmstypes.h.orig 2012-02-16 10:24:57.000000000 +0000
+--- mozilla/gfx/qcms/qcmstypes.h.orig 2012-03-13 02:43:07.000000000 +0000
+++ mozilla/gfx/qcms/qcmstypes.h
@@ -10,6 +10,8 @@
#if defined (__SVR4) && defined (__sun)
/* int_types.h gets included somehow, so avoid redefining the types differently */
#include <sys/int_types.h>
-+#elif defined(__NetBSD__) || defined(__DragonFly__)
++#elif defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD__)
+#include <stdint.h>
#elif defined (_AIX)
#include <sys/types.h>
diff --git a/mail/thunderbird/patches/patch-bf b/mail/thunderbird/patches/patch-bf
index 71e7e971fbc..8a1223a431e 100644
--- a/mail/thunderbird/patches/patch-bf
+++ b/mail/thunderbird/patches/patch-bf
@@ -1,17 +1,26 @@
-$NetBSD: patch-bf,v 1.3 2012/03/10 11:42:38 ryoon Exp $
+$NetBSD: patch-bf,v 1.4 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/js/src/jsnativestack.cpp.orig 2012-02-16 10:25:04.000000000 +0000
+--- mozilla/js/src/jsnativestack.cpp.orig 2012-03-13 02:43:15.000000000 +0000
+++ mozilla/js/src/jsnativestack.cpp
-@@ -50,7 +50,7 @@
+@@ -50,10 +50,16 @@
#elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX)
# include <pthread.h>
-# if defined(__FreeBSD__) || defined(__OpenBSD__)
-+# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++# if defined(__OpenBSD__) || defined(__DragonFly__)
# include <pthread_np.h>
# endif
-@@ -145,7 +145,7 @@ GetNativeStackBaseImpl()
++# if defined(__FreeBSD__)
++_Pragma("GCC visibility push(default)")
++# include <pthread_np.h>
++_Pragma("GCC visibility pop")
++# endif
++
+ #else
+ # error "Unsupported platform"
+
+@@ -145,7 +151,7 @@ GetNativeStackBaseImpl()
pthread_attr_init(&sattr);
# if defined(__OpenBSD__)
stack_t ss;
diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_debug__util__posic.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_debug__util__posic.cc
index 76a89207de0..f415171ead9 100644
--- a/mail/thunderbird/patches/patch-ipc_chromium_src_base_debug__util__posic.cc
+++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_debug__util__posic.cc
@@ -1,6 +1,6 @@
-$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.2 2012/03/10 11:42:38 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-02-16 10:25:01.000000000 +0000
+--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-04-01 15:39:02.000000000 +0000
+++ mozilla/ipc/chromium/src/base/debug_util_posix.cc
@@ -5,7 +5,7 @@
#include "build/build_config.h"
@@ -11,20 +11,22 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.2 2012/03/10 11:4
#include <errno.h>
#include <fcntl.h>
-@@ -17,8 +17,11 @@
+@@ -17,8 +17,13 @@
#include <unistd.h>
#if MOZ_HAVE_EXECINFO_H
#include <execinfo.h>
-#include <sys/sysctl.h>
#endif
-+#if defined(OS_DRAGONFLY)
++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
+#include <sys/user.h>
++#elif defined(OS_FREEBSD)
++#include <sys/proc.h>
+#endif
+#include <sys/sysctl.h>
#include "base/basictypes.h"
#include "base/eintr_wrapper.h"
-@@ -32,7 +35,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
+@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
return false;
}
@@ -33,12 +35,14 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.2 2012/03/10 11:4
// Based on Apple's recommended method as described in
// http://developer.apple.com/qa/qa2004/qa1361.html
-@@ -71,7 +74,11 @@ bool DebugUtil::BeingDebugged() {
+@@ -71,7 +76,13 @@ bool DebugUtil::BeingDebugged() {
// This process is being debugged if the P_TRACED flag is set.
is_set = true;
-+#if defined(__DragonFly__)
++#if defined(OS_DRAGONFLY)
+ being_debugged = (info.kp_flags & P_TRACED) != 0;
++#elif defined(OS_FREEBSD)
++ being_debugged = (info.ki_flag & P_TRACED) != 0;
+#else
being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
+#endif
diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
index 25da7c47096..7368845a8be 100644
--- a/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
+++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2012/03/10 11:42:38 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.3 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-02-16 10:25:01.000000000 +0000
+--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-04-01 15:50:47.000000000 +0000
+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,9 +9,13 @@
+@@ -9,9 +9,18 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -13,10 +13,15 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2012/03/10
#include <unistd.h>
+#elif defined(OS_DRAGONFLY)
+#include <unistd.h>
++#elif defined(OS_FREEBSD)
++#include <sys/thr.h>
++_Pragma("GCC visibility push(default)")
++# include <pthread_np.h>
++_Pragma("GCC visibility pop")
#endif
#if defined(OS_MACOSX)
-@@ -33,6 +37,14 @@ PlatformThreadId PlatformThread::Current
+@@ -33,6 +42,18 @@ PlatformThreadId PlatformThread::Current
// into the kernel.
#if defined(OS_MACOSX)
return mach_thread_self();
@@ -25,9 +30,13 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.2 2012/03/10
+#elif defined(OS_DRAGONFLY)
+ return lwp_gettid();
+#elif defined(OS_FREEBSD)
-+ lwpid_t lwpid;
-+ thr_self( &lwpid );
-+ return lwpid;
++# if __FreeBSD_cc_version > 900000
++ return pthread_getthreadid_np();
++# else
++ lwpid_t lwpid;
++ thr_self( &lwpid );
++ return lwpid;
++# endif
#elif defined (__OpenBSD__)
// TODO(BSD): find a better thread ID
return (intptr_t)(pthread_self());
diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_build_build__config.h b/mail/thunderbird/patches/patch-ipc_chromium_src_build_build__config.h
index 5db34301d46..fecaf6c9167 100644
--- a/mail/thunderbird/patches/patch-ipc_chromium_src_build_build__config.h
+++ b/mail/thunderbird/patches/patch-ipc_chromium_src_build_build__config.h
@@ -1,8 +1,8 @@
-$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.2 2012/03/10 11:42:38 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.3 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-02-16 10:25:01.000000000 +0000
+--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 02:43:11.000000000 +0000
+++ mozilla/ipc/chromium/src/build/build_config.h
-@@ -19,6 +19,10 @@
+@@ -19,17 +19,23 @@
#define OS_MACOSX 1
#elif defined(__linux__) || defined(ANDROID)
#define OS_LINUX 1
@@ -13,7 +13,12 @@ $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.2 2012/03/10 11:42:38
#elif defined(__OpenBSD__)
#define OS_OPENBSD 1
#elif defined(_WIN32)
-@@ -29,7 +33,7 @@
+ #define OS_WIN 1
++#elif defined(__FreeBSD__)
++#define OS_FREEBSD 1
+ #else
+ #error Please add support for your platform in build/build_config.h
+ #endif
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
diff --git a/mail/thunderbird/patches/patch-mm b/mail/thunderbird/patches/patch-mm
index 02bb74040a3..fc807155abc 100644
--- a/mail/thunderbird/patches/patch-mm
+++ b/mail/thunderbird/patches/patch-mm
@@ -1,16 +1,23 @@
-$NetBSD: patch-mm,v 1.6 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-mm,v 1.7 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/toolkit/library/Makefile.in.orig 2012-02-16 10:25:30.000000000 +0000
+--- mozilla/toolkit/library/Makefile.in.orig 2012-04-01 15:58:51.000000000 +0000
+++ mozilla/toolkit/library/Makefile.in
-@@ -209,6 +209,17 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
+@@ -554,6 +554,24 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
endif
endif
+ifeq ($(OS_ARCH),DragonFly)
+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
++EXTRA_DSO_LDOPTS += -lplc4 -lplds4 -lnspr4 -lnssutil3
++endif
++
++ifeq ($(OS_ARCH),FreeBSD)
++OS_LIBS += $(call EXPAND_LIBNAME,kvm)
++EXTRA_DSO_LDOPTS += -lplc4 -lplds4 -lnspr4 -lnssutil3
+endif
+
+ifeq ($(OS_ARCH),NetBSD)
++OS_LIBS += $(call EXPAND_LIBNAME,kvm)
+EXTRA_DSO_LDOPTS += -lossaudio
+endif
+ifdef PKGSRC_PULSEAUDIO
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
index 5b03948a88d..f1c4914c15e 100644
--- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
+++ b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
@@ -1,28 +1,44 @@
-$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.2 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-03-09 12:27:38.000000000 +0000
+--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 15:53:35.000000000 +0000
+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,298 @@
+@@ -0,0 +1,326 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// derived from process_util_linux.cc and process_util_mac.cc
+
-+// TODO: - add code for FreeBSD/DragonFly/MirBSD (?) to use kvm_getprocx
-+
+#include "base/process_util.h"
+
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <string>
++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
++/* DragonFly, as of v3.0.1, and FreeBSD 9.0-RELEASE do not explicitly mark symbols public */
++#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)")
++#define POST_SYS_INCLUDE _Pragma("GCC visibility pop")
++#else
++#define PRE_SYS_INCLUDE
++#define POST_SYS_INCLUDE
++#endif
++PRE_SYS_INCLUDE
+#include <kvm.h>
++POST_SYS_INCLUDE
+#include <sys/sysctl.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#if defined(OS_DRAGONFLY)
++PRE_SYS_INCLUDE
+#include <sys/user.h>
++POST_SYS_INCLUDE
++#define HAVE_POSIX_SPAWN 1
++#endif
++#if defined(OS_FREEBSD)
++PRE_SYS_INCLUDE
++#include <sys/user.h>
++POST_SYS_INCLUDE
+#endif
+
+#include "base/debug_util.h"
@@ -40,7 +56,9 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2012/03
+#endif
+
+#ifdef HAVE_POSIX_SPAWN
++PRE_SYS_INCLUDE
+#include <spawn.h>
++POST_SYS_INCLUDE
+extern "C" char **environ __dso_public;
+#endif
+
@@ -257,11 +275,12 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2012/03
+ kvm_t *kvm;
+ std::string exe(WideToASCII(executable_name));
+
-+#if defined(OS_DRAGONFLY)
++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
+ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
+ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries);
+ if (procs != NULL && numEntries > 0) {
+ for (int i = 0; i < numEntries; i++) {
++# if defined(OS_DRAGONFLY)
+ if (exe != procs[i].kp_comm) continue;
+ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue;
+ ProcessEntry e;
@@ -269,6 +288,15 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2012/03
+ e.ppid = procs[i].kp_ppid;
+ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile);
+ content.push_back(e);
++# elif defined(OS_FREEBSD)
++ if (exe != procs[i].ki_comm) continue;
++ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue;
++ ProcessEntry e;
++ e.pid = procs[i].ki_pid;
++ e.ppid = procs[i].ki_ppid;
++ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile);
++ content.push_back(e);
++# endif
+#else
+ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
+ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries);
diff --git a/mail/thunderbird/patches/patch-pa b/mail/thunderbird/patches/patch-pa
index 42f0a9d9e69..6e90dde9734 100644
--- a/mail/thunderbird/patches/patch-pa
+++ b/mail/thunderbird/patches/patch-pa
@@ -1,11 +1,11 @@
-$NetBSD: patch-pa,v 1.4 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-pa,v 1.5 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/xulrunner/installer/mozilla-js.pc.in.orig 2012-02-16 10:25:33.000000000 +0000
+--- mozilla/xulrunner/installer/mozilla-js.pc.in.orig 2012-04-01 16:04:27.000000000 +0000
+++ mozilla/xulrunner/installer/mozilla-js.pc.in
@@ -6,5 +6,5 @@ Name: JavaScript
Description: The Mozilla JavaScript Library
Version: %MOZILLA_VERSION%
Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib %MOZ_JS_LINK%
-+Libs: -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner %MOZ_JS_LINK%
++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird -L${prefix}/lib/thunderbird %MOZ_JS_LINK%
Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
diff --git a/mail/thunderbird/patches/patch-pb b/mail/thunderbird/patches/patch-pb
index 5955c3951ca..d2fc47d85e6 100644
--- a/mail/thunderbird/patches/patch-pb
+++ b/mail/thunderbird/patches/patch-pb
@@ -1,11 +1,11 @@
-$NetBSD: patch-pb,v 1.4 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-pb,v 1.5 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/xulrunner/installer/libxul.pc.in.orig 2012-02-16 10:25:33.000000000 +0000
+--- mozilla/xulrunner/installer/libxul.pc.in.orig 2012-04-01 16:07:35.000000000 +0000
+++ mozilla/xulrunner/installer/libxul.pc.in
@@ -7,5 +7,5 @@ Name: libxul
Description: The Mozilla Runtime and Embedding Engine
Version: %MOZILLA_VERSION%
Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib %MOZ_XUL_LINK%
-+Libs: -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner %MOZ_XUL_LINK%
++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird -L${prefix}/lib/thunderbird %MOZ_XUL_LINK%
Cflags: -I${includedir} %WCHAR_CFLAGS%
diff --git a/mail/thunderbird/patches/patch-pc b/mail/thunderbird/patches/patch-pc
index 1dbcdfdba5b..4e5e78f3b69 100644
--- a/mail/thunderbird/patches/patch-pc
+++ b/mail/thunderbird/patches/patch-pc
@@ -1,6 +1,6 @@
-$NetBSD: patch-pc,v 1.4 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-pc,v 1.5 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/xulrunner/installer/libxul-embedding.pc.in.orig 2012-02-16 10:25:33.000000000 +0000
+--- mozilla/xulrunner/installer/libxul-embedding.pc.in.orig 2012-04-01 16:10:27.000000000 +0000
+++ mozilla/xulrunner/installer/libxul-embedding.pc.in
@@ -6,5 +6,6 @@ idldir=%idldir%
Name: libxul-embedding
@@ -8,5 +8,5 @@ $NetBSD: patch-pc,v 1.4 2012/03/10 11:42:39 ryoon Exp $
Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue -ldl
+# XXXtnn -ldl removed
-+Libs: -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lxpcomglue
++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird -L${prefix}/lib/thunderbird -lxpcomglue
Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
diff --git a/mail/thunderbird/patches/patch-pd b/mail/thunderbird/patches/patch-pd
index fd090533c63..e05c18409f8 100644
--- a/mail/thunderbird/patches/patch-pd
+++ b/mail/thunderbird/patches/patch-pd
@@ -1,11 +1,11 @@
-$NetBSD: patch-pd,v 1.4 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-pd,v 1.5 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/xulrunner/installer/mozilla-nss.pc.in.orig 2012-02-16 10:25:33.000000000 +0000
+--- mozilla/xulrunner/installer/mozilla-nss.pc.in.orig 2012-04-01 16:12:31.000000000 +0000
+++ mozilla/xulrunner/installer/mozilla-nss.pc.in
@@ -6,5 +6,5 @@ Name: NSS
Description: Mozilla Network Security Services
Version: %MOZILLA_VERSION%
Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lsmime3 -lssl3 -lnss3 -lnssutil3
-+Libs: -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lsmime3 -lssl3 -lnss3 -lnssutil3
++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird -L${prefix}/lib/thunderbird -lsmime3 -lssl3 -lnss3 -lnssutil3
Cflags: -I${includedir}
diff --git a/mail/thunderbird/patches/patch-pg b/mail/thunderbird/patches/patch-pg
index 96ffc0028f9..fe7c66abe69 100644
--- a/mail/thunderbird/patches/patch-pg
+++ b/mail/thunderbird/patches/patch-pg
@@ -1,6 +1,6 @@
-$NetBSD: patch-pg,v 1.4 2012/03/10 11:42:39 ryoon Exp $
+$NetBSD: patch-pg,v 1.5 2012/04/01 20:53:43 ryoon Exp $
---- mozilla/xulrunner/installer/mozilla-nspr.pc.in.orig 2012-02-16 10:25:33.000000000 +0000
+--- mozilla/xulrunner/installer/mozilla-nspr.pc.in.orig 2012-04-01 16:14:22.000000000 +0000
+++ mozilla/xulrunner/installer/mozilla-nspr.pc.in
@@ -5,7 +5,5 @@ includedir=%includedir%
Name: NSPR
@@ -10,5 +10,5 @@ $NetBSD: patch-pg,v 1.4 2012/03/10 11:42:39 ryoon Exp $
-Cflags: %FULL_NSPR_CFLAGS%
-
-
-+Libs: -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lplds4 -lplc4 -lnspr4 -pthread
++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird -L${prefix}/lib/thunderbird -lplds4 -lplc4 -lnspr4 -pthread
+Cflags: -I${includedir}