diff --git a/dev-lang/lua/lua-5.1.4.bep b/dev-lang/lua/lua-5.1.4.bep index d90be1b71..da95c293e 100644 --- a/dev-lang/lua/lua-5.1.4.bep +++ b/dev-lang/lua/lua-5.1.4.bep @@ -2,14 +2,15 @@ DESCRIPTION="Lua is a powerful, fast, light-weight, embeddable scripting languag HOMEPAGE="http://www.lua.org" SRC_URI="http://www.lua.org/ftp/lua-5.1.4.tar.gz" CHECKSUM_MD5="d0870f2de55d59c1c8419f36e8fac150" -REVISION="1" +REVISION="2" STATUS_HAIKU="stable" DEPEND="" BUILD { cd lua-5.1.4 - make ansi INSTALL_TOP=/boot/common LIBS= + make haiku } INSTALL { - + cd lua-5.1.4 + make install INSTALL_TOP="${DESTDIR}/boot/common" } diff --git a/dev-lang/lua/patches/lua-5.1.4.patch b/dev-lang/lua/patches/lua-5.1.4.patch new file mode 100644 index 000000000..c35b9ffba --- /dev/null +++ b/dev-lang/lua/patches/lua-5.1.4.patch @@ -0,0 +1,92 @@ +diff -up lua-5.1.4/Makefile.orig lua-5.1.4/Makefile +--- lua-5.1.4/Makefile.orig 2010-04-27 22:29:15.068419584 -0600 ++++ lua-5.1.4/Makefile 2010-04-27 22:29:20.697303040 -0600 +@@ -38,12 +38,12 @@ RANLIB= ranlib + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + + # Convenience platforms targets. +-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris ++PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris + + # What to install. + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua.a liblua.so + TO_MAN= lua.1 luac.1 + + # Lua version and release. +diff -up lua-5.1.4/src/Makefile.orig lua-5.1.4/src/Makefile +--- lua-5.1.4/src/Makefile.orig 2010-04-27 22:29:26.027787264 -0600 ++++ lua-5.1.4/src/Makefile 2010-04-27 22:29:38.680525824 -0600 +@@ -20,9 +20,10 @@ MYLIBS= + + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + +-PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris ++PLATS= aix ansi bsd freebsd generic haiku linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,7 +37,7 @@ LUAC_T= luac + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + default: $(PLAT) +@@ -57,6 +58,9 @@ $(LUA_T): $(LUA_O) $(LUA_A) + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@ -shared $(MYLDFLAGS) $? $(LIBS) ++ + clean: + $(RM) $(ALL_T) $(ALL_O) + +@@ -95,6 +99,9 @@ freebsd: + generic: + $(MAKE) all MYCFLAGS= + ++haiku: ++ $(MAKE) all MYCFLAGS=-DLUA_USE_HAIKU LIBS= ++ + linux: + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" + +diff -up lua-5.1.4/src/luaconf.h.orig lua-5.1.4/src/luaconf.h +--- lua-5.1.4/src/luaconf.h.orig 2010-04-27 22:29:48.387448832 -0600 ++++ lua-5.1.4/src/luaconf.h 2010-04-27 22:29:58.184025088 -0600 +@@ -33,6 +33,13 @@ + #define LUA_WIN + #endif + ++#if defined(LUA_USE_HAIKU) ++#define LUA_USE_MKSTEMP ++#define LUA_USE_ISATTY ++#define LUA_USE_POPEN ++#define LUA_USE_DLOPEN ++#endif ++ + #if defined(LUA_USE_LINUX) + #define LUA_USE_POSIX + #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +@@ -94,7 +101,11 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" ++# if defined(LUA_USE_HAIKU) ++# define LUA_ROOT "/boot/common/" ++# else ++# define LUA_ROOT "/usr/local/" ++# endif + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \