diff options
author | chinsan <chinsan@FreeBSD.org> | 2008-09-06 12:26:26 +0800 |
---|---|---|
committer | chinsan <chinsan@FreeBSD.org> | 2008-09-06 12:26:26 +0800 |
commit | e228af2a3f7ce789779c1c483a6332faeda359bd (patch) | |
tree | 81e5a91fa6ffa27b02a3be721eb86e543c992d34 /lang | |
parent | bbea8522c4b145384e544ef75cc0d543b4a4b651 (diff) | |
download | freebsd-ports-gnome-e228af2a3f7ce789779c1c483a6332faeda359bd.tar.gz freebsd-ports-gnome-e228af2a3f7ce789779c1c483a6332faeda359bd.tar.zst freebsd-ports-gnome-e228af2a3f7ce789779c1c483a6332faeda359bd.zip |
Add mtasc 1.14, motion-Twin ActionScript 2 Compiler.
PR: ports/127130
Submitted by: Marcin Cieslak <saper at SYSTEM.PL>
Diffstat (limited to 'lang')
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/mtasc/Makefile | 82 | ||||
-rw-r--r-- | lang/mtasc/distinfo | 3 | ||||
-rw-r--r-- | lang/mtasc/files/patch-basepath | 22 | ||||
-rw-r--r-- | lang/mtasc/pkg-descr | 7 | ||||
-rw-r--r-- | lang/mtasc/pkg-plist | 9 |
6 files changed, 124 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index cc19518b91ce..3a3f20656734 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -163,6 +163,7 @@ SUBDIR += mosh SUBDIR += mozart SUBDIR += mpd + SUBDIR += mtasc SUBDIR += munger SUBDIR += nawk SUBDIR += nbc diff --git a/lang/mtasc/Makefile b/lang/mtasc/Makefile new file mode 100644 index 000000000000..c8490e62ecdd --- /dev/null +++ b/lang/mtasc/Makefile @@ -0,0 +1,82 @@ +# New ports collection makefile for: mtasc +# Date created: 2008-09-06 +# Whom: Marcin Cieslak <saper@SYSTEM.PL> +# +# $FreeBSD$ +# + +PORTNAME= mtasc +PORTVERSION= 1.14 +CATEGORIES= lang www +MASTER_SITES= http://saper.info/distfiles/ LOCAL/chinsan + +MAINTAINER= saper@SYSTEM.PL +COMMENT= Motion-Twin ActionScript 2 Compiler + +BUILD_DEPENDS= ${LOCALBASE}/lib/ocaml/site-lib/extlib/IO.cmi:${PORTSDIR}/devel/ocaml-extlib + +USE_OCAML= yes +USE_OCAML_FINDLIB=yes + +OCAMLLEX?= ${LOCALBASE}/bin/ocamllex +OCAMLOPT?= ${LOCALBASE}/bin/ocamlopt + +ZLIB_OPTS= -cclib "${WRKSRC}/extc/extc_stubs.o" -cclib -lz extc.mli extc.ml +SWFLIB_INC= -I ${WRKSRC}/extc -I ${WRKSRC}/swflib +SWFLIB_FILES= as3.mli as3code.ml as3parse.ml swf.ml swfZip.ml actionScript.ml \ + swfParser.ml +MTASC_OBJ= expr.cmx lexer.cmx parser.cmx typer.cmx class.cmx plugin.cmx\ + genSwf.cmx main.cmx + +MAN1= mtasc.1 + +WRKSRC= ${WRKDIR}/ocaml + +.if !defined(NOPORTDATA) +PORTDATA= std std8 +.endif + +.include <bsd.port.pre.mk> + +do-build: + (cd ${WRKSRC}/extc && \ + ${OCAMLOPT} ${WRKSRC}/extc/extc_stubs.c && \ + ${OCAMLOPT} -a -o extc.cmxa ${ZLIB_OPTS} ) + (cd ${WRKSRC}/swflib && \ + ${OCAMLFIND} ocamlopt -package extlib \ + -a -o swflib.cmxa ${SWFLIB_INC} ${SWFLIB_FILES} ) + (cd ${WRKSRC}/mtasc && \ + ${OCAMLLEX} lexer.mll && \ + ${OCAMLOPT} -c expr.ml lexer.ml && \ + ${OCAMLOPT} -c -pp camlp4o parser.ml && \ + ${OCAMLFIND} ocamlopt -package extlib -c ${SWFLIB_INC} \ + typer.ml class.ml plugin.ml \ + genSwf.ml main.ml ) + (cd ${WRKSRC}/mtasc && \ + ${OCAMLFIND} ocamlopt -package extlib -linkpkg \ + -o ${WRKSRC}/mtasc-bin \ + ${WRKSRC}/extc/extc.cmxa \ + ${WRKSRC}/swflib/swflib.cmxa \ + ${MTASC_OBJ} ) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mtasc-bin ${PREFIX}/bin/mtasc +.if !defined(NOPORTDATA) + @${MKDIR} ${DATADIR} + (cd ${WRKSRC}/mtasc && ${FIND} ${PORTDATA} -type f | ${CPIO} -pdmnu ${DATADIR}) + @${FIND} ${DATADIR} -type d -exec ${CHMOD} 555 {} \; + @${FIND} ${DATADIR} -type f -exec ${CHMOD} 444 {} \; +.endif +.if !defined(NO_INSTALL_MANPAGES) + ${INSTALL_MAN} ${WRKSRC}/mtasc/doc/mtasc.1 ${PREFIX}/man/man1 +.endif +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/mtasc/doc/*.txt ${DOCSDIR} +.endif +.if !defined(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/mtasc/doc/HelloWorld.as ${EXAMPLESDIR} +.endif + +.include <bsd.port.post.mk> diff --git a/lang/mtasc/distinfo b/lang/mtasc/distinfo new file mode 100644 index 000000000000..bef3b2f9a1de --- /dev/null +++ b/lang/mtasc/distinfo @@ -0,0 +1,3 @@ +MD5 (mtasc-1.14.tar.gz) = a1ffda6f414d443b5c5b380a483710d6 +SHA256 (mtasc-1.14.tar.gz) = 2808f65fe7865399657c058d9abeb04c47903241b8d33523fce52cdaae85537f +SIZE (mtasc-1.14.tar.gz) = 727167 diff --git a/lang/mtasc/files/patch-basepath b/lang/mtasc/files/patch-basepath new file mode 100644 index 000000000000..a28f5e7d7977 --- /dev/null +++ b/lang/mtasc/files/patch-basepath @@ -0,0 +1,22 @@ +--- mtasc/main.ml.orig 2008-09-06 03:09:02.176005686 +0200 ++++ mtasc/main.ml 2008-09-06 03:11:37.642045225 +0200 +@@ -113,7 +113,7 @@ + ;; + try + let usage = "Motion-Twin ActionScript2 Compiler 1.14 - (c)2004-2008 Motion-Twin\n Usage : mtasc.exe [options] <files...>\n Options :" in +- let base_path = normalize_path (try Extc.executable_path() with _ -> ".") in ++ let base_path = normalize_path (try Extc.executable_path() ^ "/.." with _ -> "..") in + let files = ref [] in + let time = Sys.time() in + Plugin.class_path := [base_path;"";"/"]; +@@ -132,8 +132,8 @@ + ),": use precompiled mx package"); + ] @ !Plugin.options in + Arg.parse args_spec (fun file -> files := file :: !files) usage; +- Plugin.class_path := (base_path ^ "std/") :: !Plugin.class_path; +- if (match !GenSwf.version with Some x -> x >= 8 | None -> false) then Plugin.class_path := (base_path ^ "std8/") :: !Plugin.class_path; ++ Plugin.class_path := (base_path ^ "share/mtasc/std/") :: !Plugin.class_path; ++ if (match !GenSwf.version with Some x -> x >= 8 | None -> false) then Plugin.class_path := (base_path ^ "share/mtasc/std8/") :: !Plugin.class_path; + Hashtbl.remove Lexer.keywords "add"; + Parser.warning := (fun msg pos -> report ~do_exit:false (msg,pos) "Warning" (fun msg -> msg)); + if !files = [] then begin diff --git a/lang/mtasc/pkg-descr b/lang/mtasc/pkg-descr new file mode 100644 index 000000000000..b52c305935af --- /dev/null +++ b/lang/mtasc/pkg-descr @@ -0,0 +1,7 @@ +MTASC is the first ActionScript 2 Open Source free compiler. + +It can compile large number of .as class files in a very short time +and generate directly the corresponding SWF bytecode without relying +on Macromedia Flash or other tools. + +WWW: http://mtasc.org/ diff --git a/lang/mtasc/pkg-plist b/lang/mtasc/pkg-plist new file mode 100644 index 000000000000..ceeea934edad --- /dev/null +++ b/lang/mtasc/pkg-plist @@ -0,0 +1,9 @@ +@comment $FreeBSD$ +bin/mtasc +%%PORTDOCS%%%%DOCSDIR%%/CHANGES.txt +%%PORTDOCS%%%%DOCSDIR%%/Future.txt +%%PORTDOCS%%%%DOCSDIR%%/INSTALL.txt +%%PORTDOCS%%%%DOCSDIR%%/Readme.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/HelloWorld.as +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% |