Updated js_of_ocaml to latest version, 2.5. Package now uses ocaml.mk.

There are many changes since the latest version, most important are:
** Compiler: SourceMap improvement
** Compiler: remove registration of unused named value (wrt runtime)
** Compiler: Smarter inlining, Constant sharing, Switch generation
** Lib: Dom binding: *AttributeNS, *AttributeNode*, borderRadius
** Runtime: improve performence of string, array allocation
* Misc: enable safestring for OCaml 4.02
* Commandline: switch to Cmdliner. Better -help + manpage
** Runtime: support for num (Ryan Goulden)
** Lib: initial support for Dom_svg
** Lib: introduce Jsonp module
** Lib: introduce JSON object binding
** Lib: introduce DomContentLoaded
** lib: introduce eventSource
** Lib: introduce js_of_ocaml.toplevel package
** Lib: various improvement: textContent,outerHTML,unload event,css properties
** Lib: complete binding of Js.array
** Lib: change signature of Sys_js.register_autoload
** Lib: sync js_of_ocaml.tyxml with latest tyxml
** Tools: helpers to build toplevel: jsoo_mktop, jsoo_mkcmis
** Lib: remove deprecated Event_arrow
** Lib: introduce js_of_ocaml.tyxml
** Lib: introduce js_of_ocaml.weak (that loads weak.js)
and remove predicate joo_weak
** Lib: introduce js_of_ocaml.log (Lwt logger)
** Lib: Dom_html.{range,selection} (Enguerrand Decorne)
 ** Runtime: improve blit_string perf
** Compiler: option to warn about unused js variable
** Lib: audio/videoElement
 ** Runtime: bigarray comparison
