lua-arch.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. diff -ur lua-5.1.4/etc/lua.pc lua-5.1.4-new/etc/lua.pc
  2. --- lua-5.1.4/etc/lua.pc 2008-08-08 14:46:11.000000000 +0200
  3. +++ lua-5.1.4-new/etc/lua.pc 2012-02-23 18:25:34.000000000 +0100
  4. @@ -8,6 +8,6 @@
  5. # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
  6. -prefix= /usr/local
  7. +prefix= /usr
  8. INSTALL_BIN= ${prefix}/bin
  9. INSTALL_INC= ${prefix}/include
  10. INSTALL_LIB= ${prefix}/lib
  11. diff -ur lua-5.1.4/src/luaconf.h lua-5.1.4-new/src/luaconf.h
  12. --- lua-5.1.4/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100
  13. +++ lua-5.1.4-new/src/luaconf.h 2012-02-23 18:25:34.000000000 +0100
  14. @@ -94,7 +94,7 @@
  15. ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
  16. #else
  17. -#define LUA_ROOT "/usr/local/"
  18. +#define LUA_ROOT "/usr/"
  19. #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
  20. #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
  21. #define LUA_PATH_DEFAULT \
  22. diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile
  23. --- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100
  24. +++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100
  25. @@ -23,6 +23,7 @@
  26. PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
  27. LUA_A= liblua.a
  28. +LUA_SO= liblua.so
  29. CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
  30. lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
  31. lundump.o lvm.o lzio.o
  32. @@ -36,7 +37,7 @@
  33. LUAC_O= luac.o print.o
  34. ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
  35. -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
  36. +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
  37. ALL_A= $(LUA_A)
  38. default: $(PLAT)
  39. @@ -51,6 +52,11 @@
  40. $(AR) $@ $?
  41. $(RANLIB) $@
  42. +$(LUA_SO): $(CORE_O) $(LIB_O)
  43. + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
  44. + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
  45. + ln -sf $(LUA_SO).$(R) $(LUA_SO)
  46. +
  47. $(LUA_T): $(LUA_O) $(LUA_A)
  48. $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
  49. --- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200
  50. +++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100
  51. @@ -53,7 +53,7 @@
  52. all: $(PLAT)
  53. $(PLATS) clean:
  54. - cd src && $(MAKE) $@
  55. + cd src && $(MAKE) $@ V=$(V) R=$(R)
  56. test: dummy
  57. src/lua test/hello.lua