Last active
April 2, 2018 19:48
-
-
Save dougmencken/c51169f48bad9d911b696ce166f353f2 to your computer and use it in GitHub Desktop.
how to get haxe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pcre | |
./configure --prefix=/opt/pcre-8.42 --enable-pcre16 --enable-utf --enable-pcregrep-libz | |
make | |
sudo make install | |
# ocaml | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/configure | |
+++ b/configure | |
@@ -483,7 +483,7 @@ | |
mathlib="";; | |
*,*-*-darwin*) | |
mathlib="" | |
- mkexe="$mkexe -Wl,-no_compact_unwind" | |
+ mkexe="$mkexe" | |
# Tell gcc that we can use 32-bit code addresses for threaded code | |
# unless we are compiled for a shared library (-fPIC option) | |
echo "#ifndef __PIC__" >> m.h | |
@@ -857,8 +857,7 @@ | |
dl_needs_underscore=false | |
shared_libraries_supported=true;; | |
*-apple-darwin*) | |
- mksharedlib="$cc -shared -flat_namespace -undefined suppress \ | |
- -Wl,-no_compact_unwind" | |
+ mksharedlib="$cc -shared -flat_namespace -undefined suppress" | |
common_cflags="$dl_defs $common_cflags" | |
dl_needs_underscore=false | |
shared_libraries_supported=true;; | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/otherlibs/unix/socketaddr.c | |
+++ b/otherlibs/unix/socketaddr.c | |
@@ -102,6 +102,13 @@ | |
} | |
} | |
+size_t strnlen( const char *str, size_t maxlen ) | |
+{ | |
+ const char *ptr = memchr( str, 0, maxlen ); | |
+ if (!ptr) return maxlen; | |
+ return ptr - str; | |
+} | |
+ | |
value alloc_sockaddr(union sock_addr_union * adr /*in*/, | |
socklen_param_type adr_len, int close_on_error) | |
{ | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
./configure -prefix /opt/ocaml-4.06 -no-debugger -no-graph | |
make world | |
sudo make install | |
sudo ln -s /opt/ocaml-4.06/bin/ocaml /usr/bin/ocaml | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlc.byte /usr/bin/ocamlc.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlc.byte /usr/bin/ocamlc | |
sudo ln -s /opt/ocaml-4.06/bin/ocamloptp.byte /usr/bin/ocamloptp.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamloptp.byte /usr/bin/ocamloptp | |
sudo ln -s /opt/ocaml-4.06/bin/ocamllex.byte /usr/bin/ocamllex.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamllex.byte /usr/bin/ocamllex | |
sudo ln -s /opt/ocaml-4.06/bin/ocamldep.byte /usr/bin/ocamldep.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamldep.byte /usr/bin/ocamldep | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlmklib.byte /usr/bin/ocamlmklib.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlmklib.byte /usr/bin/ocamlmklib | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlobjinfo.byte /usr/bin/ocamlobjinfo.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlobjinfo.byte /usr/bin/ocamlobjinfo | |
sudo ln -s /opt/ocaml-4.06/bin/ocamldoc /usr/bin/ocamldoc | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlrun /usr/bin/ocamlrun | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlyacc /usr/bin/ocamlyacc | |
# ocamlbuild | |
make configure OCAMLBUILD_PREFIX=/opt/ocaml-4.06 OCAML_NATIVE=false | |
make | |
sudo make install CHECK_IF_PREINSTALLED=false | |
sudo rm /opt/ocaml-4.06/bin/ocamlbuild | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlbuild.byte /opt/ocaml-4.06/bin/ocamlbuild | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlbuild.byte /usr/bin/ocamlbuild.byte | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlbuild.byte /usr/bin/ocamlbuild | |
# camlp4 | |
./configure --bindir=/opt/camlp4-4.06/bin --libdir=/opt/camlp4-4.06/lib --pkgdir=/opt/camlp4-4.06 | |
make | |
sudo make install | |
# ocamlfind | |
./configure -bindir /opt/ocaml-4.06/bin -mandir /opt/ocaml-4.06/man | |
touch depend | |
make all | |
sudo make install | |
sudo ln -s /opt/ocaml-4.06/bin/ocamlfind /usr/bin/ocamlfind | |
# ocaml-dune previously jbuilder | |
make | |
sudo cp ./_build/default/bin/main.exe /opt/ocaml-4.06/bin/jbuilder | |
sudo ln -s /opt/ocaml-4.06/bin/jbuilder /usr/bin/jbuilder | |
# ocaml-result | |
jbuilder build | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/result | |
sudo cp _build/default/result.cma /opt/ocaml-4.06/lib/site-lib/result/ | |
sudo cp _build/default/result.ml /opt/ocaml-4.06/lib/site-lib/result/ | |
sudo cp _build/default/.result.objs/result.cmi /opt/ocaml-4.06/lib/site-lib/result/ | |
sudo cp _build/default/.result.objs/result.cmt /opt/ocaml-4.06/lib/site-lib/result/ | |
sudo cp _build/default/META.result /opt/ocaml-4.06/lib/site-lib/result/META | |
# ocaml-cmdliner | |
make | |
sudo make PREFIX=/opt/ocaml-4.06 install | |
sudo mv /opt/ocaml-4.06/lib/ocaml/cmdliner /opt/ocaml-4.06/lib/site-lib/ | |
#sudo ocamlfind install cmdliner pkg/META | |
# ocaml-cppo | |
make | |
sudo cp ./_build/default/src/cppo_main.exe /opt/ocaml-4.06/bin/cppo | |
sudo ln -s /opt/ocaml-4.06/bin/cppo /usr/bin/cppo | |
sudo ocamlfind install cppo _build/default/META.cppo | |
# ocaml-extlib | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -10,6 +10,9 @@ endif | |
.SUFFIXES: | |
.PHONY: build clean test doc release install | |
+bytecode: | |
+ $(MAKE) -C src all | |
+ | |
build: | |
$(MAKE) -C src build | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
make bytecode | |
sudo make install | |
# ocaml-gen | |
jbuilder build | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/gen | |
sudo cp -L _build/install/default/lib/gen/gen* /opt/ocaml-4.06/lib/site-lib/gen/ | |
sudo ocamlfind install gen _build/default/META.gen | |
# ocaml-re | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/re | |
sudo cp -L -r _build/install/default/lib/re/* /opt/ocaml-4.06/lib/site-lib/re/ | |
sudo rm /opt/ocaml-4.06/lib/site-lib/re/META | |
sudo ocamlfind install re _build/default/META.re | |
# ocaml-cudf | |
make | |
sudo make install | |
# ocaml-dose | |
./configure --prefix=/opt/ocaml-4.06/ --with-bytecodeonly | |
make | |
sudo make install | |
sudo mv /opt/ocaml-4.06/lib/ocaml/4.06.0/dose3 /opt/ocaml-4.06/lib/site-lib/ | |
# ocaml-mccs | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/src/glpk/context_flags.ml | |
+++ b/src/glpk/context_flags.ml | |
@@ -19,7 +19,7 @@ match Sys.argv.(1) with | |
Printf.printf "(-lstdc++ %s)" glpk | |
| "cflags" -> | |
if Config.ccomp_type = "cc" then | |
- print_string "(-Wno-maybe-uninitialized -Wno-parentheses)" | |
+ print_string "(-Wno-parentheses)" | |
else | |
print_string "()" | |
| _ -> | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
jbuilder build | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/mccs | |
sudo cp -L -r _build/install/default/lib/mccs/* /opt/ocaml-4.06/lib/site-lib/mccs/ | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/stublibs | |
sudo cp -L _build/install/default/lib/stublibs/* /opt/ocaml-4.06/lib/site-lib/stublibs/ | |
ocamlfind list | grep mccs | |
# opam-file-format | |
make byte | |
sudo make install PREFIX=/opt/ocaml-4.06 | |
sudo mv /opt/ocaml-4.06/lib/opam-file-format /opt/ocaml-4.06/lib/site-lib/ | |
# opam | |
# ~ it’s broken | |
###./configure --prefix=/opt/ocaml-4.06/ --mandir=/opt/ocaml-4.06/man | |
# ocaml-migrate-parsetree | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/ocaml-migrate-parsetree | |
sudo cp -L -r _build/install/default/lib/ocaml-migrate-parsetree/* /opt/ocaml-4.06/lib/site-lib/ocaml-migrate-parsetree/ | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/ocaml-migrate-parsetree-ocamlbuild | |
sudo cp -L _build/install/default/lib/ocaml-migrate-parsetree-ocamlbuild/* /opt/ocaml-4.06/lib/site-lib/ocaml-migrate-parsetree-ocamlbuild/ | |
# ppx_tools_versioned | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/ppx_tools_versioned | |
sudo cp -L -r _build/install/default/lib/ppx_tools_versioned/* /opt/ocaml-4.06/lib/site-lib/ppx_tools_versioned/ | |
# ocaml-sedlex | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/sedlex | |
sudo cp -L -r _build/install/default/lib/sedlex/* /opt/ocaml-4.06/lib/site-lib/sedlex/ | |
ls -l -R /opt/ocaml-4.06/lib/site-lib/sedlex | |
# xml-light | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/xml-light | |
sudo cp xml-light.cma /opt/ocaml-4.06/lib/site-lib/xml-light/ | |
sudo cp xml.mli xmlParser.mli dtd.mli xml.cmi xmlParser.cmi dtd.cmi /opt/ocaml-4.06/lib/site-lib/xml-light/ | |
mkdir -p __build | |
cp META.in __build/META.xml-light | |
sudo ocamlfind install xml-light __build/META.xml-light | |
ls -l /opt/ocaml-4.06/lib/site-lib/xml-light/ | |
ocamlfind list | grep xml-light | |
# ocaml-rope | |
jbuilder build | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/rope | |
sudo cp -L -r _build/install/default/lib/rope/* /opt/ocaml-4.06/lib/site-lib/rope/ | |
# ocaml-obuild | |
# ~ doesn’t support bytecode-only platforms | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
# ocaml-ptmap | |
cat > jbuild << EOF | |
(jbuild_version 1) | |
(library | |
((name ptmap) | |
(public_name ptmap) | |
(wrapped false) | |
(synopsis "implementation of maps over integers implemented as Patricia trees"))) | |
EOF | |
mv opam ptmap.opam | |
jbuilder build | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/ptmap | |
sudo cp -L -r _build/install/default/lib/ptmap/* /opt/ocaml-4.06/lib/site-lib/ptmap/ | |
# ocaml-sha | |
make | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/sha | |
sudo cp -L _build/install/default/lib/sha/* /opt/ocaml-4.06/lib/site-lib/sha/ | |
sudo mkdir -p /opt/ocaml-4.06/lib/site-lib/stublibs | |
sudo cp -L _build/install/default/lib/stublibs/* /opt/ocaml-4.06/lib/site-lib/stublibs/ | |
# boehm garbage collector | |
tar xzf gc-7.6.4.tar.gz && cd gc-7.6.4 | |
cp ../libatomic_ops-7.6.2.tar.gz ./ | |
tar xzf libatomic_ops-7.6.2.tar.gz | |
mv libatomic_ops-7.6.2 libatomic_ops | |
rm libatomic_ops-7.6.2.tar.gz | |
./configure --prefix=/opt/boehm-gc-7.6.4 --enable-threads=posix --with-pic | |
make | |
sudo make install | |
# sqlite | |
./configure --prefix=/opt/sqlite3 --disable-readline | |
make | |
sudo make install | |
# neko | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -6,7 +6,6 @@ | |
include(TestBigEndian) | |
project(Neko C) | |
-set(CMAKE_OSX_ARCHITECTURES x86_64) | |
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) | |
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") | |
@@ -55,22 +54,6 @@ | |
# TODO libraries should not be built from this file, but rather by traversing the tree using add_subdirectory | |
#add_subdirectory(libs) | |
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | |
- if (${CMAKE_OSX_ARCHITECTURES} STREQUAL "i386") | |
- set(arch_64 "") | |
- elseif (${CMAKE_OSX_ARCHITECTURES} STREQUAL "x86_64") | |
- set(arch_64 "64") | |
- else() | |
- message( FATAL_ERROR "CMAKE_OSX_ARCHITECTURES should be i386 or x86_64." ) | |
- endif() | |
-else() | |
- if(CMAKE_SIZEOF_VOID_P EQUAL 8) | |
- set(arch_64 "64") | |
- else() | |
- set(arch_64 "") | |
- endif() | |
-endif() | |
- | |
if(WIN32) | |
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | |
set (CMAKE_INSTALL_PREFIX "C:/HaxeToolkit/neko" CACHE PATH "default install path" FORCE) | |
@@ -179,19 +162,6 @@ | |
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) | |
set(ARG_PIC -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE) | |
- | |
- # https://github.com/HaxeFoundation/neko/pull/17 | |
- if(CMAKE_SIZEOF_VOID_P EQUAL 4) | |
- check_c_compiler_flag(-mincoming-stack-boundary=2 HAS_MINCOMING_STACK_BOUNDARY) | |
- check_c_compiler_flag(-mstack-alignment=2 HAS_MSTACK_ALIGNMENT) | |
- if(HAS_MINCOMING_STACK_BOUNDARY) | |
- add_compile_options(-mincoming-stack-boundary=2) | |
- elseif(HAS_MSTACK_ALIGNMENT) | |
- add_compile_options(-mstack-alignment=2) | |
- endif() | |
- endif() | |
- | |
- find_package(PkgConfig REQUIRED) | |
endif() | |
# git is used for source_archive and for applying patch | |
@@ -733,22 +703,6 @@ | |
set(bin_archive_format tar.gz) | |
endif() | |
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | |
- if (${CMAKE_OSX_ARCHITECTURES} STREQUAL "i386") | |
- set(arch_64 "") | |
- elseif (${CMAKE_OSX_ARCHITECTURES} STREQUAL "x86_64") | |
- set(arch_64 "64") | |
- else() | |
- message( FATAL_ERROR "CMAKE_OSX_ARCHITECTURES should be i386 or x86_64." ) | |
- endif() | |
-else() | |
- if(CMAKE_SIZEOF_VOID_P EQUAL 8) | |
- set(arch_64 "64") | |
- else() | |
- set(arch_64 "") | |
- endif() | |
-endif() | |
- | |
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
set(OS_NAME "win") | |
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/libs/zlib/CMakeLists.txt | |
+++ b/libs/zlib/CMakeLists.txt | |
@@ -1,5 +1,3 @@ | |
-include(FindPkgConfig) | |
- | |
###################### | |
# zlib.ndll | |
@@ -53,7 +51,7 @@ | |
# Download project for fat source archive | |
add_dependencies(download_static_deps Zlib-download) | |
else() | |
- pkg_check_modules(ZLIB REQUIRED zlib) | |
+ find_package(zlib REQUIRED) | |
target_include_directories(zlib.ndll PRIVATE ${ZLIB_INCLUDEDIR} ${ZLIB_INCLUDE_DIRS}) | |
endif() | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/libs/sqlite/CMakeLists.txt | |
+++ b/libs/sqlite/CMakeLists.txt | |
@@ -27,7 +27,7 @@ | |
add_dependencies(download_static_deps Sqlite3-download) | |
else() | |
add_library(sqlite.ndll MODULE sqlite.c) | |
- pkg_check_modules(SQLITE3 REQUIRED sqlite3) | |
+ find_package(sqlite3 REQUIRED) | |
target_include_directories(sqlite.ndll PRIVATE ${SQLITE3_INCLUDEDIR} ${SQLITE3_INCLUDE_DIRS}) | |
target_link_libraries(sqlite.ndll libneko ${SQLITE3_LIBRARIES}) | |
endif() | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
rm -f -r build && mkdir -p build && cd build | |
export CC=/Developer/GCC/7.3p/PowerPC/32bit/bin/gcc | |
export CXX=/Developer/GCC/7.3p/PowerPC/32bit/bin/g++ | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/opt/neko-2-2 \ | |
-DCMAKE_PREFIX_PATH="/opt/zlib-1.2.8;/opt/boehm-gc-7.6.4;/opt/pcre-8.42;/opt/sqlite3" \ | |
-DCMAKE_C_FLAGS="-fno-common" -DCMAKE_SKIP_RPATH:BOOL=YES \ | |
-DWITH_UI=OFF -DWITH_SSL=OFF -DWITH_MYSQL=OFF -DWITH_APACHE=OFF \ | |
-DNEKO_JIT_DISABLE=ON \ | |
.. | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/vm/interp.c | |
+++ b/vm/interp.c | |
@@ -42,11 +42,11 @@ | |
#elif defined(NEKO_GCC) && defined(NEKO_PPC) | |
# define ACC_BACKUP | |
# define ACC_RESTORE | |
-# define ACC_REG asm("26") | |
-# define PC_REG asm("27") | |
-# define SP_REG asm("28") | |
-# define CSP_REG asm("29") | |
-# define VM_REG asm("30") | |
+# define ACC_REG asm("25") | |
+# define PC_REG asm("26") | |
+# define SP_REG asm("27") | |
+# define CSP_REG asm("28") | |
+# define VM_REG asm("29") | |
# define VM_ARG _vm | |
#else | |
# define ACC_BACKUP | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
make | |
sudo make install | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/bin/neko | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/bin/nekoc | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/bin/nekoml | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/bin/nekotools | |
otool -L /opt/neko-2-2/bin/* | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/lib/neko/std.ndll | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/lib/neko/regexp.ndll | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/lib/neko/sqlite.ndll | |
sudo install_name_tool -change "@rpath/libneko.2.dylib" "/opt/neko-2-2/lib/libneko.2.dylib" /opt/neko-2-2/lib/neko/zlib.ndll | |
otool -L /opt/neko-2-2/lib/neko/* | |
sudo ln -s /opt/neko-2-2/bin/neko /usr/bin/neko | |
sudo ln -s /opt/neko-2-2/bin/nekoc /usr/bin/nekoc | |
sudo ln -s /opt/neko-2-2/bin/nekoml /usr/bin/nekoml | |
sudo ln -s /opt/neko-2-2/bin/nekotools /usr/bin/nekotools | |
# haxe | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/.gitmodules | |
+++ b/.gitmodules | |
@@ -1,7 +1,7 @@ | |
[submodule "libs"] | |
path = libs | |
- url = https://github.com/HaxeFoundation/ocamllibs.git | |
+ url = git://github.com/HaxeFoundation/ocamllibs.git | |
[submodule "extra/haxelib_src"] | |
path = extra/haxelib_src | |
- url = https://github.com/HaxeFoundation/haxelib.git | |
+ url = git://github.com/HaxeFoundation/haxelib.git | |
ignore = dirty # run.n will be recompiled during make | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
git submodule sync | |
git submodule update --recursive | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -98,7 +98,10 @@ else | |
LIB_PARAMS?= -cclib -lpcre -cclib -lz | |
endif | |
-NATIVE_LIBS=-thread -cclib libs/extc/extc_stubs.o -cclib libs/extc/process_stubs.o -cclib libs/objsize/c_objsize.o -cclib libs/pcre/pcre_stubs.o -ccopt -L/usr/local/lib $(LIB_PARAMS) | |
+PCRE_LIBS?=/usr/local/lib | |
+PCRE_HEADERS?=/usr/local/include | |
+ | |
+NATIVE_LIBS=-thread -cclib libs/extc/extc_stubs.o -cclib libs/extc/process_stubs.o -cclib libs/objsize/c_objsize.o -cclib libs/pcre/pcre_stubs.o -ccopt -L$(PCRE_LIBS) $(LIB_PARAMS) | |
# Modules | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/libs/pcre/Makefile | |
+++ b/libs/pcre/Makefile | |
@@ -1,4 +1,4 @@ | |
-ALL_CFLAGS = $(CFLAGS) -I pcre | |
+ALL_CFLAGS = $(CFLAGS) -I $(PCRE_HEADERS) | |
LIBS = | |
OCAMLOPT=ocamlopt | |
OCAMLC=ocamlc | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
# when fails as Uninterpreted extension 'sedlex.regexp' add -ppx "/opt/ocaml-4.06/lib/site-lib/sedlex/ppx/ppx.exe --as-ppx" to ocamlc line | |
# ocamlfind ocamlc -ppx "/opt/ocaml-4.06/lib/site-lib/sedlex/ppx/ppx.exe --as-ppx" -bin-annot -safe-string ... | |
# and repeat invokation of make | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -61,7 +61,9 @@ else | |
OCAMLDEP_FLAGS = -native | |
endif | |
-CC_CMD = ($(COMPILER) $(ALL_CFLAGS) -c $< 2>tmp.tmp && $(MESSAGE_FILTER)) || ($(MESSAGE_FILTER) && exit 1) | |
+PPX_SEDLEX = $(shell ocamlfind printppx sedlex.ppx) | |
+ | |
+CC_CMD = ($(COMPILER) $(PPX_SEDLEX) $(ALL_CFLAGS) -c $< 2>tmp.tmp && $(MESSAGE_FILTER)) || ($(MESSAGE_FILTER) && exit 1) | |
# Meta information | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
mkdir -p _build/src/core | |
cp src/core/json.cmi _build/src/core/ | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/std/haxe/Int64Helper.hx | |
+++ b/std/haxe/Int64Helper.hx | |
@@ -86,10 +86,10 @@ class Int64Helper { | |
// In theory 2^53 and -2^53 are parseable too, but then there's no way to | |
// distinguish 2^53 from 2^53+1 | |
// (i.e. trace(9007199254740992. + 1. > 9007199254740992.); // false!) | |
- if (noFractions > 9007199254740991) { | |
+ if (noFractions > 9007199254740991.) { | |
throw "Conversion overflow"; | |
} | |
- if (noFractions < -9007199254740991) { | |
+ if (noFractions < -9007199254740991.) { | |
throw "Conversion underflow"; | |
} | |
--- a/tests/unit/src/unit/TestInt64.hx | |
+++ b/tests/unit/src/unit/TestInt64.hx | |
@@ -516,13 +516,13 @@ class TestInt64 extends Test { | |
public function testFromFloat() | |
{ | |
- for (v in [0.0, 1.0, -1.0, 9007199254740991, -9007199254740991]) { | |
+ for (v in [0.0, 1.0, -1.0, 9007199254740991., -9007199254740991.]) { | |
eq(Std.parseFloat(Std.string(fromFloat(v))), v); | |
} | |
try | |
{ | |
- fromFloat(9007199254740992); | |
+ fromFloat(9007199254740992.); | |
f(true); | |
} | |
catch (e:Dynamic) | |
@@ -532,7 +532,7 @@ class TestInt64 extends Test { | |
try | |
{ | |
- fromFloat(-9007199254740992); | |
+ fromFloat(-9007199254740992.); | |
f(true); | |
} | |
catch (e:Dynamic) | |
--- a/tests/unit/src/unitstd/Date.unit.hx | |
+++ b/tests/unit/src/unitstd/Date.unit.hx | |
@@ -21,5 +21,5 @@ date.getDay() == 3; | |
//date.getTime() == 405781340000.; | |
date.toString() == "1982-11-10 14:02:20"; | |
-var date = Date.fromTime(405781340000); | |
-date.getTime() == 405781340000; | |
+var date = Date.fromTime(405781340000.); | |
+date.getTime() == 405781340000.; | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
PATH=/opt/neko-2-2/bin:/opt/camlp4-4.06/bin:$PATH \ | |
PCRE_HEADERS="/opt/pcre-8.42/include" PCRE_LIBS="/opt/pcre-8.42/lib" \ | |
BYTECODE=1 make | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -10,7 +10,7 @@ | |
# | |
.SUFFIXES : .ml .mli .cmo .cmi .cmx .mly | |
-INSTALL_DIR=/usr/local | |
+INSTALL_DIR?=/usr/local | |
INSTALL_BIN_DIR=$(INSTALL_DIR)/bin | |
INSTALL_LIB_DIR=$(INSTALL_DIR)/lib/haxe | |
INSTALL_STD_DIR=$(INSTALL_DIR)/share/haxe/std | |
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | |
export HAXE_VERSION=4.0 | |
export HAXEPATH=/opt/haxe-${HAXE_VERSION} | |
sudo make install INSTALL_DIR="${HAXEPATH}" | |
sudo rm -f /usr/bin/haxe* | |
sudo ln -s /opt/haxe-4.0/bin/haxe /usr/bin/haxe | |
sudo ln -s /opt/haxe-4.0/bin/haxelib /usr/bin/haxelib | |
sudo haxelib setup /opt/haxe-4.0/repo | |
sudo haxelib install hxjava | |
sudo haxelib install hxcpp | |
# tell haxe where to look for stdandard library | |
export HAXE_STD_PATH="${HAXEPATH}"/share/haxe/std | |
export HXCPP_VERBOSE=1 | |
# to deal with “ The system is out of resources. java.lang.OutOfMemoryError: Java heap space ” | |
export JAVA_TOOL_OPTIONS="-Xmx512m" # javac -d build/classes -J-Xms256m -J-Xmx512m java-source-files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment