hashlink: add x86_64-darwin compatibility (#193580)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
2ee5c2fa1c
commit
423e9cc42c
@ -12,6 +12,7 @@
|
|||||||
, pcre
|
, pcre
|
||||||
, SDL2
|
, SDL2
|
||||||
, sqlite
|
, sqlite
|
||||||
|
, getconf
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -43,11 +44,17 @@ stdenv.mkDerivation rec {
|
|||||||
sqlite
|
sqlite
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ getconf ];
|
||||||
|
|
||||||
|
postFixup = lib.optionalString stdenv.isDarwin ''
|
||||||
|
install_name_tool -change libhl.dylib $out/lib/libhl.dylib $out/bin/hl
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A virtual machine for Haxe";
|
description = "A virtual machine for Haxe";
|
||||||
homepage = "https://hashlink.haxe.org/";
|
homepage = "https://hashlink.haxe.org/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
maintainers = with maintainers; [ iblech locallycompact ];
|
maintainers = with maintainers; [ iblech locallycompact logo ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,32 @@
|
|||||||
*** a/Makefile 1970-01-01 01:00:01.000000000 +0100
|
--- a/Makefile
|
||||||
--- b/Makefile 2022-06-21 23:36:10.023460654 +0200
|
+++ b/Makefile
|
||||||
*************** endif
|
@@ -107,6 +107,7 @@ LIBFLAGS += -L/opt/libjpeg-turbo/lib64
|
||||||
*** 109,110 ****
|
endif
|
||||||
--- 109,111 ----
|
|
||||||
LIBOPENAL = -lopenal
|
LIBOPENAL = -lopenal
|
||||||
+ LIBOPENGL = -lGL
|
+LIBOPENGL = -lGL
|
||||||
RELEASE_NAME = linux
|
RELEASE_NAME = linux
|
||||||
|
|
||||||
|
endif
|
||||||
|
--- a/libs/sdl/gl.c
|
||||||
|
+++ b/libs/sdl/gl.c
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
# include <OpenGLES/ES3/gl.h>
|
||||||
|
# define HL_GLES
|
||||||
|
#elif defined(HL_MAC)
|
||||||
|
-# include <SDL.h>
|
||||||
|
+# include <SDL2/SDL.h>
|
||||||
|
# include <OpenGL/gl3.h>
|
||||||
|
# define glBindImageTexture(...) hl_error("Not supported on OSX")
|
||||||
|
# define glDispatchCompute(...) hl_error("Not supported on OSX")
|
||||||
|
--- a/libs/sdl/sdl.c
|
||||||
|
+++ b/libs/sdl/sdl.c
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
# include <SDL.h>
|
||||||
|
# include <SDL_syswm.h>
|
||||||
|
#elif defined(HL_MAC)
|
||||||
|
-# include <SDL.h>
|
||||||
|
+# include <SDL2/SDL.h>
|
||||||
|
#else
|
||||||
|
# include <SDL2/SDL.h>
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user