packages: clean up the package folder
[openwrt.git] / package / utils / lua / patches / 100-no_readline.patch
1 --- a/src/luaconf.h
2 +++ b/src/luaconf.h
3 @@ -38,7 +38,6 @@
4  #if defined(LUA_USE_LINUX)
5  #define LUA_USE_POSIX
6  #define LUA_USE_DLOPEN         /* needs an extra library: -ldl */
7 -#define LUA_USE_READLINE       /* needs some extra libraries */
8  #endif
9  
10  #if defined(LUA_USE_MACOSX)
11 --- a/src/Makefile
12 +++ b/src/Makefile
13 @@ -17,6 +17,7 @@ LIBS= -lm $(MYLIBS)
14  MYCFLAGS=
15  MYLDFLAGS=
16  MYLIBS=
17 +# USE_READLINE=1
18  
19  # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
20  
21 @@ -86,7 +87,7 @@ echo:
22         @echo "MYLIBS = $(MYLIBS)"
23  
24  # convenience targets for popular platforms
25 -
26 +RFLAG=$(if $(USE_READLINE),-DLUA_USE_READLINE)
27  none:
28         @echo "Please choose a platform:"
29         @echo "   $(PLATS)"
30 @@ -101,16 +102,16 @@ bsd:
31         $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
32  
33  freebsd:
34 -       $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -lreadline"
35 +       $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E$(if $(USE_READLINE), -lreadline)"
36  
37  generic:
38         $(MAKE) all MYCFLAGS=
39  
40  linux:
41 -       $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
42 +       $(MAKE) all MYCFLAGS+="-DLUA_USE_LINUX $(RFLAG)" MYLIBS="-Wl,-E -ldl $(if $(USE_READLINE), -lreadline -lhistory -lncurses)"
43  
44  macosx:
45 -       $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
46 +       $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX $(if $(USE_READLINE), MYLIBS="-lreadline")
47  # use this on Mac OS X 10.3-
48  #      $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
49