15824627 SUNBT7206171 Still problems with lua 5.2.1 integration
authorRich Burridge <rich.burridge@oracle.com>
Sat, 13 Apr 2013 10:15:50 -0700
changeset 1265 d6a57c34a9a2
parent 1264 51f059c08b40
child 1266 1a59fbe869c6
15824627 SUNBT7206171 Still problems with lua 5.2.1 integration 15825019 SUNBT7206435 graphviz lua support broken
components/graphviz/graphviz-lua.p5m
components/graphviz/patches/fix_lua.patch
components/lua/Makefile
components/lua/files/lua-64.pc
components/lua/files/lua.pc
components/lua/lua.p5m
components/lua/patches/2.lua.pc.patch
components/lua/patches/3.headers.patch
--- a/components/graphviz/graphviz-lua.p5m	Sat Apr 13 09:26:14 2013 -0700
+++ b/components/graphviz/graphviz-lua.p5m	Sat Apr 13 10:15:50 2013 -0700
@@ -39,7 +39,7 @@
 file path=usr/share/graphviz/demo/modgraph.lua
 file usr/share/man/man3/gv.3lua path=usr/share/man/man3/gv-lua.3
 link path=usr/lib/graphviz/lua/gv.so target=libgv_lua.so
-link path=usr/lib/lua/gv.so target=../graphviz/lua/libgv_lua.so
+link path=usr/lib/lua/5.2/gv.so target=../../graphviz/lua/libgv_lua.so
 
 license COPYING license=EPL1.0
 license graphviz.license.extra license="Other Notices"
--- a/components/graphviz/patches/fix_lua.patch	Sat Apr 13 09:26:14 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
---- graphviz-2.28.0/tclpkg/gv/Makefile.in.orig	2012-10-22 08:45:54.769848218 -0700
-+++ graphviz-2.28.0/tclpkg/gv/Makefile.in	2012-10-22 11:28:30.216436995 -0700
[email protected]@ -3359,6 +3359,13 @@
- 	$(SWIG) -c++ -lua -o gv_lua.cpp $(srcdir)/gv.i
- 	mv [email protected] [email protected]
- 	sed '/include/s/malloc\.h/cstdlib/' [email protected] > [email protected]
-+	mv [email protected] [email protected]
-+	(echo "#include <lua.h>\n\
-+#if LUA_VERSION_NUM >= 502\n\
-+#define LUA_GLOBALSINDEX LUA_REGISTRYINDEX\n\
-+#define luaL_reg luaL_Reg\n\
-+#endif\n" ; cat [email protected]) > [email protected]
-+
- gv.ml gv.mli: gv_ocaml.cpp
- gv_ocaml.cpp: gv.i
- 	$(SWIG) -c++ -ocaml -o gv_ocaml.cpp $(srcdir)/gv.i
--- a/components/lua/Makefile	Sat Apr 13 09:26:14 2013 -0700
+++ b/components/lua/Makefile	Sat Apr 13 10:15:50 2013 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
@@ -57,10 +57,13 @@
 $(INSTALL_64):	COMPONENT_INSTALL_ARGS += INSTALL_LIB=$(PROTOUSRLIBDIR64)
 $(INSTALL_64):	COMPONENT_INSTALL_ARGS += INSTALL_BIN=$(PROTOUSRBINDIR64)
 
+$(BUILD_DIR)/lua-64.pc:		files/lua-64.pc
+	/bin/sed -e "s#MACH64#$(MACH64)#g" < $< > [email protected]
+
 # common targets
 build:		$(BUILD_32_and_64)
 	
-install:	$(INSTALL_32_and_64)
+install:	$(INSTALL_32_and_64) $(BUILD_DIR)/lua-64.pc
 		
 test: 		install
 		(gzip -dc $(LUA_TESTS).tar.gz | tar xopf -; \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/lua/files/lua-64.pc	Sat Apr 13 10:15:50 2013 -0700
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib/MACH64
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: 5.2.1
+Requires: 
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/lua/files/lua.pc	Sat Apr 13 10:15:50 2013 -0700
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: 5.2.1
+Requires: 
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
--- a/components/lua/lua.p5m	Sat Apr 13 09:26:14 2013 -0700
+++ b/components/lua/lua.p5m	Sat Apr 13 10:15:50 2013 -0700
@@ -33,7 +33,7 @@
     value="org.opensolaris.category.2008:Development/Other Languages"
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid value=LSARC/2009/013
+set name=org.opensolaris.arc-caseid value=PSARC/2009/013
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 file path=usr/bin/$(MACH64)/lua
 file path=usr/bin/$(MACH64)/luac
@@ -44,9 +44,9 @@
 file path=usr/include/luaconf.h
 file path=usr/include/lualib.h
 file path=usr/lib/$(MACH64)/liblua.so
-file $(MACH64)/lua.pc path=usr/lib/$(MACH64)/pkgconfig/lua.pc
+file lua-64.pc path=usr/lib/$(MACH64)/pkgconfig/lua.pc
 file path=usr/lib/liblua.so
-file $(MACH32)/lua.pc path=usr/lib/pkgconfig/lua.pc
+file files/lua.pc path=usr/lib/pkgconfig/lua.pc
 file path=usr/share/doc/lua/contents.html
 file path=usr/share/doc/lua/logo.gif
 file path=usr/share/doc/lua/lua.css
--- a/components/lua/patches/2.lua.pc.patch	Sat Apr 13 09:26:14 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
---- lua.pc.orig	1970-01-01 00:00:00.000000000 +0000
-+++ lua.pc	2012-09-19 14:02:00.393620513 +0000
[email protected]@ -0,0 +1,15 @@
-+# lua.pc -- pkg-config data for Lua
-+
-+prefix=/usr
-+exec_prefix=${prefix}
-+libdir=${exec_prefix}/lib
-+includedir=${prefix}/include
-+
-+Name: Lua
-+Description: An Extensible Extension Language
-+Version: 5.2.1
-+Requires: 
-+Libs: -L${libdir} -llua -lm
-+Cflags: -I${includedir}
-+
-+# (end of lua.pc)
--- a/components/lua/patches/3.headers.patch	Sat Apr 13 09:26:14 2013 -0700
+++ b/components/lua/patches/3.headers.patch	Sat Apr 13 10:15:50 2013 -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
+
 --- src/lua.h.~1~	Fri Apr 20 06:18:26 2012
 +++ src/lua.h	Tue Oct 16 16:37:24 2012
 @@ -9,6 +9,10 @@
@@ -66,3 +69,15 @@
  
 +#endif
 
+
+--- src/luaconf.h.orig	2012-10-25 08:39:30.502881780 -0700
++++ src/luaconf.h	2012-10-25 08:40:00.726463215 -0700
[email protected]@ -100,7 +100,7 @@
+ #else			/* }{ */
+ 
+ #define LUA_VDIR	LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
+-#define LUA_ROOT	"/usr/local/"
++#define LUA_ROOT	"/usr/"
+ #define LUA_LDIR	LUA_ROOT "share/lua/" LUA_VDIR
+ #define LUA_CDIR	LUA_ROOT "lib/lua/" LUA_VDIR
+ #define LUA_PATH_DEFAULT  \