20983056 lua looks for modules in the wrong place s11-update
authorDanek Duvall <danek.duvall@oracle.com>
Wed, 29 Apr 2015 14:18:37 -0700
branchs11-update
changeset 4226 efcbdc9d6dd8
parent 4223 d3541a291d5e
child 4227 35a4398c64cb
20983056 lua looks for modules in the wrong place
components/lua/Makefile
components/lua/patches/1.Makefile.patch
components/lua/patches/3.headers.patch
--- a/components/lua/Makefile	Wed Apr 29 09:52:17 2015 -0700
+++ b/components/lua/Makefile	Wed Apr 29 14:18:37 2015 -0700
@@ -44,7 +44,7 @@
 CFLAGS +=	$(CC_PIC) $(CPP_LARGEFILES)
 
 COMPONENT_BUILD_ARGS += CC="$(CC)"
-COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
+COMPONENT_BUILD_ARGS += USRCFLAGS="$(CFLAGS)"
 COMPONENT_INSTALL_ARGS += INSTALL=$(INSTALL)
 COMPONENT_INSTALL_ARGS += INSTALL_TOP=$(PROTOUSRDIR)
 $(INSTALL_64):	COMPONENT_INSTALL_ARGS += INSTALL_LIB=$(PROTOUSRLIBDIR64)
--- a/components/lua/patches/1.Makefile.patch	Wed Apr 29 09:52:17 2015 -0700
+++ b/components/lua/patches/1.Makefile.patch	Wed Apr 29 14:18:37 2015 -0700
@@ -76,8 +76,8 @@
  	cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
 
 --- lua-5.1.4/src/Makefile.orig	Sat Jan 19 11:37:58 2008
-+++ lua-5.1.4/src/Makefile	Wed Feb 16 15:43:24 2011
[email protected]@ -4,25 +4,24 @@
++++ lua-5.1.4/src/Makefile	Wed Apr 29 13:50:51 2015
[email protected]@ -4,25 +4,23 @@
  
  # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
  
@@ -87,9 +87,8 @@
 -CC= gcc
 -CFLAGS= -O2 -Wall $(MYCFLAGS)
 +CC=$(CC)
-+CFLAGS= -xO3 -Xc -Kpic $(MYCFLAGS)
-+FLAG_SPARC:sh=	if [ ${MACH64} = "sparcv9" ]; then echo -xcode=pic13; fi
-+CFLAGS= $(FLAG_SPARC)
++CFLAGS= $(MYCFLAGS) $(USRCFLAGS)
++studio_XBITS.sparc.64 += -xcode=pic13
  AR= ar rcu
  RANLIB= ranlib
  RM= rm -f
@@ -111,7 +110,7 @@
  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
[email protected]@ -36,10 +35,10 @@
[email protected]@ -36,10 +34,10 @@
  LUAC_O=	luac.o print.o
  
  ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
@@ -125,7 +124,7 @@
  
  all:	$(ALL_T)
  
[email protected]@ -47,15 +46,15 @@
[email protected]@ -47,15 +45,15 @@
  
  a:	$(ALL_A)
  
@@ -148,7 +147,7 @@
  
  clean:
  	$(RM) $(ALL_T) $(ALL_O)
[email protected]@ -74,46 +73,8 @@
[email protected]@ -74,46 +72,8 @@
  	@echo "MYLDFLAGS = $(MYLDFLAGS)"
  	@echo "MYLIBS = $(MYLIBS)"
  
@@ -192,8 +191,7 @@
 -
  solaris:
 -	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl"
-+	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D__EXTENSIONS__" MYLIBS="-ldl"
++	$(MAKE) all USRCFLAGS="$(USRCFLAGS)" MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D__EXTENSIONS__" MYLIBS="-ldl"
  
  # list targets that do not create files (but not all makes understand .PHONY)
  .PHONY: all $(PLATS) default o a clean depend echo none
- 
--- a/components/lua/patches/3.headers.patch	Wed Apr 29 09:52:17 2015 -0700
+++ b/components/lua/patches/3.headers.patch	Wed Apr 29 14:18:37 2015 -0700
@@ -1,3 +1,6 @@
+Patch to src/luaconf.h is to adjust lua's default path for where it 
+looks for .lua and lua related .so's
+
 --- lua-5.1.4/src/lua.h.orig	2009-01-06 02:15:11.179130113 -0800
 +++ lua-5.1.4/src/lua.h	2009-01-06 02:15:56.570695998 -0800
 @@ -9,6 +9,10 @@
@@ -65,3 +68,14 @@
  #endif
  
  
+--- lua-5.1.4/src/luaconf.h	Wed Apr 29 11:49:07 2015
++++ lua-5.1.4/src/luaconf.h	Wed Apr 29 12:50:39 2015
[email protected]@ -94,7 +94,7 @@
+ 	".\\?.dll;"  LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
+ 
+ #else
+-#define LUA_ROOT	"/usr/local/"
++#define LUA_ROOT	"/usr/"
+ #define LUA_LDIR	LUA_ROOT "share/lua/5.1/"
+ #define LUA_CDIR	LUA_ROOT "lib/lua/5.1/"
+ #define LUA_PATH_DEFAULT  \