debian/0000755000000000000000000000000012256116252007170 5ustar debian/changelog0000644000000000000000000000756612256116252011060 0ustar mtasc (1.14-3build1) trusty; urgency=medium * Rebuild for ocaml-4.01. -- Matthias Klose Mon, 23 Dec 2013 20:27:23 +0000 mtasc (1.14-3) unstable; urgency=low * Use canonical and working Vcs-* fields * Switch to dpkg-source v3 format * Swich to debhelper dh and override_* targets * Add DEP-3 headers to the patches * Add an upstream metadata file * Bump Standards-Version -- Paul Wise Tue, 11 Jun 2013 19:35:29 +0800 mtasc (1.14-2) unstable; urgency=low * Move extc changes to new extc-fixes.patch and add Hurd support to it * Support nocheck in DEB_BUILD_OPTIONS * Bump Standards-Version -- Paul Wise Fri, 17 Jul 2009 11:32:46 +0200 mtasc (1.14-1) unstable; urgency=low * New upstream release - drop 03_flashlite_compat.patch, included upstream * Fix FTBFS with dpkg-source 3.0 (quilt) (Closes: #485252) * Wrap the Build-Depends in debian/control * Move homepage to the new field * Bump debhelper compat level to 7 * Add Vcs-* fields * Drop build-dep version numbers satisfied in oldstable/etch * Improve the patch and Makefile handling * Add patch to allow building with camlp4o from ocaml 3.11.0 Patch fix_mtasc_for_camlp4_3.11.0.patch by Stefano Zacchiroli * Implement support for parallel=n in DEB_BUILD_OPTIONS * Link to the correct version of the GPL in the copyright info * Add a README.source pointing people at the quilt docs * Add a get-orig-source target as a wrapper around maketarball * We now comply with policy 3.8.0, bump Standards-Version -- Paul Wise Tue, 10 Mar 2009 15:52:39 +0900 mtasc (1.13-4) unstable; urgency=low * Upload to unstable for ocaml 3.10.0 transition * Allow building when camlp4 is in ocaml-nox (etch) -- Paul Wise Tue, 04 Sep 2007 17:57:17 +1000 mtasc (1.13-3) experimental; urgency=low * Update for ocaml 3.10.0 transition * Use camlp4o.opt where available * Don't ignore errors from make clean -- Paul Wise Thu, 30 Aug 2007 15:14:12 +1000 mtasc (1.13-2) unstable; urgency=low * Fix detection of executable path, prevents FTBFS (Closes: #425908) * Fix classpath locations for standard includes * Create and use extra classpath dirs in /usr/local * Also test build HelloWorld.as with Flash version 8 * More completely fix upstream Makefile -- Paul Wise Sat, 26 May 2007 20:30:44 +1000 mtasc (1.13-1) unstable; urgency=low * New upstream release (Closes: #425530) - drop changes to install.ml - use new Makefile instead - drop HelloWorld.as, mtasc.1 - included upstream - remove new copy of zlib when generating the tarball * Generate a ChangeLog when creating the tarball and install it * The Windows compiled version is updated more, watch it * Change my email address now that I'm a Debian Developer * Bump Standards-Version (no changes) * Bump debhelper compatibility level * Split all changes into quilt patches * Place packaging in the public domain * Install CHANGES.txt as a NEWS file and also install Future.txt * Test-build HelloWorld.as -- Paul Wise Wed, 23 May 2007 19:17:16 +1000 mtasc (1.12-3) unstable; urgency=low * Use an argument to dh_gencontrol instead of modifying mtasc.substvars -- Paul Wise Tue, 18 Apr 2006 13:19:46 +0800 mtasc (1.12-2) unstable; urgency=low * Restructure the package to use install.ml and build bytecode versions on arches where ocaml can't yet build native code. This fixes the FTBFS on several arches. mtasc has some C code, so I can't create an arch all package. Thanks to Sven Luther and the OCaml team. Closes: #360047 -- Paul Wise Sat, 25 Mar 2006 17:15:45 +0800 mtasc (1.12-1) unstable; urgency=low * Initial release (Closes: #326931) -- Paul Wise Sun, 5 Mar 2006 12:05:37 +0800 debian/rules0000755000000000000000000000300112155577326010255 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 ifeq ($(shell test -x /usr/bin/ocamlopt -o -x /usr/bin/ocamlopt.opt && echo true),true) OCAMLC = ocamlopt OCAMLOBJECT = cmx OCAMLARCHIVE = cmxa OCAMLCUSTOM = OCAMLSTRIP = OCAMLDEPS = ocaml:Depends= else OCAMLC = ocamlc OCAMLOBJECT = cmo OCAMLARCHIVE = cma OCAMLCUSTOM = -custom OCAMLSTRIP = -Xmtasc OCAMLDEPS = ocaml:Depends=ocaml-base-nox-$(shell ocamlfind ocamlc -version) endif ifeq ($(shell test -x /usr/bin/camlp4o.opt && echo true),true) CAMLP4 = camlp4o.opt else ifeq ($(shell test -x /usr/bin/camlp4o && echo true),true) CAMLP4 = camlp4o endif %: dh $@ --parallel override_dh_auto_build: $(MAKE) -f ocaml/mtasc/doc/Makefile C=$(OCAMLC) O=$(OCAMLOBJECT) A=$(OCAMLARCHIVE) CU=$(OCAMLCUSTOM) CP=$(CAMLP4) cp ocaml/mtasc/doc/CHANGES.txt NEWS override_dh_auto_test: ./ocaml/mtasc/mtasc -v -swf helloworld.swf -main -header 640:480:20 ocaml/mtasc/doc/HelloWorld.as ./ocaml/mtasc/mtasc -version 8 -v -swf helloworld.swf -main -header 640:480:20 ocaml/mtasc/doc/HelloWorld.as override_dh_auto_clean: [ ! -f ocaml/mtasc/doc/Makefile ] || $(MAKE) -f ocaml/mtasc/doc/Makefile clean override_dh_auto_install: $(MAKE) -f ocaml/mtasc/doc/Makefile install PREFIX=/usr DESTDIR=debian/mtasc override_dh_strip: dh_strip $(OCAMLSTRIP) override_dh_gencontrol: dh_gencontrol -- -V$(OCAMLDEPS) UPSTREAM_VERSION = $(shell dpkg-parsechangelog | sed -n 's/Version: \(.*\)-[^-]*/\1/p') get-orig-source: sh debian/maketarball --upstream-version $(UPSTREAM_VERSION) debian/maketarball0000644000000000000000000000142111155407061011366 0ustar #!/bin/sh set -e package=mtasc tag=v`echo "$2" | sed 's/\./-/g'` rm -f "$3" ../$package-$2.zip mkdir $package-$2 cd $package-$2 cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot checkout -r HEAD ocaml/extc cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot checkout -r HEAD ocaml/swflib cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot checkout -r $tag ocaml/mtasc cd ocaml cvs2cl mv ChangeLog .. cd .. rm -rf ocaml cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot export -r HEAD ocaml/extc cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot export -r HEAD ocaml/swflib cvs -z3 -d:pserver:anonymous@cvs.motion-twin.com:/cvsroot export -r $tag ocaml/mtasc rm -rf ocaml/extc/zlib/ cd .. tar zcf $package-$2.tar.gz $package-$2/ rm -rf $package-$2/ debian/README.Debian0000644000000000000000000000032510667207064011237 0ustar mtasc for Debian -- Sysadmins can override the installed headers by placing files in /usr/local/share/mtasc/ and the std and std8 subdirectories. -- Paul Wise Sat, 26 May 2007 19:29:43 +1000 debian/manpages0000644000000000000000000000003010667207064010705 0ustar ocaml/mtasc/doc/mtasc.1 debian/control0000644000000000000000000000140712155605563010603 0ustar Source: mtasc Section: devel Priority: optional Maintainer: Paul Wise Build-Depends: camlp4 | ocaml-nox (<< 3.10.0-2), debhelper (>= 9), libextlib-ocaml-dev, ocaml, ocaml-best-compilers, ocaml-findlib, zlib1g-dev Standards-Version: 3.9.4 Homepage: http://www.mtasc.org Vcs-Svn: svn://anonscm.debian.org/pkg-flash/packages/mtasc/trunk Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-flash/packages/mtasc/trunk/ Package: mtasc Architecture: any Depends: ${misc:Depends}, ${ocaml:Depends}, ${shlibs:Depends} Description: ActionScript 2 to Flash (SWF) compiler MTASC is the first ActionScript 2 Open Source free compiler. It can compile large numbers of .as class files in a very short time and generate directly the corresponding SWF bytecode. debian/examples0000644000000000000000000000003610667207064010736 0ustar ocaml/mtasc/doc/HelloWorld.as debian/upstream0000644000000000000000000000075612155601351010760 0ustar Bug-Database: https://code.google.com/p/mtasc/issues/list Bug-Submit: https://code.google.com/p/mtasc/issues/entry Changelog: https://code.google.com/p/mtasc/source/list Contact: http://www.mtasc.org/#contact Donation: http://www.mtasc.org/#banner Name: Motion-Twin ActionScript 2 Compiler Name: MTASC Homepage: http://www.mtasc.org/ Repository: http://mtasc.googlecode.com/svn/ Repository-Browse: https://code.google.com/p/mtasc/source/browse/ Watch: http://mtasc.org/ zip/mtasc-([\d.]*)\.zip debian/copyright0000644000000000000000000000226211155177054011131 0ustar This package was debianized by Paul Wise on Thu, 23 Feb 2006 20:32:28 +0800. It was downloaded from :pserver:anonymous@cvs.motion-twin.com:/cvsroot Copyright: Copyright 2004-2008 Nicolas Cannasse License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The GPL license does NOT imply that you source code will have to be GPL or Open Source. You can use MTASC in order to compiler any source code without restrictions. Only if you want use the compiler as part of your application you'll have to apply the GPL rules. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2. Debian packaging: Placed in the Public Domain in 2009 by Paul Wise debian/source/0000755000000000000000000000000012155605632010473 5ustar debian/source/format0000644000000000000000000000001412155553776011714 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000012611155407061010216 0ustar version=3 http://mtasc.org/ zip/mtasc-([\d.]*)\.zip debian sh ./debian/upgradetarball debian/patches/0000755000000000000000000000000012155605632010622 5ustar debian/patches/fix_mtasc_for_camlp4_3.11.0.patch0000644000000000000000000000371012155601053016520 0ustar Patch: fix_mtasc_for_camlp4_3.11.0.patch Author: Stefano Zacchiroli Description: allow parser.ml to compile with camlp4 from ocaml 3.11.0 Applied-Upstream: yes --- a/ocaml/mtasc/parser.ml +++ b/ocaml/mtasc/parser.ml @@ -166,8 +166,8 @@ | [< '(Kwd For,p); '(POpen,_); c = parse_expr_opt; e = parse_for p c >] -> e | [< '(Kwd If,p); cond = parse_eval; e = parse_expr_opt; e2 , p2 = parse_else (pos e) >] -> EIf (cond,wrap_var e,e2), punion p p2 | [< '(Kwd Return,p); v , p2 = parse_eval_option p; >] -> EReturn v , punion p p2 - | [< '(Kwd Break,p); >] -> EBreak , p - | [< '(Kwd Continue,p); >] -> EContinue , p + | [< '(Kwd Break,p) >] -> EBreak , p + | [< '(Kwd Continue,p) >] -> EContinue , p | [< '(Kwd While,p1); v = parse_eval; e = parse_expr_opt >] -> EWhile (v,wrap_var e,NormalWhile) , punion p1 (pos e) | [< '(Kwd Do,p1); e = parse_expr; '(Kwd While,_); v = parse_eval; >] -> EWhile (v,wrap_var e,DoWhile) , punion p1 (pos v) | [< '(Kwd Switch,p1); v = parse_eval; '(BrOpen,_); el, p2 = parse_switch false >] -> ESwitch (v,el) , punion p1 p2 @@ -278,7 +278,7 @@ and parse_expr_opt = parser | [< e = parse_expr >] -> e - | [< '(Next,p); >] -> EBlock [] , p + | [< '(Next,p) >] -> EBlock [] , p and parse_for p c = parser | [< '(Kwd In,_); v = parse_eval; '(PClose,p2); e = parse_expr_opt >] -> EForIn(c,v,wrap_var e) , punion p p2 @@ -324,7 +324,7 @@ and parse_block callb sp = parser | [< e = callb; el,p = parse_block callb sp >] -> e :: el , p | [< '(Next,_); el = parse_block callb sp >] -> el - | [< '(BrClose,p); >] -> [] , p + | [< '(BrClose,p) >] -> [] , p | [< '(Eof,_) >] -> error Unclosed_parenthesis sp and parse_expr_list p = parser @@ -351,7 +351,7 @@ and parse_import = parser | [< '(Const (Ident name),_); p = parse_import2 name >] -> p - | [< '(Binop OpMult,_); >] -> [] , None + | [< '(Binop OpMult,_) >] -> [] , None and parse_import2 name = parser | [< '(Dot,_); p , n = parse_import >] -> name :: p , n debian/patches/series0000644000000000000000000000017211230040702012017 0ustar 01_exe_in_usage.patch 02_makefile_kludges.patch 04_include_dirs.patch fix_mtasc_for_camlp4_3.11.0.patch extc-fixes.patch debian/patches/01_exe_in_usage.patch0000644000000000000000000000134212155601053014567 0ustar Patch: 01_exe_in_usage.patch From: Paul Wise Subject: Only show .exe in the usage on Win32 Applied-Upstream: yes --- a/ocaml/mtasc/main.ml +++ b/ocaml/mtasc/main.ml @@ -112,7 +112,8 @@ if do_exit then exit 1 ;; try - let usage = "Motion-Twin ActionScript2 Compiler 1.14 - (c)2004-2008 Motion-Twin\n Usage : mtasc.exe [options] \n Options :" in + let exe_ext = match Sys.os_type with "Win32" | "Cygwin" -> ".exe" | _ -> "" in + let usage = "Motion-Twin ActionScript2 Compiler 1.14 - (c)2004-2008 Motion-Twin\n Usage : mtasc" ^ exe_ext ^ " [options] \n Options :" in let base_path = normalize_path (try Extc.executable_path() with _ -> ".") in let files = ref [] in let time = Sys.time() in debian/patches/04_include_dirs.patch0000644000000000000000000000315112155601053014603 0ustar Patch: 04_include_dirs.patch From: Paul Wise Subject: Add a couple of paths to the default classpath Keep the default path, needed during the test build --- a/ocaml/mtasc/main.ml +++ b/ocaml/mtasc/main.ml @@ -117,7 +117,9 @@ 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;"";"/"]; + let prefix = "/usr/share/mtasc/" in + let local = "/usr/local/share/mtasc/" in + Plugin.class_path := [base_path;local;prefix;"";"/"]; let args_spec = [ ("-pack",Arg.String (fun path -> files := read_package path @ !files)," : compile all files in target package"); ("-cp",Arg.String (fun path -> Plugin.class_path := parse_class_path base_path path @ !Plugin.class_path)," : add classpath"); @@ -133,8 +135,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 ^ "std/") :: (local ^ "std/") :: (prefix ^ "std/") :: !Plugin.class_path; + if (match !GenSwf.version with Some x -> x >= 8 | None -> false) then Plugin.class_path := (base_path ^ "std8/") :: (local ^ "std8/") :: (prefix ^ "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 debian/patches/02_makefile_kludges.patch0000644000000000000000000000460012155601053015430 0ustar Patch: 02_makefile_kludges.patch From: Paul Wise Subject: Kludge the Makefile so it is useful for Debian --- a/ocaml/mtasc/doc/Makefile +++ b/ocaml/mtasc/doc/Makefile @@ -1,14 +1,24 @@ DESTDIR= PREFIX=/usr/local -ZLIB=/usr/lib/libz.so +ZLIB=-lz +C=ocamlopt +O=cmx +A=cmxa +CU= +CP=camlp4o +#C=ocamlc +#O=cmo +#A=cma +#CU=-custom +#CP=camlp4 build: - ( cd ocaml/extc ; ocamlc extc_stubs.c ;\ - ocamlfind ocamlopt -package extlib -a -o extc.cmxa -cclib ../extc/extc_stubs.o -cclib $(ZLIB) extc.mli extc.ml ) - cd ocaml/swflib ; ocamlfind ocamlopt -package extlib -a -o swflib.cmxa -I .. -I ../extc swf.ml swfZip.ml actionScript.ml swfParser.ml - ( cd ocaml/mtasc ; ocamllex lexer.mll ; ocamlopt -c expr.ml lexer.ml ; ocamlopt -c -pp camlp4o parser.ml ;\ - ocamlfind ocamlopt -package extlib -c -I .. -I ../extc -I ../swflib typer.ml class.ml plugin.ml genSwf.ml main.ml ;\ - ocamlfind ocamlopt -package extlib -linkpkg -o mtasc -cclib $(ZLIB) extLib.cmxa ../extc/extc.cmxa ../swflib/swflib.cmxa expr.cmx lexer.cmx parser.cmx typer.cmx class.cmx plugin.cmx genSwf.cmx main.cmx ) + ( cd ocaml/extc ; $(C) extc_stubs.c ;\ + ocamlfind $(C) -package extlib -a -o extc.$(A) -cclib ../extc/extc_stubs.o -cclib $(ZLIB) extc.mli extc.ml ) + cd ocaml/swflib ; ocamlfind $(C) -package extlib -a -o swflib.$(A) -I .. -I ../extc as3.mli as3code.ml as3parse.ml swf.ml swfZip.ml actionScript.ml swfParser.ml + ( cd ocaml/mtasc ; ocamllex lexer.mll ; ocamlfind $(C) -c expr.ml lexer.ml ; ocamlfind $(C) -c -pp $(CP) parser.ml ;\ + ocamlfind $(C) -package extlib -c -I .. -I ../extc -I ../swflib typer.ml class.ml plugin.ml genSwf.ml main.ml ;\ + ocamlfind $(C) -package extlib -linkpkg $(CU) -o mtasc -cclib $(ZLIB) ../extc/extc.$(A) ../swflib/swflib.$(A) expr.$(O) lexer.$(O) parser.$(O) typer.$(O) class.$(O) plugin.$(O) genSwf.$(O) main.$(O) ) clean: rm -f ocaml/*/*.cma ocaml/*/*.cmi ocaml/*/*.cmo ocaml/*/*.cmx @@ -16,9 +26,9 @@ rm -f ocaml/mtasc/lexer.ml ocaml/mtasc/mtasc install: - mkdir -p $(DESTDIR)$(PREFIX)/bin/ $(DESTDIR)$(PREFIX)/share/ + mkdir -p $(DESTDIR)$(PREFIX)/bin/ $(DESTDIR)$(PREFIX)/share/mtasc/ cp ocaml/mtasc/mtasc $(DESTDIR)$(PREFIX)/bin/ - cp -r ocaml/mtasc/std $(DESTDIR)$(PREFIX)/share/ - cp -r ocaml/mtasc/std8 $(DESTDIR)$(PREFIX)/share/ + cp -r ocaml/mtasc/std $(DESTDIR)$(PREFIX)/share/mtasc/ + cp -r ocaml/mtasc/std8 $(DESTDIR)$(PREFIX)/share/mtasc/ .PHONY: build install clean debian/patches/extc-fixes.patch0000644000000000000000000000344311230040702013706 0ustar Patch: extc-fixes.patch Author: Paul Wise Description: fix issues with extc (hurd, env stuff) --- a/ocaml/extc/extc_stubs.c +++ b/ocaml/extc/extc_stubs.c @@ -26,6 +26,7 @@ #else # include # include +# include #endif #ifdef __APPLE__ # include @@ -137,17 +138,27 @@ failwith("executable_path"); return caml_copy_string(path); #else - const char *p = getenv("_"); - if( p != NULL ) - return caml_copy_string(p); - { - char path[200]; - int length = readlink("/proc/self/exe", path, sizeof(path)); - if( length < 0 || length >= 200 ) - failwith("executable_path"); - path[length] = '\0'; - return caml_copy_string(path); + CAMLparam1 (u); + CAMLlocal1 (caml_path); + char exe_link_path[200]; + int length = readlink("/proc/self/exe", exe_link_path, sizeof(exe_link_path)); + if( length < 0 || length >= 200 ){ + char* argv0_path = realpath(String_val(u),NULL); + if( NULL != argv0_path ){ + caml_path = caml_copy_string(argv0_path); + free(argv0_path); argv0_path = NULL; + } else { + const char *shell_path = getenv("_"); + if( shell_path != NULL ) + caml_path = caml_copy_string(shell_path); + else + failwith("executable_path"); + } + } else { + exe_link_path[length] = '\0'; + caml_path = caml_copy_string(exe_link_path); } + CAMLreturn(caml_path); #endif } @@ -158,9 +169,12 @@ failwith("get_full_path"); return caml_copy_string(path); #else - char path[PATH_MAX]; - if( realpath(String_val(f),path) == NULL ) - failwith("get_full_path"); - return caml_copy_string(path); + CAMLparam1 (f); + CAMLlocal1 (path_caml); + char* path = realpath(String_val(f),NULL); + if( NULL == path ) failwith("get_full_path"); + path_caml = caml_copy_string(path); + free(path); + CAMLreturn(path_caml); #endif } debian/compat0000644000000000000000000000000212155577326010401 0ustar 9 debian/docs0000644000000000000000000000004010667207064010043 0ustar NEWS ocaml/mtasc/doc/Future.txt debian/dirs0000644000000000000000000000006510667207064010063 0ustar usr/local/share/mtasc/std usr/local/share/mtasc/std8 debian/upgradetarball0000755000000000000000000000011111155407061012076 0ustar #!/bin/sh sh ./debian/maketarball $* svn-upgrade $3 --upstreamversion $2 debian/clean0000644000000000000000000000002412155577326010204 0ustar helloworld.swf NEWS