ports/162019: [MAINTAINER] www/node-devel: update to 0.5.10

Jin-Sih Lin linpct at gmail.com
Wed Oct 26 03:20:11 UTC 2011


>Number:         162019
>Category:       ports
>Synopsis:       [MAINTAINER] www/node-devel: update to 0.5.10
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 26 03:20:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jin-Sih Lin
>Release:        FreeBSD 9.0-BETA2 i386
>Organization:
FreeBSD @ Taiwan
>Environment:
System: FreeBSD deep.tw 9.0-BETA2 FreeBSD 9.0-BETA2 #0 r225270=6736d34-dirty: Wed Aug 31 17:46:32 CST
>Description:
- Update to 0.5.10

Added file(s):
- files/patch-platform-freebsd.cc

Removed file(s):
- files/patch-deps-uv-config-unix.mk

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- node-devel-0.5.10.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/node-devel.orig/Makefile /usr/ports/www/node-devel/Makefile
--- /usr/ports/www/node-devel.orig/Makefile	2011-10-11 21:00:19.000000000 +0800
+++ /usr/ports/www/node-devel/Makefile	2011-10-26 10:38:55.000000000 +0800
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	node
-PORTVERSION=	0.5.9
+PORTVERSION=	0.5.10
 CATEGORIES=	www
 MASTER_SITES=	http://nodejs.org/dist/v${PORTVERSION}/
 PKGNAMESUFFIX=	-devel
diff -ruN --exclude=CVS /usr/ports/www/node-devel.orig/distinfo /usr/ports/www/node-devel/distinfo
--- /usr/ports/www/node-devel.orig/distinfo	2011-10-11 21:00:19.000000000 +0800
+++ /usr/ports/www/node-devel/distinfo	2011-10-26 10:38:55.000000000 +0800
@@ -1,2 +1,2 @@
-SHA256 (node-v0.5.9.tar.gz) = 5659cde8b36cf5c29433e73a351b0bacfac16be1b0b47e64ea138fe270b5607f
-SIZE (node-v0.5.9.tar.gz) = 9180989
+SHA256 (node-v0.5.10.tar.gz) = 56396854f85a0d2fafc038436be3d84041f991f59613761e61295fc02d662a40
+SIZE (node-v0.5.10.tar.gz) = 9325420
diff -ruN --exclude=CVS /usr/ports/www/node-devel.orig/files/patch-deps-uv-config-unix.mk /usr/ports/www/node-devel/files/patch-deps-uv-config-unix.mk
--- /usr/ports/www/node-devel.orig/files/patch-deps-uv-config-unix.mk	2011-08-05 12:51:17.000000000 +0800
+++ /usr/ports/www/node-devel/files/patch-deps-uv-config-unix.mk	1970-01-01 08:00:00.000000000 +0800
@@ -1,13 +0,0 @@
---- deps/uv/config-unix.mk.orig	2011-08-05 10:43:22.000000000 +0800
-+++ deps/uv/config-unix.mk	2011-08-05 10:43:28.000000000 +0800
-@@ -18,8 +18,8 @@
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- # IN THE SOFTWARE.
- 
--CC = $(PREFIX)gcc
--AR = $(PREFIX)ar
-+#CC = $(PREFIX)gcc
-+#AR = $(PREFIX)ar
- E=
- CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter
- CFLAGS=-g
diff -ruN --exclude=CVS /usr/ports/www/node-devel.orig/files/patch-platform-freebsd.cc /usr/ports/www/node-devel/files/patch-platform-freebsd.cc
--- /usr/ports/www/node-devel.orig/files/patch-platform-freebsd.cc	1970-01-01 08:00:00.000000000 +0800
+++ /usr/ports/www/node-devel/files/patch-platform-freebsd.cc	2011-10-26 10:39:14.000000000 +0800
@@ -0,0 +1,136 @@
+--- deps/v8/src/platform-freebsd.cc.orig	2011-10-25 19:44:21.000000000 +0800
++++ deps/v8/src/platform-freebsd.cc	2011-10-25 20:08:08.000000000 +0800
+@@ -333,32 +333,96 @@ int OS::StackWalk(Vector<OS::StackFrame>
+ static const int kMmapFd = -1;
+ static const int kMmapFdOffset = 0;
+ 
++VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { }
++
++
++VirtualMemory::VirtualMemory(size_t size)
++    : address_(ReserveRegion(size)), size_(size) { }
+ 
+-VirtualMemory::VirtualMemory(size_t size) {
+-  address_ = mmap(NULL, size, PROT_NONE,
+-                  MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
+-                  kMmapFd, kMmapFdOffset);
+-  size_ = size;
+-}
+ 
++VirtualMemory::VirtualMemory(size_t size, size_t alignment)
++    : address_(NULL), size_(0) {
++  ASSERT(IsAligned(alignment, static_cast<intptr_t>(OS::AllocateAlignment())));
++  size_t request_size = RoundUp(size + alignment,
++                                static_cast<intptr_t>(OS::AllocateAlignment()));
++  void* reservation = mmap(OS::GetRandomMmapAddr(),
++                           request_size,
++                           PROT_NONE,
++                           MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
++                           kMmapFd,
++                           kMmapFdOffset);
++  if (reservation == MAP_FAILED) return;
++
++  Address base = static_cast<Address>(reservation);
++  Address aligned_base = RoundUp(base, alignment);
++  ASSERT_LE(base, aligned_base);
++
++  // Unmap extra memory reserved before and after the desired block.
++  if (aligned_base != base) {
++    size_t prefix_size = static_cast<size_t>(aligned_base - base);
++    OS::Free(base, prefix_size);
++    request_size -= prefix_size;
++  }
++
++  size_t aligned_size = RoundUp(size, OS::AllocateAlignment());
++  ASSERT_LE(aligned_size, request_size);
++
++  if (aligned_size != request_size) {
++    size_t suffix_size = request_size - aligned_size;
++    OS::Free(aligned_base + aligned_size, suffix_size);
++    request_size -= suffix_size;
++  }
++
++  ASSERT(aligned_size == request_size);
++
++  address_ = static_cast<void*>(aligned_base);
++  size_ = aligned_size;
++}
+ 
+ VirtualMemory::~VirtualMemory() {
+   if (IsReserved()) {
+-    if (0 == munmap(address(), size())) address_ = MAP_FAILED;
++    bool result = ReleaseRegion(address(), size());
++    ASSERT(result);
++    USE(result);
+   }
+ }
+ 
++void VirtualMemory::Reset() {
++  address_ = NULL;
++  size_ = 0;
++}
++
++void* VirtualMemory::ReserveRegion(size_t size) {
++  void* result = mmap(OS::GetRandomMmapAddr(),
++                      size,
++                      PROT_NONE,
++                      MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
++                      kMmapFd,
++                      kMmapFdOffset);
++
++  if (result == MAP_FAILED) return NULL;
++
++  return result;
++}
+ 
+ bool VirtualMemory::IsReserved() {
+   return address_ != MAP_FAILED;
+ }
+ 
++bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
++  return CommitRegion(address, size, is_executable);
++}
+ 
+-bool VirtualMemory::Commit(void* address, size_t size, bool executable) {
+-  int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
+-  if (MAP_FAILED == mmap(address, size, prot,
++bool VirtualMemory::CommitRegion(void* address,
++                                 size_t size,
++                                 bool is_executable) {
++  int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
++  if (MAP_FAILED == mmap(address,
++                         size,
++                         prot,
+                          MAP_PRIVATE | MAP_ANON | MAP_FIXED,
+-                         kMmapFd, kMmapFdOffset)) {
++                         kMmapFd,
++                         kMmapFdOffset)) {
+     return false;
+   }
+ 
+@@ -366,13 +430,22 @@ bool VirtualMemory::Commit(void* address
+   return true;
+ }
+ 
+-
+ bool VirtualMemory::Uncommit(void* address, size_t size) {
+-  return mmap(address, size, PROT_NONE,
++  return UncommitRegion(address, size);
++}
++
++bool VirtualMemory::UncommitRegion(void* address, size_t size) {
++  return mmap(address,
++              size,
++              PROT_NONE,
+               MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED,
+-              kMmapFd, kMmapFdOffset) != MAP_FAILED;
++              kMmapFd,
++              kMmapFdOffset) != MAP_FAILED;
+ }
+ 
++bool VirtualMemory::ReleaseRegion(void* address, size_t size) {
++  return munmap(address, size) == 0;
++}
+ 
+ class Thread::PlatformData : public Malloced {
+  public:
--- node-devel-0.5.10.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list