** Compiler: allow to embed directory with -file dir_name=ext1,ext2:dest_path
** Compiler: can now output embeded files in a differant js file
** Lib: js_of_ocaml.graphics
** Lib: Js.Unsafe.expr to embed JavasScript expression
to be used instead of Js.Unsafe.variable (or eval_string)
** Lib: Sys_js.js_of_ocaml_version && Sys_js.file_content
** OCamlbuild plugin: Add the OASIS support, document the API and add the tags
sourcemap (included in the meta-tag debug) and tailcall (#148)
(by Jacques-Pascal Deplaix)
 ** Compiler: generate shorter variable names
** Parsing and minifying of external javascript file (ie: runtime)
(by Hugo Heuzard)
** Compiler: JavaScript strict mode enabled
** Runtime: add support for recursive module (by Hugo Heuzard)
** Compiler: use trampoline to implement tailcall optim (by Hugo Heuzard)
** Improved OCaml toplevel UI (by Hugo Heuzard)
** Toplevel: support dynamic loading of cmo and cma files
** Runtime: add Bigarray support (contributed by Andrew Ray)
** Library: switch from "float Js.t" to just "float" for typing
JavaScript numbers
** Compiler: Add javascript file lookup using findlib
(+mypkg/myfile.js will read myfile.js from mypkg findlib directory)
(by Hugo Heuzard)
** Compiler: improve missing primitives & reserved name detection
(by Hugo Heuzard)
** Compiler: static evaluation of constant ("staticeval" optimisation)
(by Hugo Heuzard)
** Compiler: share constants (by Hugo Heuzard)
** Compiler: alias primitives (by Hugo Heuzard)
** Compiler: complete javacript ast (by Hugo Heuzard)
** Compiler: 'caml_format_int %d x' compiles to ""+x (by Hugo Heuzard)
** Add JavaScript file in META (to be used with ocamlfind)
(by Hugo Heuzard)
** Add Ocamlbuild plugin js_of_ocaml.ocamlbuild
(by Jacques-Pascal Deplaix)
** Add/Install classlist.js, weak.js
** Add Url.Current.protocol (by Vicent Balat)
** Dependency: deriving instead of deriving-ocsigen
** Runtime: log wrong string encoding issues to the console (by Hugo Heuzard)
** Add compiler_libs (by Pierre Chambart)
** Compile syntax extension to native code as well (by Hugo Heuzard)
** Add a JavaScript parser (extracted from facebook/pfff)
** Compiler: remove redundant 'var' (by Hugo Heuzard)
** Compiler: improve compact mode, remove unnecessary space, semicolon
** Runtime: Support in_channel and out_channel (by Hugo Heuzard)
** Compiler: option to embed files into the generated js
such files can be read using open_in (by Hugo Heuzard)
** Runtime: add cache for method lookup (by Hugo Heuzard)
** Compiler: experimental sourcemap support (by Hugo Heuzard)
** JavaScript Errors are now wrapped inside OCaml exceptions (by Hugo Heuzard)
** Add missing primitives for OCaml 4.01
** Improved Dom bindings (Hugo Heuzard and many other contributors)
** Add -linkall option to keep all provided primitives (Pierre Chambard)
** Improved tail-call optimization (Hugo Heuzard)
** Added optimization levels: -o {1,2,3} (Hugo Heuzard)
This commit is contained in:
jaapb 2014-10-09 21:18:05 +00:00
parent d73d0001ca
commit 1d14ff388e
5 changed files with 138 additions and 93 deletions

View file

@ -1,32 +1,30 @@
# $NetBSD: Makefile,v 1.6 2013/11/01 11:30:21 jaapb Exp $
# $NetBSD: Makefile,v 1.7 2014/10/09 21:18:05 jaapb Exp $
#
DISTNAME= js_of_ocaml-1.3.2
PKGREVISION= 1
DISTNAME= 2.5
PKGNAME= js_of_ocaml-${DISTNAME}
CATEGORIES= devel
MASTER_SITES= http://ocsigen.org/download/
MASTER_SITES= https://github.com/ocsigen/js_of_ocaml/archive/
DIST_SUBDIR= js_of_ocaml
MAINTAINER= jaapb@NetBSD.org
HOMEPAGE= http://ocsigen.org/js_of_ocaml/
COMMENT= Compiler of OCaml bytecode to Javascript
LICENSE= gnu-lgpl-v2
DEPENDS+= ocaml-findlib-[0-9]*:../../devel/ocaml-findlib
DEPENDS+= ocaml-deriving-ocsigen>=0.3:../../devel/ocaml-deriving-ocsigen
DEPENDS+= ocaml-deriving-ocsigen>=0.6:../../devel/ocaml-deriving-ocsigen
DEPENDS+= menhir-[0-9]*:../../devel/menhir
USE_LANGUAGES= c
USE_TOOLS= gmake
MAKE_ENV= BINDIR=${DESTDIR}${PREFIX}/bin DESTDIR=${DESTDIR} OCAML_SITELIBDIR=${PREFIX}/lib/ocaml/site-lib
INSTALLATION_DIRS= lib/ocaml/site-lib
PLIST_VARS= opt
.if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \
(${MACHINE_ARCH} == "sparc") || (${MACHINE_ARCH} == "x86_64")
PLIST.opt= yes
.endif
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
MAKE_ENV= BINDIR=${DESTDIR}/${PREFIX}/bin DESTDIR=${DESTDIR} OCAML_SITELIBDIR=${OCAML_SITELIBDIR}
MAKE_JOBS_SAFE= no
.include "../../devel/ocaml-cmdliner/buildlink3.mk"
.include "../../devel/ocaml-lwt/buildlink3.mk"
.include "../../lang/ocaml/buildlink3.mk"
.include "../../devel/ocaml-optcomp/buildlink3.mk"
BUILDLINK_API_DEPENDS.ocaml-optcomp+= ocaml-optcomp>=1.6
.include "../../lang/camlp4/buildlink3.mk"
.include "../../mk/ocaml.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,57 +1,98 @@
@comment $NetBSD: PLIST,v 1.3 2012/12/14 14:40:24 jaapb Exp $
@unexec %D/libexec/ocaml-findlib-register del %D/lib/ocaml/site-lib/js_of_ocaml
@comment $NetBSD: PLIST,v 1.4 2014/10/09 21:18:05 jaapb Exp $
@unexec %D/libexec/ocaml-findlib-register del %D/${OCAML_SITELIB}/js_of_ocaml
bin/js_of_ocaml
lib/ocaml/site-lib/js_of_ocaml/META
lib/ocaml/site-lib/js_of_ocaml/CSS.cmi
lib/ocaml/site-lib/js_of_ocaml/CSS.mli
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/deriving_Json.cmx
lib/ocaml/site-lib/js_of_ocaml/deriving_Json.mli
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/deriving_Json_lexer.cmx
lib/ocaml/site-lib/js_of_ocaml/deriving_Json_lexer.mli
lib/ocaml/site-lib/js_of_ocaml/deriving_Json.cmi
lib/ocaml/site-lib/js_of_ocaml/deriving_Json_lexer.cmi
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/deriving_json.a
lib/ocaml/site-lib/js_of_ocaml/deriving_json.cma
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/deriving_json.cmxa
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/deriving_json.cmxs
lib/ocaml/site-lib/js_of_ocaml/dlljs_of_ocaml.so
lib/ocaml/site-lib/js_of_ocaml/dom.cmi
lib/ocaml/site-lib/js_of_ocaml/dom.mli
lib/ocaml/site-lib/js_of_ocaml/dom_events.cmi
lib/ocaml/site-lib/js_of_ocaml/dom_events.mli
lib/ocaml/site-lib/js_of_ocaml/dom_html.cmi
lib/ocaml/site-lib/js_of_ocaml/dom_html.mli
lib/ocaml/site-lib/js_of_ocaml/event_arrows.cmi
lib/ocaml/site-lib/js_of_ocaml/event_arrows.mli
lib/ocaml/site-lib/js_of_ocaml/file.cmi
lib/ocaml/site-lib/js_of_ocaml/file.mli
lib/ocaml/site-lib/js_of_ocaml/firebug.cmi
lib/ocaml/site-lib/js_of_ocaml/firebug.mli
lib/ocaml/site-lib/js_of_ocaml/form.cmi
lib/ocaml/site-lib/js_of_ocaml/form.mli
lib/ocaml/site-lib/js_of_ocaml/js.cmi
lib/ocaml/site-lib/js_of_ocaml/js.mli
lib/ocaml/site-lib/js_of_ocaml/js_of_ocaml.cma
lib/ocaml/site-lib/js_of_ocaml/json.cmi
lib/ocaml/site-lib/js_of_ocaml/json.mli
${PLIST.opt}lib/ocaml/site-lib/js_of_ocaml/libjs_of_ocaml.a
lib/ocaml/site-lib/js_of_ocaml/lwt_js.cmi
lib/ocaml/site-lib/js_of_ocaml/lwt_js.mli
lib/ocaml/site-lib/js_of_ocaml/lwt_js_events.cmi
lib/ocaml/site-lib/js_of_ocaml/lwt_js_events.mli
lib/ocaml/site-lib/js_of_ocaml/pa_deriving_Json.cmo
lib/ocaml/site-lib/js_of_ocaml/pa_js.cmo
lib/ocaml/site-lib/js_of_ocaml/regexp.cmi
lib/ocaml/site-lib/js_of_ocaml/regexp.mli
lib/ocaml/site-lib/js_of_ocaml/runtime.js
lib/ocaml/site-lib/js_of_ocaml/typed_array.cmi
lib/ocaml/site-lib/js_of_ocaml/typed_array.mli
lib/ocaml/site-lib/js_of_ocaml/url.cmi
lib/ocaml/site-lib/js_of_ocaml/url.mli
lib/ocaml/site-lib/js_of_ocaml/webGL.cmi
lib/ocaml/site-lib/js_of_ocaml/webGL.mli
lib/ocaml/site-lib/js_of_ocaml/webSockets.cmi
lib/ocaml/site-lib/js_of_ocaml/webSockets.mli
lib/ocaml/site-lib/js_of_ocaml/xmlHttpRequest.cmi
lib/ocaml/site-lib/js_of_ocaml/xmlHttpRequest.mli
@exec %D/libexec/ocaml-findlib-register add %D/lib/ocaml/site-lib/js_of_ocaml
bin/jsoo_minify
bin/jsoo_mkcmis
bin/jsoo_mktop
${OCAML_SITELIB}/js_of_ocaml/META
${OCAML_SITELIB}/js_of_ocaml/array.js
${OCAML_SITELIB}/js_of_ocaml/cSS.cmi
${OCAML_SITELIB}/js_of_ocaml/cSS.mli
${OCAML_SITELIB}/js_of_ocaml/classlist.js
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/compiler.a
${OCAML_SITELIB}/js_of_ocaml/compiler.cma
${OCAML_SITELIB}/js_of_ocaml/compiler.cmi
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/compiler.cmx
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/compiler.cmxa
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/compiler.cmxs
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/deriving_Json.cmx
${OCAML_SITELIB}/js_of_ocaml/deriving_Json.mli
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/deriving_Json_lexer.cmx
${OCAML_SITELIB}/js_of_ocaml/deriving_Json_lexer.mli
${OCAML_SITELIB}/js_of_ocaml/deriving_Json.cmi
${OCAML_SITELIB}/js_of_ocaml/deriving_Json_lexer.cmi
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/deriving_json.a
${OCAML_SITELIB}/js_of_ocaml/deriving_json.cma
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/deriving_json.cmxa
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/deriving_json.cmxs
${OCAML_SITELIB}/js_of_ocaml/dlljs_of_ocaml.so
${OCAML_SITELIB}/js_of_ocaml/dom.cmi
${OCAML_SITELIB}/js_of_ocaml/dom.mli
${OCAML_SITELIB}/js_of_ocaml/dom_events.cmi
${OCAML_SITELIB}/js_of_ocaml/dom_events.mli
${OCAML_SITELIB}/js_of_ocaml/dom_html.cmi
${OCAML_SITELIB}/js_of_ocaml/dom_html.mli
${OCAML_SITELIB}/js_of_ocaml/dom_svg.cmi
${OCAML_SITELIB}/js_of_ocaml/dom_svg.mli
${OCAML_SITELIB}/js_of_ocaml/eventSource.cmi
${OCAML_SITELIB}/js_of_ocaml/eventSource.mli
${OCAML_SITELIB}/js_of_ocaml/file.cmi
${OCAML_SITELIB}/js_of_ocaml/file.mli
${OCAML_SITELIB}/js_of_ocaml/firebug.cmi
${OCAML_SITELIB}/js_of_ocaml/firebug.mli
${OCAML_SITELIB}/js_of_ocaml/form.cmi
${OCAML_SITELIB}/js_of_ocaml/form.mli
${OCAML_SITELIB}/js_of_ocaml/graphics.js
${OCAML_SITELIB}/js_of_ocaml/js.cmi
${OCAML_SITELIB}/js_of_ocaml/js.mli
${OCAML_SITELIB}/js_of_ocaml/js_of_ocaml.cma
${OCAML_SITELIB}/js_of_ocaml/json.cmi
${OCAML_SITELIB}/js_of_ocaml/json.mli
${OCAML_SITELIB}/js_of_ocaml/jsonp.cmi
${OCAML_SITELIB}/js_of_ocaml/jsonp.mli
${OCAML_SITELIB}/js_of_ocaml/jsooTop.cmi
${OCAML_SITELIB}/js_of_ocaml/jsooTop.cmo
${OCAML_SITELIB}/js_of_ocaml/jsooTop.mli
${OCAML_SITELIB}/js_of_ocaml/keycode.cmi
${OCAML_SITELIB}/js_of_ocaml/keycode.mli
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/libjs_of_ocaml.a
${OCAML_SITELIB}/js_of_ocaml/logger.cma
${OCAML_SITELIB}/js_of_ocaml/lwt_js.cmi
${OCAML_SITELIB}/js_of_ocaml/lwt_js.mli
${OCAML_SITELIB}/js_of_ocaml/lwt_js_events.cmi
${OCAML_SITELIB}/js_of_ocaml/lwt_js_events.mli
${OCAML_SITELIB}/js_of_ocaml/lwt_log_js.cmi
${OCAML_SITELIB}/js_of_ocaml/lwt_log_js.mli
${OCAML_SITELIB}/js_of_ocaml/nat.js
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.a
${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.cma
${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.cmi
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.cmxa
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.cmxs
${OCAML_SITELIB}/js_of_ocaml/ocamlbuild_js_of_ocaml.mli
${OCAML_SITELIB}/js_of_ocaml/pa_deriving_Json.cmo
${OCAML_SITELIB}/js_of_ocaml/pa_deriving_Json.cmi
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/pa_deriving_Json.cmx
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/pa_deriving_Json.cmxs
${OCAML_SITELIB}/js_of_ocaml/pa_deriving_Json.mli
${OCAML_SITELIB}/js_of_ocaml/pa_js.cmo
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/pa_js.cmx
${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml/pa_js.cmxs
${OCAML_SITELIB}/js_of_ocaml/regexp.cmi
${OCAML_SITELIB}/js_of_ocaml/regexp.mli
${OCAML_SITELIB}/js_of_ocaml/runtime.js
${OCAML_SITELIB}/js_of_ocaml/sys_js.cmi
${OCAML_SITELIB}/js_of_ocaml/sys_js.mli
${OCAML_SITELIB}/js_of_ocaml/toplevel.js
${OCAML_SITELIB}/js_of_ocaml/typed_array.cmi
${OCAML_SITELIB}/js_of_ocaml/typed_array.mli
${OCAML_SITELIB}/js_of_ocaml/url.cmi
${OCAML_SITELIB}/js_of_ocaml/url.mli
${OCAML_SITELIB}/js_of_ocaml/weak.js
${OCAML_SITELIB}/js_of_ocaml/webGL.cmi
${OCAML_SITELIB}/js_of_ocaml/webGL.mli
${OCAML_SITELIB}/js_of_ocaml/webSockets.cmi
${OCAML_SITELIB}/js_of_ocaml/webSockets.mli
${OCAML_SITELIB}/js_of_ocaml/xmlHttpRequest.cmi
${OCAML_SITELIB}/js_of_ocaml/xmlHttpRequest.mli
@exec %D/libexec/ocaml-findlib-register add %D/${OCAML_SITELIB}/js_of_ocaml

View file

@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.3 2012/12/14 14:40:24 jaapb Exp $
$NetBSD: distinfo,v 1.4 2014/10/09 21:18:05 jaapb Exp $
SHA1 (js_of_ocaml-1.3.2.tar.gz) = a906303391fb136659f9a9971a1bc16d9f71acc5
RMD160 (js_of_ocaml-1.3.2.tar.gz) = e79ec4bab7976d76e9573c2edb7f61f0bdcd9818
Size (js_of_ocaml-1.3.2.tar.gz) = 1901593 bytes
SHA1 (patch-Makefile) = 58a58804bfb2ab3ad3cc39096b658757a232ba3a
SHA1 (patch-Makefile.conf) = e21058295b9c94760d5a0ff4225baade98911c7c
SHA1 (js_of_ocaml/2.5.tar.gz) = d3871a5a054f775134662ffb1886a22adc6dcf56
RMD160 (js_of_ocaml/2.5.tar.gz) = c586e6d33f182dac10c3d6270f8b095a500c3894
Size (js_of_ocaml/2.5.tar.gz) = 1249680 bytes
SHA1 (patch-Makefile) = a1ef24c53bce499e56fefb4e141d79bb8701528d
SHA1 (patch-Makefile.conf) = 632544abd696d53fad35755bcc616922561605bf

View file

@ -1,14 +1,14 @@
$NetBSD: patch-Makefile,v 1.2 2012/12/14 14:40:24 jaapb Exp $
$NetBSD: patch-Makefile,v 1.3 2014/10/09 21:18:05 jaapb Exp $
Install to DESTDIR
--- Makefile.orig 2012-12-07 19:39:02.000000000 +0000
--- Makefile.orig 2014-09-30 14:40:37.000000000 +0000
+++ Makefile
@@ -31,7 +31,7 @@ include Makefile.filelist
@@ -47,7 +47,7 @@ VERSION := $(shell head -n 1 VERSION)
install: install-lib install-bin
VERSION := $(shell head -n 1 VERSION)
install:
- ocamlfind install -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC)
+ ocamlfind install -ldconf ignore -destdir ${DESTDIR}${OCAML_SITELIBDIR} -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC)
install-lib:
- ocamlfind install -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC) $(COMP_INTF) $(COMP_IMPL)
+ ocamlfind install -ldconf ignore -destdir ${DESTDIR}/${PREFIX}/${OCAML_SITELIBDIR} -patch-version ${VERSION} $(LIBRARY) lib/META $(INTF) $(IMPL) $(OTHERS) $(DOC) $(COMP_INTF) $(COMP_IMPL)
install-bin:
install -d -m 755 $(BINDIR)
install $(BIN) $(BINDIR)

View file

@ -1,13 +1,19 @@
$NetBSD: patch-Makefile.conf,v 1.1 2012/07/11 15:35:06 wiz Exp $
$NetBSD: patch-Makefile.conf,v 1.2 2014/10/09 21:18:05 jaapb Exp $
Have BINDIR be determined from package Makefile
--- Makefile.conf.orig 2011-11-30 14:25:06.000000000 +0000
Have BINDIR be determined from package Makefile, do not call git
--- Makefile.conf.orig 2014-09-30 14:40:37.000000000 +0000
+++ Makefile.conf
@@ -1,6 +1,6 @@
# Where binaries are installed:
-BINDIR := /usr/local/bin
+# BINDIR := /usr/local/bin
-BINDIR := `dirname \`which ocamlc\``
+#BINDIR := `dirname \`which ocamlc\``
####
@@ -47,4 +47,4 @@ NATDYNLINK ?= $(shell if [ -f `ocamlc -w
METAOCAML ?= 0
-VERSION_GIT := $(shell git log -n1 --pretty=format:%h 2> /dev/null)
+#VERSION_GIT := $(shell git log -n1 --pretty=format:%h 2> /dev/null)