summaryrefslogtreecommitdiff
path: root/lang/libduktape
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2016-05-05 03:57:26 +0000
committeragc <agc@pkgsrc.org>2016-05-05 03:57:26 +0000
commit7b03f15aa102eb83f2a56153248b133aa6a06c28 (patch)
tree4a51eeeff00a128a12d676e3c29026afdcb67e8a /lang/libduktape
parent394c60fa436d08c619c17b78bba3cb251a340ba5 (diff)
downloadpkgsrc-7b03f15aa102eb83f2a56153248b133aa6a06c28.tar.gz
Add libduktape, an MIT-licensed Javascript engine - this is the library
which can be embedded in other C programs. Duktape is an embeddable Ecmascript E5/E5.1 engine with a focus on portability and compact footprint. By integrating Duktape into your C/C++ program you can easily extend its functionality through scripting. You can also build the main control flow of your program in Ecmascript and use fast C code functions to do heavy lifting. The terms Ecmascript and Javascript are often considered more or less equivalent, although Javascript and its variants are technically just one environment where the Ecmascript language is used. The line between the two is not very clear in practice: even non-browser Ecmascript environments often provide some browser-specific built-ins. Duktape is no exception, and provides the commonly used print() and alert() built-ins. Even so, we use the term Ecmascript throughout to refer to the language implemented by Duktape.
Diffstat (limited to 'lang/libduktape')
-rw-r--r--lang/libduktape/DESCR14
-rw-r--r--lang/libduktape/Makefile20
-rw-r--r--lang/libduktape/PLIST4
-rw-r--r--lang/libduktape/buildlink3.mk12
-rw-r--r--lang/libduktape/distinfo6
-rw-r--r--lang/libduktape/files/Makefile36
6 files changed, 92 insertions, 0 deletions
diff --git a/lang/libduktape/DESCR b/lang/libduktape/DESCR
new file mode 100644
index 00000000000..f6fb6577632
--- /dev/null
+++ b/lang/libduktape/DESCR
@@ -0,0 +1,14 @@
+Duktape is an embeddable Ecmascript E5/E5.1 engine with a focus on
+portability and compact footprint. By integrating Duktape into your
+C/C++ program you can easily extend its functionality through
+scripting. You can also build the main control flow of your program
+in Ecmascript and use fast C code functions to do heavy lifting.
+
+The terms Ecmascript and Javascript are often considered more or less
+equivalent, although Javascript and its variants are technically just
+one environment where the Ecmascript language is used. The line
+between the two is not very clear in practice: even non-browser
+Ecmascript environments often provide some browser-specific built-ins.
+Duktape is no exception, and provides the commonly used print() and
+alert() built-ins. Even so, we use the term Ecmascript throughout to
+refer to the language implemented by Duktape.
diff --git a/lang/libduktape/Makefile b/lang/libduktape/Makefile
new file mode 100644
index 00000000000..22368d300a2
--- /dev/null
+++ b/lang/libduktape/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2016/05/05 03:57:26 agc Exp $
+
+DISTNAME= duktape-1.5.0
+PKGNAME= lib${DISTNAME}
+CATEGORIES= devel
+MASTER_SITES= http://duktape.org/
+EXTRACT_SUFX= .tar.xz
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://duktape.org/
+COMMENT= Embeddable Javascript engine library
+LICENSE= mit
+
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+USE_LIBTOOL= yes
+
+do-configure:
+ cp ${FILESDIR}/Makefile ${WRKSRC}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/libduktape/PLIST b/lang/libduktape/PLIST
new file mode 100644
index 00000000000..7be03611b48
--- /dev/null
+++ b/lang/libduktape/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2016/05/05 03:57:26 agc Exp $
+include/duk_config.h
+include/duktape.h
+lib/libduktape.la
diff --git a/lang/libduktape/buildlink3.mk b/lang/libduktape/buildlink3.mk
new file mode 100644
index 00000000000..71e372dd348
--- /dev/null
+++ b/lang/libduktape/buildlink3.mk
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2016/05/05 03:57:26 agc Exp $
+
+BUILDLINK_TREE+= libduktape
+
+.if !defined(LIBDUKTAPE_BUILDLINK3_MK)
+LIBDUKTAPE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libduktape+= libduktape>=1.5.0
+BUILDLINK_PKGSRCDIR.libduktape?= ../../lang/libduktape
+.endif # LIBDUKTAPE_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libduktape
diff --git a/lang/libduktape/distinfo b/lang/libduktape/distinfo
new file mode 100644
index 00000000000..a8108b01a67
--- /dev/null
+++ b/lang/libduktape/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2016/05/05 03:57:26 agc Exp $
+
+SHA1 (duktape-1.5.0.tar.xz) = 6c53eff86e498c9a81181dfaf72034d616a35cba
+RMD160 (duktape-1.5.0.tar.xz) = c4af4b76978e03fe621886601b65d9fbad240b19
+SHA512 (duktape-1.5.0.tar.xz) = f9b1500980e75700296d054d91edcd6a86d5ee20d63a7c246c66af7d5f5f097191cf59c4175214138345154afb6e3f5bb338a549ac3fbadeba858d8beb610093
+Size (duktape-1.5.0.tar.xz) = 708528 bytes
diff --git a/lang/libduktape/files/Makefile b/lang/libduktape/files/Makefile
new file mode 100644
index 00000000000..3a0273d3e36
--- /dev/null
+++ b/lang/libduktape/files/Makefile
@@ -0,0 +1,36 @@
+# ***** WARNING ***** EDIT THIS FILE WITH A UTF-AWARE EDITOR
+
+srcdir= src
+VPATH= src
+
+prefix= ${PREFIX}
+exec_prefix= ${PREFIX}
+LIBDIR= $(exec_prefix)/lib
+INCDIR= $(prefix)/include
+
+SHELL=/bin/sh
+
+CFLAGS= -I. -I$(srcdir)
+OBJS= duktape.o
+LIBS= libduktape.a
+ARFLAGS= crv
+
+all: ${LIBS}
+
+$(LIBS) : $(OBJS)
+ ${LIBTOOL} --mode=link --tag=CC cc -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 0:0
+
+${OBJS}: duktape.c duktape.h duk_config.h
+ ${LIBTOOL} --mode=compile --tag=CC ${CC} ${CFLAGS} -c duktape.c
+
+install: $(LIBS)
+ mkdir -p ${DESTDIR}$(LIBDIR) ${DESTDIR}$(INCDIR)
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${LIBS:.a=.la} ${DESTDIR}${PREFIX}/lib
+ $(BSD_INSTALL_DATA) duktape.h ${DESTDIR}$(INCDIR)
+ $(BSD_INSTALL_DATA) duk_config.h ${DESTDIR}$(INCDIR)
+
+clean:
+ rm -f $(OBJS) $(LIBS)
+
+cleandist:
+ rm -f $(OBJS) $(LIBS)