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

Re: Bug#671550: nodejs: building on kfreebsd-*



retitle 671550 nodejs: building on kfreebsd-*
thanks

Hi,

I fixed up these patches (please find attached), refreshed them against
nodejs 0.6.19~dfsg1-3 from git and took care of an issue in this new
upstream release (install path for man pages on GNU/kFreeBSD).  I ran a
test build of this against libv8 3.10.8.16-1, also from git;  it was
successful except for a few test failures (9 of 351).

Thanks,
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
--- nodejs-0.6.16~dfsg1.orig/deps/uv/src/unix/eio/eio.c
+++ nodejs-0.6.16~dfsg1/deps/uv/src/unix/eio/eio.c
@@ -316,7 +316,7 @@ static int gettimeofday(struct timeval *
 #if HAVE_SENDFILE
 # if __linux
 #  include <sys/sendfile.h>
-# elif __FreeBSD__ || __DragonFly__ || defined __APPLE__
+# elif __FreeBSD__ || __FreeBSD_kernel__ || __DragonFly__ || defined __APPLE__
 #  include <sys/socket.h>
 #  include <sys/uio.h>
 # elif __hpux
--- nodejs-0.6.16~dfsg1.orig/src/platform_freebsd.cc
+++ nodejs-0.6.16~dfsg1/src/platform_freebsd.cc
@@ -34,7 +34,11 @@
 #include <string.h>
 #include <paths.h>
 #include <fcntl.h>
+#if defined(__GLIBC__)
+#include <bsd/unistd.h>
+#else
 #include <unistd.h>
+#endif
 #include <time.h>
 
 
Index: nodejs/wscript
===================================================================
--- nodejs.orig/wscript	2012-06-15 20:38:57.000000000 +0100
+++ nodejs/wscript	2012-06-15 21:19:54.816333003 +0100
@@ -339,7 +339,7 @@
   if Options.options.efence:
     conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')
 
-  if 'bsd' in sys.platform:
+  if 'bsd' in sys.platform and not 'gnu' in sys.platform:
      if not conf.check(lib="execinfo",
                        includes=['/usr/include', '/usr/local/include'],
                        libpath=['/usr/lib', '/usr/local/lib'],
@@ -1034,7 +1034,7 @@
   # Only install the man page if it exists.
   # Do 'make doc install' to build and install it.
   if os.path.exists('doc/node.1'):
-    prefix = 'bsd' in sys.platform and '${PREFIX}' or '${PREFIX}/share'
+    prefix = 'bsd' in sys.platform and not 'gnu' in sys.platform and '${PREFIX}' or '${PREFIX}/share'
     bld.install_files(prefix + '/man/man1/', 'doc/node.1')
 
   bld.install_files('${PREFIX}/bin/', 'tools/node-waf', chmod=0755)
--- nodejs-0.6.16~dfsg1.orig/tools/wafadmin/Tools/ccroot.py	2012-04-30 18:42:50.000000000 +0100
+++ nodejs-0.6.16~dfsg1/tools/wafadmin/Tools/ccroot.py	2012-05-04 23:50:08.767391792 +0100
@@ -66,6 +66,7 @@
 			'__linux__'   : 'linux',
 			'__GNU__'     : 'hurd',
 			'__FreeBSD__' : 'freebsd',
+			'__FreeBSD_kernel__' : 'freebsd',
 			'__NetBSD__'  : 'netbsd',
 			'__OpenBSD__' : 'openbsd',
 			'__sun'       : 'sunos',
--- nodejs-0.6.16~dfsg1.orig/deps/uv/config-unix.mk	2012-05-04 23:45:19.000000000 +0100
+++ nodejs-0.6.16~dfsg1/deps/uv/config-unix.mk	2012-05-04 23:50:10.817219567 +0100
@@ -72,6 +72,15 @@
 OBJS += src/unix/kqueue.o
 endif
 
+ifeq (GNU/kFreeBSD,$(uname_S))
+EV_CONFIG=config_freebsd.h
+EIO_CONFIG=config_freebsd.h
+CPPFLAGS += -Isrc/ares/config_freebsd
+LINKFLAGS+=
+OBJS += src/unix/freebsd.o
+OBJS += src/unix/kqueue.o
+endif
+
 ifeq (DragonFly,$(uname_S))
 EV_CONFIG=config_freebsd.h
 EIO_CONFIG=config_freebsd.h

Reply to: