summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-11-28 22:53:19 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-11-28 22:53:19 +0000
commit4c5a127774f465e855cd93bf56799e88550fd9a9 (patch)
tree41bf091655cdac09bab6ace9cfac2b1759e4cc0b /lang
parentUpdate to version 5.7.0 (diff)
Duktape is an embeddable Javascript engine, with a focus on portability and
compact footprint. Duktape is easy to integrate into a C/C++ project: add duktape.c and duktape.h to your build, and use the Duktape API to call Ecmascript functions from C code and vice versa. Main features: * Embeddable, portable, compact; about 210kB code, 80kB memory, 40kLoC source (excluding comments etc) * Ecmascript E5/E5.1 compliant, some features borrowed from E6 draft * Built-in regular expression engine * Built-in Unicode support * Minimal platform dependencies * Combined reference counting and mark-and-sweep garbage collection with finalization * Custom features like coroutines, built-in logging framework, and built-in CommonJS-based module loading framework * Property virtualization using a subset of Ecmascript E6 Proxy object * Liberal license (MIT)
Notes
Notes: svn path=/head/; revision=373582
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/duktape/Makefile30
-rw-r--r--lang/duktape/distinfo2
-rw-r--r--lang/duktape/files/patch-Makefile.cmdline20
-rw-r--r--lang/duktape/pkg-descr8
5 files changed, 61 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 6cb5a8884d97..f2483622175f 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -49,6 +49,7 @@
SUBDIR += dlv
SUBDIR += dmd1
SUBDIR += dmd2
+ SUBDIR += duktape
SUBDIR += ecl
SUBDIR += elan
SUBDIR += elixir
diff --git a/lang/duktape/Makefile b/lang/duktape/Makefile
new file mode 100644
index 000000000000..cff5c2e9c952
--- /dev/null
+++ b/lang/duktape/Makefile
@@ -0,0 +1,30 @@
+# $FreeBSD$
+
+PORTNAME= duktape
+PORTVERSION= 1.0.2
+CATEGORIES= lang devel
+MASTER_SITES= http://duktape.org/
+
+MAINTAINER= bapt@FreeBSD.org
+COMMENT= Embeddable Javascript engine
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+USES= readline tar:xz
+
+MAKEFILE= Makefile.cmdline
+ALL_TARGET= #
+
+PLIST_FILES= bin/duk
+
+# for readline
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -I${LOCALBASE}/lib
+
+MAKE_ARGS= CC="${CC}"
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/duk ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
diff --git a/lang/duktape/distinfo b/lang/duktape/distinfo
new file mode 100644
index 000000000000..778697afce95
--- /dev/null
+++ b/lang/duktape/distinfo
@@ -0,0 +1,2 @@
+SHA256 (duktape-1.0.2.tar.xz) = 916f4ae8f8a679c4cd976ca8442d3e863205bb858e6e8483997f4fa0f487b784
+SIZE (duktape-1.0.2.tar.xz) = 428588
diff --git a/lang/duktape/files/patch-Makefile.cmdline b/lang/duktape/files/patch-Makefile.cmdline
new file mode 100644
index 000000000000..e5172971a330
--- /dev/null
+++ b/lang/duktape/files/patch-Makefile.cmdline
@@ -0,0 +1,20 @@
+--- Makefile.cmdline.orig 2014-11-08 02:33:22 UTC
++++ Makefile.cmdline
+@@ -10,14 +10,14 @@ DUKTAPE_CMDLINE_SOURCES = \
+
+ CC = gcc
+ CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
+-CCOPTS += -I./src
++CCOPTS += -I./src ${CPPFLAGS}
+ CCLIBS = -lm
+
+ # If you have readline, you may want to enable these. On some platforms
+ # -lreadline also requires -lncurses (e.g. RHEL), so it is added by default
+ # (you may be able to remove it)
+-#CCOPTS += -DDUK_CMDLINE_FANCY
+-#CCLIBS += -lreadline
++CCOPTS += -DDUK_CMDLINE_FANCY
++CCLIBS += ${LDFLAGS} -lreadline
+ #CCLIBS += -lncurses
+
+ # Optional feature defines, see: http://duktape.org/guide.html#compiling
diff --git a/lang/duktape/pkg-descr b/lang/duktape/pkg-descr
new file mode 100644
index 000000000000..f542ba6ae46d
--- /dev/null
+++ b/lang/duktape/pkg-descr
@@ -0,0 +1,8 @@
+Duktape is an embeddable Javascript engine, with a focus on portability and
+compact footprint.
+
+Duktape is easy to integrate into a C/C++ project: add duktape.c and duktape.h
+to your build, and use the Duktape API to call Ecmascript functions from C code
+and vice versa.
+
+WWW: http://duktape.org