scratchbox2-2.0-use-system-lua.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. diff --git a/Makefile b/Makefile
  2. index c5b26cc..da48ea0 100644
  3. --- a/Makefile
  4. +++ b/Makefile
  5. @@ -60,7 +60,7 @@ subdirs = luaif preload utils
  6. -include config.mak
  7. CFLAGS += -I$(OBJDIR)/include -I$(SRCDIR)/include
  8. -CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
  9. +# CFLAGS += -I$(SRCDIR)/luaif/lua-5.1.4/src
  10. CFLAGS += -D_GNU_SOURCE=1 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1
  11. CFLAGS += -DSCRATCHBOX_ROOT="$(prefix)"
  12. CFLAGS += $(MACH_CFLAG)
  13. @@ -103,10 +103,7 @@ regular: .configure .version
  14. @$(MAKE) -f $(SRCDIR)/Makefile --include-dir=$(SRCDIR) SRCDIR=$(SRCDIR) do-all
  15. multilib:
  16. - @mkdir -p obj-32
  17. - @mkdir -p obj-64
  18. - @$(MAKE) MACH_CFLAG=-m32 -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. regular
  19. - @$(MAKE) MACH_CFLAG=-m64 -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. regular
  20. + @$(MAKE) MACH_CFLAG=-m64 regular
  21. gcc_bins = addr2line ar as cc c++ c++filt cpp g++ gcc gcov gdb gdbtui gprof ld nm objcopy objdump ranlib rdi-stub readelf run size strings strip
  22. @@ -230,8 +227,7 @@ endif
  23. multilib_prefix=$(prefix)
  24. install-multilib: multilib
  25. - @$(MAKE) -C obj-32 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=32
  26. - @$(MAKE) -C obj-64 --include-dir=.. -f ../Makefile SRCDIR=.. do-install-multilib bitness=64
  27. + @$(MAKE) do-install-multilib bitness=64
  28. do-install-multilib: install-noarch
  29. $(P)INSTALL
  30. diff --git a/luaif/Makefile b/luaif/Makefile
  31. index 28e8885..5e1af6f 100644
  32. --- a/luaif/Makefile
  33. +++ b/luaif/Makefile
  34. @@ -5,7 +5,7 @@ objs := $(D)/luaif.o $(D)/sb_log.o $(D)/paths.o $(D)/argvenvp.o
  35. $(D)/sb_log.o: preload/exported.h
  36. luaif/libluaif.a: $(objs)
  37. -luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(SRCDIR)/$(LUASRC) -I$(OBJDIR)/preload -I$(SRCDIR)/preload
  38. +luaif/libluaif.a: override CFLAGS := $(CFLAGS) -O2 -g -fPIC -Wall -W -I$(OBJDIR)/preload -I$(SRCDIR)/preload
  39. luaif/libluaif.a: override LDFLAGS := $(LDFLAGS)
  40. luaif/libluaif.a: override LIBS :=
  41. @@ -24,5 +24,5 @@ luaif/liblua.a: override CFLAGS := -O2 -g -fPIC -Wall -W $(CFLAGS)
  42. luaif/liblua.a: override LDFLAGS := $(LDFLAGS)
  43. luaif/liblua.a: override LIBS :=
  44. -targets := $(targets) $(D)/libluaif.a $(D)/liblua.a
  45. +targets := $(targets) $(D)/libluaif.a
  46. diff --git a/preload/Makefile b/preload/Makefile
  47. index 9f785ba..5094dbc 100644
  48. --- a/preload/Makefile
  49. +++ b/preload/Makefile
  50. @@ -8,7 +8,7 @@ LIBSB2_LDFLAGS = -Wl,-soname=$(LIBSB2_SONAME) \
  51. # DO NOT add any libraries that depend on libpthread to
  52. # LIBSB2_LIBS or LIBS!! see the comments in luaif.c.
  53. -LIBSB2_LIBS =
  54. +LIBSB2_LIBS = -llua
  55. SHLIBEXT = so
  56. else
  57. LIBSB2_LIBS =
  58. @@ -17,7 +17,7 @@ endif
  59. $(D)/libsb2.$(SHLIBEXT): $(call O,$(objs))
  60. -$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a luaif/liblua.a
  61. +$(D)/libsb2.$(SHLIBEXT): luaif/libluaif.a
  62. $(D)/libsb2.$(SHLIBEXT): CFLAGS := $(CFLAGS) -fPIC -Wall -W \
  63. -I$(SRCDIR)/preload -Ipreload/ $(PROTOTYPEWARNINGS)
  64. $(D)/libsb2.$(SHLIBEXT): LDFLAGS := $(LDFLAGS) $(LIBSB2_LDFLAGS)