[Pkg-javascript-devel] Bug#671550: nodejs: building on kfreebsd-* (WIP)
On 05/05/2012 01:21, Steven Chamberlain wrote: Package: src:nodejs Version: 0.6.16~dfsg1-2 Severity: wishlist User: debian-...@lists.debian.org Usertags: kfreebsd X-Debbugs-Cc: debian-...@lists.debian.org Hi, Attached are *unfinished* patches for building nodejs on kfreebsd-* 3000_kfreebsd-1.diff is bad, as it patches something meant for FreeBSD 3010_kfreebsd-2.diff just adds GNU/kFreeBSD as a freebsd-like target 3020_kfreebsd-3.diff patches code so that it can build on GNU/kFreeBSD Hi, nodejs 0.10.1 is in experimental. It is a different build system but it might be simpler to patch this time. Jérémy. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
[Pkg-javascript-devel] 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 ste...@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.0 +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.0 +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.0 +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 ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
[Pkg-javascript-devel] Bug#671550: nodejs: building on kfreebsd-* (WIP)
On 05/05/2012 01:21, Steven Chamberlain wrote: Package: src:nodejs Version: 0.6.16~dfsg1-2 Severity: wishlist User: debian-...@lists.debian.org Usertags: kfreebsd X-Debbugs-Cc: debian-...@lists.debian.org Hi, Attached are *unfinished* patches for building nodejs on kfreebsd-* 3000_kfreebsd-1.diff is bad, as it patches something meant for FreeBSD 3010_kfreebsd-2.diff just adds GNU/kFreeBSD as a freebsd-like target 3020_kfreebsd-3.diff patches code so that it can build on GNU/kFreeBSD They are published here so that they can be finished someday or someone can use them to use nodejs in the meantime. There are some test failures to note: * test-fs-watch -- ENOSYS = not supported? * test-fs-utimes -- not supported? (was building on ZFS) * test-http-upgrade-server -- looks like some sort of chunking issue, works if I change the HTTP request to HTTP/1.0 * test-setproctitle -- currently a no-op in GNU/kFreeBSD's eglibc Regards, Thank you. I have no idea why it would fail, but once we have a build log and this set of patches we can contact upstream about it. They seem to have interest in supporting more platforms. nodejs will try to build on kfreebsd soon, since this arch is going to be added soon to libv8. Jérémy. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel
[Pkg-javascript-devel] Bug#671550: nodejs: building on kfreebsd-* (WIP)
Package: src:nodejs Version: 0.6.16~dfsg1-2 Severity: wishlist User: debian-...@lists.debian.org Usertags: kfreebsd X-Debbugs-Cc: debian-...@lists.debian.org Hi, Attached are *unfinished* patches for building nodejs on kfreebsd-* 3000_kfreebsd-1.diff is bad, as it patches something meant for FreeBSD 3010_kfreebsd-2.diff just adds GNU/kFreeBSD as a freebsd-like target 3020_kfreebsd-3.diff patches code so that it can build on GNU/kFreeBSD They are published here so that they can be finished someday or someone can use them to use nodejs in the meantime. There are some test failures to note: * test-fs-watch -- ENOSYS = not supported? * test-fs-utimes -- not supported? (was building on ZFS) * test-http-upgrade-server -- looks like some sort of chunking issue, works if I change the HTTP request to HTTP/1.0 * test-setproctitle -- currently a no-op in GNU/kFreeBSD's eglibc Regards, -- Steven Chamberlain ste...@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 --- nodejs-0.6.16~dfsg1.orig/tools/wafadmin/Tools/ccroot.py 2012-04-30 18:42:50.0 +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.0 +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 --- nodejs-0.6.16~dfsg1.orig/wscript 2012-05-04 23:45:19.0 +0100 +++ nodejs-0.6.16~dfsg1/wscript 2012-05-04 23:50:05.187249113 +0100 @@ -327,12 +327,12 @@ if Options.options.efence: conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE') - if 'bsd' in sys.platform: - if not conf.check(lib=execinfo, - includes=['/usr/include', '/usr/local/include'], - libpath=['/usr/lib', '/usr/local/lib'], - uselib_store=EXECINFO): - conf.fatal(Install the libexecinfo port from /usr/ports/devel/libexecinfo.) +# if 'bsd' in sys.platform: +# if not conf.check(lib=execinfo, +# includes=['/usr/include', '/usr/local/include'], +# libpath=['/usr/lib', '/usr/local/lib'], +# uselib_store=EXECINFO): +# conf.fatal(Install the libexecinfo port from /usr/ports/devel/libexecinfo.) if not Options.options.without_ssl: # Don't override explicitly supplied openssl paths with pkg-config results. ___ Pkg-javascript-devel mailing list Pkg-javascript-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel