pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/xulrunner patch-aw: use patch-av rlimit fix in t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3115e68e47e3
branches:  trunk
changeset: 399151:3115e68e47e3
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sun Sep 13 20:02:35 2009 +0000

description:
patch-aw: use patch-av rlimit fix in the application launcher stub as well

diffstat:

 devel/xulrunner/Makefile         |   4 ++--
 devel/xulrunner/distinfo         |   3 ++-
 devel/xulrunner/patches/patch-aw |  40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)

diffs (77 lines):

diff -r 236313cf5e9d -r 3115e68e47e3 devel/xulrunner/Makefile
--- a/devel/xulrunner/Makefile  Sun Sep 13 20:00:02 2009 +0000
+++ b/devel/xulrunner/Makefile  Sun Sep 13 20:02:35 2009 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.19 2009/09/13 19:10:10 tnn Exp $
+# $NetBSD: Makefile,v 1.20 2009/09/13 20:02:35 tnn Exp $
 #
 
 DISTNAME=      xulrunner-${XULRUNNER_VER}-source
 PKGNAME=       ${DISTNAME:S/-source//}
 XULRUNNER_VER= 1.9.1.3
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    devel www
 MASTER_SITES=  ${MASTER_SITE_MOZILLA:=xulrunner/releases/${XULRUNNER_VER}/source/}
 EXTRACT_SUFX=  .tar.bz2
diff -r 236313cf5e9d -r 3115e68e47e3 devel/xulrunner/distinfo
--- a/devel/xulrunner/distinfo  Sun Sep 13 20:00:02 2009 +0000
+++ b/devel/xulrunner/distinfo  Sun Sep 13 20:02:35 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2009/09/13 08:01:04 tnn Exp $
+$NetBSD: distinfo,v 1.8 2009/09/13 20:02:35 tnn Exp $
 
 SHA1 (xulrunner-1.9.1.3-source.tar.bz2) = 83b2625eb74e81b473ac40ac52505e5fc9a497eb
 RMD160 (xulrunner-1.9.1.3-source.tar.bz2) = c2487c90b4a9490840817c7b00dcccd68a0c4422
@@ -25,6 +25,7 @@
 SHA1 (patch-at) = 2d09714ba426632a5d67b1b100c2ac4d1e673536
 SHA1 (patch-au) = f27b6c8b2c744da388e1d15d0776929e7165ee76
 SHA1 (patch-av) = e22c544894123a6ab8fc428067716b9e68685771
+SHA1 (patch-aw) = eed2f98b732fa776d2ca64d2b82e88677a207657
 SHA1 (patch-ma) = a20b263ff14c841fd0ae1634962b90a41173b524
 SHA1 (patch-mb) = 05298c1ec02363ff0bada87337cf0ccb5b42c55b
 SHA1 (patch-md) = 6bf5242245b17fbd868a6a978eb5849726f81393
diff -r 236313cf5e9d -r 3115e68e47e3 devel/xulrunner/patches/patch-aw
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/xulrunner/patches/patch-aw  Sun Sep 13 20:02:35 2009 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-aw,v 1.1 2009/09/13 20:02:36 tnn Exp $
+
+--- xulrunner/stub/nsXULStub.cpp.orig  2009-08-24 17:53:30.000000000 +0200
++++ xulrunner/stub/nsXULStub.cpp
+@@ -44,6 +44,27 @@
+ #include "nsILocalFile.h"
+ 
+ #include <stdarg.h>
++#include <sys/resource.h>
++/*
++ * On netbsd-4, ulimit -n is 64 by default; too few for us.
++ */
++static void netbsd_fixrlimit(void) {
++      struct rlimit rlp;
++      if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) {
++              fprintf(stderr, "warning: getrlimit failed\n");
++              return;
++      }
++      if (rlp.rlim_cur >= 512)
++              return;
++      if (rlp.rlim_max < 512) {
++              fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n");
++              rlp.rlim_cur = rlp.rlim_max;
++      }
++      else
++              rlp.rlim_cur = 512;
++      if (setrlimit(RLIMIT_NOFILE, &rlp) == -1)
++              fprintf(stderr, "warning: setrlimit failed\n");
++}
+ 
+ #ifdef XP_WIN
+ #include <windows.h>
+@@ -205,6 +226,7 @@ main(int argc, char **argv)
+   char tmpPath[MAXPATHLEN];
+   char greDir[MAXPATHLEN];
+   PRBool greFound = PR_FALSE;
++  netbsd_fixrlimit();
+ 
+ #if defined(XP_MACOSX)
+   CFBundleRef appBundle = CFBundleGetMainBundle();



Home | Main Index | Thread Index | Old Index