import lang/haxe

ok abieber@

DESCR:
Haxe consists of a high-level, open source programming language and a compiler.
It allows compilation of programs, written using an ECMAScript-oriented syntax,
to multiple target languages. Employing proper abstraction, it is possible to
maintain a single code-base which compiles to multiple targets.

Haxe is strongly typed but the typing system can be subverted where required.
Utilizing type information, the Haxe type system can detect errors at
compile-time which would only be noticeable at run-time in the target language.
Furthermore, type information can be used by the compiler to generate optimized
and robust code.
This commit is contained in:
thfr 2020-01-18 00:31:05 +00:00
parent 6b9894b1e7
commit 64d508510a
7 changed files with 2740 additions and 0 deletions

39
lang/haxe/Makefile Normal file
View File

@ -0,0 +1,39 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $
COMMENT = toolkit for the Haxe programming language
V = 4.0.5
DISTNAME = haxe-${V}
CATEGORIES = lang devel
HOMEPAGE = https://haxe.org
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
# GPLv2+ (Haxe compiler), MIT (standard lib and Neko virtual machine)
PERMIT_PACKAGE = Yes
WANTLIB += c gc m neko pcre pthread z
MASTER_SITES = https://thfr.info/distfiles/
EXTRACT_SUFX = .tar.xz
MODULES = lang/ocaml
BUILD_DEPENDS = devel/ocaml-ocamlbuild \
lang/nekovm \
lang/ocaml-camlp5 \
sysutils/findlib
LIB_DEPENDS = devel/boehm-gc \
devel/pcre \
lang/nekovm
MAKE_FLAGS = OCAMLPATH=${WRKSRC}/ocamldeps
USE_GMAKE = Yes
# tests/README.md contains some instructions for TravisCI, AppVeyor, SauceLabs,
# unit, and cpp unit tests. Unit tests require graphical browser.
NO_TEST = Yes
do-gen:
${SUBST_CMD} ${WRKSRC}/src/compiler/main.ml
.include <bsd.port.mk>

2
lang/haxe/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (haxe-4.0.5.tar.xz) = Mu7HjucW0JsxsvEgRAyqPtFhIMmS/3pyY/GSJZ9l17I=
SIZE (haxe-4.0.5.tar.xz) = 38784960

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libs_extc_process_stubs_c,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $
Index: libs/extc/process_stubs.c
--- libs/extc/process_stubs.c.orig
+++ libs/extc/process_stubs.c
@@ -37,7 +37,7 @@
# include <errno.h>
# include <string.h>
# ifndef __APPLE__
-# if defined(__FreeBSD__) || defined(__DragonFly__)
+# if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
# include <sys/wait.h>
# else
# include <wait.h>

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libs_extlib-leftovers_uTF8_ml,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $
Index: libs/extlib-leftovers/uTF8.ml
--- libs/extlib-leftovers/uTF8.ml.orig
+++ libs/extlib-leftovers/uTF8.ml
@@ -177,7 +177,7 @@ let rec iter_aux proc s i =
let iter proc s = iter_aux proc s 0
-let compare s1 s2 = Pervasives.compare s1 s2
+let compare s1 s2 = Stdlib.compare s1 s2
exception Malformed_code

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_compiler_main_ml,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $
path to hashlink version
Index: src/compiler/main.ml
--- src/compiler/main.ml.orig
+++ src/compiler/main.ml
@@ -273,7 +273,7 @@ module Initialize = struct
"python"
| Hl ->
add_std "hl";
- if not (Common.raw_defined com "hl_ver") then Define.raw_define_value com.defines "hl_ver" (try Std.input_file (Common.find_file com "hl/hl_version") with Not_found -> assert false);
+ if not (Common.raw_defined com "hl_ver") then Define.raw_define_value com.defines "hl_ver" (try Std.input_file (Common.find_file com "${PREFIX}/share/haxe/std/hl/hl_version") with Not_found -> assert false);
"hl"
| Eval ->
add_std "eval";

10
lang/haxe/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
Haxe consists of a high-level, open source programming language and a compiler.
It allows compilation of programs, written using an ECMAScript-oriented syntax,
to multiple target languages. Employing proper abstraction, it is possible to
maintain a single code-base which compiles to multiple targets.
Haxe is strongly typed but the typing system can be subverted where required.
Utilizing type information, the Haxe type system can detect errors at
compile-time which would only be noticeable at run-time in the target language.
Furthermore, type information can be used by the compiler to generate optimized
and robust code.

2645
lang/haxe/pkg/PLIST Normal file

File diff suppressed because it is too large Load Diff