aboutsummaryrefslogtreecommitdiffstats
path: root/package/lua
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-04-13 14:34:36 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-04-13 14:34:36 +0000
commit77760bba2191869e37ed65bfc603b4a4632c9436 (patch)
treeb50ade4c108c90112d699d25e6ecd5f16616e9de /package/lua
parent37066ff2b24ce6564ec281acc97f992cd776126b (diff)
downloadupstream-77760bba2191869e37ed65bfc603b4a4632c9436.tar.gz
upstream-77760bba2191869e37ed65bfc603b4a4632c9436.tar.bz2
upstream-77760bba2191869e37ed65bfc603b4a4632c9436.zip
remove lua's dependency on libreadline and libncurses
SVN-Revision: 10817
Diffstat (limited to 'package/lua')
-rw-r--r--package/lua/Makefile2
-rw-r--r--package/lua/patches/100-no_readline.patch53
2 files changed, 54 insertions, 1 deletions
diff --git a/package/lua/Makefile b/package/lua/Makefile
index ae6206d3b6..debe6bff8e 100644
--- a/package/lua/Makefile
+++ b/package/lua/Makefile
@@ -53,7 +53,7 @@ endef
define Package/lua
$(call Package/lua/Default)
- DEPENDS:=+liblua +libreadline +libncurses
+ DEPENDS:=+liblua
TITLE+= (interpreter)
endef
diff --git a/package/lua/patches/100-no_readline.patch b/package/lua/patches/100-no_readline.patch
new file mode 100644
index 0000000000..7969a29744
--- /dev/null
+++ b/package/lua/patches/100-no_readline.patch
@@ -0,0 +1,53 @@
+Index: lua-5.1.3/src/luaconf.h
+===================================================================
+--- lua-5.1.3.orig/src/luaconf.h 2008-04-13 16:18:00.338123105 +0200
++++ lua-5.1.3/src/luaconf.h 2008-04-13 16:18:14.110907972 +0200
+@@ -36,7 +36,6 @@
+ #if defined(LUA_USE_LINUX)
+ #define LUA_USE_POSIX
+ #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+-#define LUA_USE_READLINE /* needs some extra libraries */
+ #endif
+
+ #if defined(LUA_USE_MACOSX)
+Index: lua-5.1.3/src/Makefile
+===================================================================
+--- lua-5.1.3.orig/src/Makefile 2008-04-13 16:18:18.695169214 +0200
++++ lua-5.1.3/src/Makefile 2008-04-13 16:24:41.036957630 +0200
+@@ -17,6 +17,7 @@
+ MYCFLAGS=
+ MYLDFLAGS=
+ MYLIBS=
++# USE_READLINE=1
+
+ # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
+
+@@ -83,7 +84,7 @@
+ @echo "MYLIBS = $(MYLIBS)"
+
+ # convenience targets for popular platforms
+-
++RFLAG=$(if $(USE_READLINE),-DLUA_USE_READLINE)
+ none:
+ @echo "Please choose a platform:"
+ @echo " $(PLATS)"
+@@ -98,16 +99,16 @@
+ $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
+
+ freebsd:
+- $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
++ $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E$(if $(USE_READLINE), -lreadline)"
+
+ generic:
+ $(MAKE) all MYCFLAGS=
+
+ linux:
+- $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
++ $(MAKE) all MYCFLAGS+="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline -lhistory -lncurses)"
+
+ macosx:
+- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
++ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX $(if $(USE_READLINE), MYLIBS="-lreadline")
+ # use this on Mac OS X 10.3-
+ # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
+