update to HashLink 1.12
Release Notes: https://github.com/HaxeFoundation/hashlink/releases/tag/1.12 adds a library for sqlite3 support tested and runs latest versions of the games Northgard and Dead Cells
This commit is contained in:
parent
9ac5ea8291
commit
b7196ba4fa
@ -3,13 +3,11 @@ USE_WXNEEDED = Yes
|
||||
|
||||
COMMENT = virtual machine for Haxe
|
||||
|
||||
DISTNAME = hashlink-1.11pl0
|
||||
REVISION = 0
|
||||
GH_ACCOUNT = HaxeFoundation
|
||||
GH_PROJECT = hashlink
|
||||
GH_COMMIT = e31db78d8e0a07e2be6816fbd8f63ad28afc8ff1
|
||||
GH_TAGNAME = 1.12
|
||||
|
||||
SHARED_LIBS = hl 0.1 # 1.11
|
||||
SHARED_LIBS = hl 1.0 # 1.12
|
||||
|
||||
CATEGORIES = lang
|
||||
HOMEPAGE = https://hashlink.haxe.org/
|
||||
@ -19,7 +17,7 @@ MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += SDL2 c m mbedcrypto mbedtls mbedx509 openal png pthread
|
||||
WANTLIB += turbojpeg uv vorbisfile z
|
||||
WANTLIB += sqlite3 turbojpeg uv vorbisfile z
|
||||
|
||||
# C11
|
||||
COMPILER = base-clang ports-gcc
|
||||
@ -27,6 +25,7 @@ COMPILER_LANGS = c
|
||||
|
||||
LIB_DEPENDS = audio/libvorbis \
|
||||
audio/openal \
|
||||
databases/sqlite3 \
|
||||
devel/libuv \
|
||||
devel/sdl2 \
|
||||
graphics/jpeg \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (hashlink-1.11pl0-e31db78d.tar.gz) = JXqZl01gcEnZlJQjhmHyw4z8fihg+HfeM4By+aEYe/U=
|
||||
SIZE (hashlink-1.11pl0-e31db78d.tar.gz) = 4361399
|
||||
SHA256 (hashlink-1.12.tar.gz) = djKED09ksGZiIQhYQYxtJrhJLPdIak6G6+JC4nz4ur0=
|
||||
SIZE (hashlink-1.12.tar.gz) = 4376163
|
||||
|
@ -16,12 +16,12 @@ Index: Makefile
|
||||
INSTALL_BIN_DIR ?= $(PREFIX)/bin
|
||||
@@ -9,12 +7,12 @@ INSTALL_INCLUDE_DIR ?= $(PREFIX)/include
|
||||
|
||||
LIBS=fmt sdl ssl openal ui uv mysql
|
||||
LIBS=fmt sdl ssl openal ui uv mysql sqlite
|
||||
|
||||
-CFLAGS = -Wall -O3 -I src -msse2 -mfpmath=sse -std=c11 -I include -I include/pcre -I include/mikktspace -I include/minimp3 -D LIBHL_EXPORTS
|
||||
-CFLAGS = -Wall -O3 -I src -msse2 -mfpmath=sse -std=c11 -D LIBHL_EXPORTS
|
||||
-LFLAGS = -L. -lhl
|
||||
+CFLAGS = ${CFLAGS} -I src -I${LOCALBASE}/include -I${X11BASE}/include -std=c11 -I include -I include/pcre -I include/mikktspace -I include/minimp3 -D LIBHL_EXPORTS
|
||||
+LFLAGS = -L. -L${LOCALBASE}/lib -lhl
|
||||
+LFLAGS = -L. -L${LOCALBASE} -lhl
|
||||
EXTRA_LFLAGS ?=
|
||||
-LIBFLAGS =
|
||||
-HLFLAGS = -ldl
|
||||
@ -31,14 +31,14 @@ Index: Makefile
|
||||
+LIBEXT = so.${LIBhl_VERSION}
|
||||
LIBTURBOJPEG = -lturbojpeg
|
||||
|
||||
PCRE = include/pcre/pcre_chartables.o include/pcre/pcre_compile.o include/pcre/pcre_dfa_exec.o \
|
||||
@@ -88,16 +86,9 @@ LIB += ${HL_DEBUG}
|
||||
PCRE_INCLUDE = -I include/pcre
|
||||
@@ -96,16 +94,9 @@ LIB += ${HL_DEBUG}
|
||||
else
|
||||
|
||||
# Linux
|
||||
-CFLAGS += -m$(MARCH) -fPIC -pthread -fno-omit-frame-pointer
|
||||
+CFLAGS += -fPIC -pthread -fno-omit-frame-pointer
|
||||
LFLAGS += -lm -Wl,-rpath,. -Wl,--export-dynamic -Wl,--no-undefined
|
||||
LFLAGS += -lm -Wl,-rpath,.:'$$ORIGIN':$(INSTALL_LIB_DIR) -Wl,--export-dynamic -Wl,--no-undefined
|
||||
|
||||
-ifeq ($(MARCH),32)
|
||||
-CFLAGS += -I /usr/include/i386-linux-gnu
|
||||
@ -50,7 +50,7 @@ Index: Makefile
|
||||
LIBOPENAL = -lopenal
|
||||
RELEASE_NAME = linux
|
||||
|
||||
@@ -115,7 +106,6 @@ endif
|
||||
@@ -123,7 +114,6 @@ endif
|
||||
all: libhl hl libs
|
||||
|
||||
install:
|
||||
@ -58,16 +58,68 @@ Index: Makefile
|
||||
mkdir -p $(INSTALL_BIN_DIR)
|
||||
cp hl $(INSTALL_BIN_DIR)
|
||||
mkdir -p $(INSTALL_LIB_DIR)
|
||||
@@ -131,7 +121,7 @@ uninstall:
|
||||
@@ -139,46 +129,46 @@ uninstall:
|
||||
libs: $(LIBS)
|
||||
|
||||
./include/pcre/%.o: include/pcre/%.c
|
||||
- ${CC} ${CFLAGS} -o $@ -c $< ${PCRE_FLAGS}
|
||||
+ ${CC} $(CFLAGS) -o $@ -c $< ${PCRE_FLAGS}
|
||||
|
||||
src/std/regexp.o: src/std/regexp.c
|
||||
- ${CC} ${CFLAGS} -o $@ -c $< ${PCRE_FLAGS}
|
||||
+ ${CC} $(CFLAGS) -o $@ -c $< ${PCRE_FLAGS}
|
||||
|
||||
libhl: ${LIB}
|
||||
- ${CC} -o libhl.$(LIBEXT) -m${MARCH} ${LIBFLAGS} -shared ${LIB} -lpthread -lm
|
||||
+ ${CC} -o libhl.$(LIBEXT) ${LIBFLAGS} -shared ${LIB} -lpthread -lm
|
||||
|
||||
hlc: ${BOOT}
|
||||
${CC} ${CFLAGS} -o hlc ${BOOT} ${LFLAGS} ${EXTRA_LFLAGS}
|
||||
@@ -221,7 +211,7 @@ codesign_osx:
|
||||
- ${CC} ${CFLAGS} -o hlc ${BOOT} ${LFLAGS} ${EXTRA_LFLAGS}
|
||||
+ ${CC} $(CFLAGS) -o hlc ${BOOT} ${LFLAGS} ${EXTRA_LFLAGS}
|
||||
|
||||
hl: ${HL} libhl
|
||||
- ${CC} ${CFLAGS} -o hl ${HL} ${LFLAGS} ${EXTRA_LFLAGS} ${HLFLAGS}
|
||||
+ ${CC} $(CFLAGS) -o hl ${HL} ${LFLAGS} ${EXTRA_LFLAGS} ${HLFLAGS}
|
||||
|
||||
libs/fmt/%.o: libs/fmt/%.c
|
||||
- ${CC} ${CFLAGS} -o $@ -c $< ${FMT_INCLUDE}
|
||||
+ ${CC} $(CFLAGS) -o $@ -c $< ${FMT_INCLUDE}
|
||||
|
||||
fmt: ${FMT} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o fmt.hdll ${FMT} ${LIBFLAGS} -L. -lhl -lpng $(LIBTURBOJPEG) -lz -lvorbisfile
|
||||
+ ${CC} $(CFLAGS) -shared -o fmt.hdll ${FMT} ${LIBFLAGS} -L. -lhl -lpng $(LIBTURBOJPEG) -lz -lvorbisfile
|
||||
|
||||
sdl: ${SDL} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o sdl.hdll ${SDL} ${LIBFLAGS} -L. -lhl -lSDL2 $(LIBOPENGL)
|
||||
+ ${CC} $(CFLAGS) -shared -o sdl.hdll ${SDL} ${LIBFLAGS} -L. -lhl -lSDL2 $(LIBOPENGL)
|
||||
|
||||
openal: ${OPENAL} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o openal.hdll ${OPENAL} ${LIBFLAGS} -L. -lhl $(LIBOPENAL)
|
||||
+ ${CC} $(CFLAGS) -shared -o openal.hdll ${OPENAL} ${LIBFLAGS} -L. -lhl $(LIBOPENAL)
|
||||
|
||||
ssl: ${SSL} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o ssl.hdll ${SSL} ${LIBFLAGS} -L. -lhl -lmbedtls -lmbedx509 -lmbedcrypto $(LIBSSL)
|
||||
+ ${CC} $(CFLAGS) -shared -o ssl.hdll ${SSL} ${LIBFLAGS} -L. -lhl -lmbedtls -lmbedx509 -lmbedcrypto $(LIBSSL)
|
||||
|
||||
ui: ${UI} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o ui.hdll ${UI} ${LIBFLAGS} -L. -lhl
|
||||
+ ${CC} $(CFLAGS) -shared -o ui.hdll ${UI} ${LIBFLAGS} -L. -lhl
|
||||
|
||||
uv: ${UV} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o uv.hdll ${UV} ${LIBFLAGS} -L. -lhl -luv
|
||||
+ ${CC} $(CFLAGS) -shared -o uv.hdll ${UV} ${LIBFLAGS} -L. -lhl -luv
|
||||
|
||||
mysql: ${MYSQL} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o mysql.hdll ${MYSQL} ${LIBFLAGS} -L. -lhl
|
||||
+ ${CC} $(CFLAGS) -shared -o mysql.hdll ${MYSQL} ${LIBFLAGS} -L. -lhl
|
||||
|
||||
sqlite: ${SQLITE} libhl
|
||||
- ${CC} ${CFLAGS} -shared -o sqlite.hdll ${SQLITE} ${LIBFLAGS} -L. -lhl -lsqlite3
|
||||
+ ${CC} $(CFLAGS) -shared -o sqlite.hdll ${SQLITE} ${LIBFLAGS} -L. -lhl -lsqlite3
|
||||
|
||||
mesa:
|
||||
(cd libs/mesa && make)
|
||||
@@ -241,7 +231,7 @@ codesign_osx:
|
||||
.SUFFIXES : .c .o
|
||||
|
||||
.c.o :
|
||||
@ -75,4 +127,4 @@ Index: Makefile
|
||||
+ ${CC} $(CFLAGS) -o $@ -c $<
|
||||
|
||||
clean_o:
|
||||
rm -f ${STD} ${BOOT} ${RUNTIME} ${PCRE} ${HL} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${HL_DEBUG}
|
||||
rm -f ${STD} ${BOOT} ${RUNTIME} ${PCRE} ${HL} ${FMT} ${SDL} ${SSL} ${OPENAL} ${UI} ${UV} ${MYSQL} ${SQLITE} ${HL_DEBUG}
|
||||
|
@ -4,7 +4,7 @@ commit 61be4ae30e52a5ffcfa9212b9b81d4e06225c2ea
|
||||
Index: libs/uv/uv.c
|
||||
--- libs/uv/uv.c.orig
|
||||
+++ libs/uv/uv.c
|
||||
@@ -94,6 +94,46 @@ static void on_write( uv_write_t *wr, int status ) {
|
||||
@@ -96,6 +96,46 @@ static void on_write( uv_write_t *wr, int status ) {
|
||||
on_close((uv_handle_t*)wr);
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
add OpenBSD to ifdef
|
||||
don't typedef char{16,32}_t in clang with C++
|
||||
|
||||
Use uint16_t for uchar otherwise. char16_t doesn't exist
|
||||
work around not having uchar.h
|
||||
|
||||
Index: src/hl.h
|
||||
--- src/hl.h.orig
|
||||
+++ src/hl.h
|
||||
@@ -234,15 +234,17 @@ typedef uint16_t uchar;
|
||||
@@ -234,7 +234,7 @@ typedef uint16_t uchar;
|
||||
# define USTR(str) u##str
|
||||
#else
|
||||
# include <stdarg.h>
|
||||
@ -14,15 +11,4 @@ Index: src/hl.h
|
||||
+#if defined(HL_IOS) || defined(HL_TVOS) || defined(HL_MAC) || defined(__OpenBSD__)
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
+#if defined(__clang__) && !defined(__cplusplus)
|
||||
typedef uint16_t char16_t;
|
||||
typedef uint32_t char32_t;
|
||||
+#endif
|
||||
#else
|
||||
# include <uchar.h>
|
||||
#endif
|
||||
-typedef char16_t uchar;
|
||||
+typedef uint16_t uchar;
|
||||
# undef USTR
|
||||
# define USTR(str) u##str
|
||||
#endif
|
||||
#if !defined(__cplusplus) || __cplusplus < 201103L
|
||||
|
@ -3,7 +3,7 @@ ignore non-matching function signature
|
||||
Index: src/module.c
|
||||
--- src/module.c.orig
|
||||
+++ src/module.c
|
||||
@@ -490,8 +490,10 @@ static void hl_module_init_natives( hl_module *m ) {
|
||||
@@ -509,8 +509,10 @@ static void hl_module_init_natives( hl_module *m ) {
|
||||
p = tmp;
|
||||
append_type(&p,n->t);
|
||||
*p++ = 0;
|
||||
|
@ -3,7 +3,7 @@ enable hl_thread_id for OpenBSD using getthrid(2)
|
||||
Index: src/std/thread.c
|
||||
--- src/std/thread.c.orig
|
||||
+++ src/std/thread.c
|
||||
@@ -483,6 +483,8 @@ HL_PRIM int hl_thread_id() {
|
||||
@@ -772,6 +772,8 @@ HL_PRIM int hl_thread_id() {
|
||||
uint64_t tid64;
|
||||
pthread_threadid_np(NULL, &tid64);
|
||||
return (pid_t)tid64;
|
||||
|
@ -7,6 +7,7 @@ include/hlc_main.c
|
||||
@bin lib/mysql.hdll
|
||||
@bin lib/openal.hdll
|
||||
@bin lib/sdl.hdll
|
||||
@bin lib/sqlite.hdll
|
||||
@bin lib/ssl.hdll
|
||||
@bin lib/ui.hdll
|
||||
@bin lib/uv.hdll
|
||||
|
Loading…
Reference in New Issue
Block a user