openbsd-ports/devel/node-fibers/patches/patch-src_platform_mk
jeremy 19d897862e Import node-fibers-0.6.4.
This extension provides a fiber/coroutine implementation for nodejs.  It
also ships with a futures implementation that wraps existing nodejs
async functions, allowing synchronous style code that handles exceptions
properly and doesn't block the nodejs event loop.

OK sthen@
2012-04-03 18:46:03 +00:00

31 lines
1.2 KiB
Plaintext

$OpenBSD: patch-src_platform_mk,v 1.1.1.1 2012/04/03 18:46:03 jeremy Exp $
Enable build on OpenBSD and respect CFLAGS.
--- src/platform.mk.orig Wed Jan 4 21:24:45 2012
+++ src/platform.mk Tue Feb 7 14:04:54 2012
@@ -1,13 +1,13 @@
# I know nothing about scons, waf, or autoconf. Sorry.
NODE_PREFIX := $(shell echo "console.log(require('path').dirname(require('path').dirname(process.execPath)))" | node)
NODE_PLATFORM := $(shell echo "console.log(process.platform.replace('2', ''))" | node)
-NODE_BITS := $(shell file `echo "console.log(process.execPath)" | node` | egrep -o '[0-9]{2}-bit' | cut -c-2)
+NODE_BITS := $(shell file `echo "console.log(process.arch.replace(/ia|x/, ''))" | node`)
CPPFLAGS = -Wall -Wno-deprecated-declarations -I$(NODE_PREFIX)/include -I$(NODE_PREFIX)/include/node
ifdef DEBUG
CPPFLAGS += -ggdb -O0
else
- CPPFLAGS += -g -O3 -minline-all-stringops
+ CPPFLAGS += -g -I${LOCALBASE}/include -I${LOCALBASE}/include/node ${CFLAGS} -minline-all-stringops
endif
ifeq ($(NODE_BITS), )
@@ -30,4 +30,7 @@ endif
ifeq ($(NODE_PLATFORM), darwin)
# UCONTEXT in os x = hangs & segfaults :(
CPPFLAGS += -DCORO_SJLJ
+endif
+ifeq ($(NODE_PLATFORM), openbsd)
+ CPPFLAGS += -DCORO_ASM
endif