Eddie Luo wrote: > Hi all, > > I'm porting lua, a powerful, fast, light-weight, embeddable scripting > language, which is widely used as scripting language in video game > development. Could you help take some time to review? You can find the webrev > at: http://cr.opensolaris.org/~eddie/lua/ >
Here's a few comments: Please update all the files with the correct CDDL header and copyright header formats. Here's an example: http://cr.opensolaris.org/~jwalker/meld/usr/src/cmd/Makefile.html Since lua is primarily a library, I would base it at: usr/src/lib instead of usr/src/cmd, and move your files to the usr/src/lib directory. usr/src/Targetdirs - you won't need to update Targetdirs much since most of the lua files can go into know locations: usr/bin/lua usr/bin/luac usr/lib/liblua.a usr/lib/liblua.so usr/include/lua.h usr/include/luaconf.h usr/include/lualib.h usr/include/lauxlib.h usr/include/lua.hpp usr/share/man/man1/lua.1 usr/share/man/man1/luac.1 In addition, I recommend putting the test and some of the doc files under: usr/lib/lua/test usr/share/doc/lua It's important to include the test files for lua, so people can learn how to program using it. You will need to update Targetdirs for those directories. usr/src/cmd/lua/METEDATA - change the file name to METADATA - add a NAME field like is shown here: http://wikis.sun.com/display/SFWNotes/Package+writing+guidelines usr/src/cmd/lua/Makefile.sfw - change this: 29 VER=lua-5.1.4 - to: 29 VER = $(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) 30 TARBALL = $(VER).tar.gz 31 PATCHES:sh = echo Patches/*.patch - change this: 33 all: $(VER)/Makefile 34 (cd $(VER); \ 35 $(MAKE) solaris 2>&1 ) 36 37 install: all 38 $(SH) ./install-lua - to: 33 all: $(VER)/Makefile 34 (cd $(VER); env - \ 35 MAKE=$(GMAKE) \ 36 $(GMAKE) solaris) 37 38 install: all 39 (cd $(VER); env - \ 40 MAKE=$(GMAKE) \ 41 $(GMAKE) install) 42 $(SH) ./install-sfw -change this: 40 $(VER)/Makefile: $(VER).tar.gz 41 /usr/bin/gzip -dc $(VER).tar.gz | \ 42 $(GTAR) xpf - --no-same-owner 43 touch $(VER)/Makefile 44 (cd $(VER); cat ../patch | gpatch -p1 ) 45 find $(VER) -type d -exec /usr/bin/chmod 755 "{}" \; 46 find $(VER) -type f -exec /usr/bin/chmod ugo+r "{}" \; - to: 40 $(VER)/Makefile: $(VER)/.patched 41 touch $@ usr/src/cmd/lua/install-lua - change name to install-sfw - I think you are making this too hard, take a look at: usr/src/cmd/webalizer/install-sfw usr/src/cmd/lua/patch - change name to Makefile.patch - create a Patches directory and store Makefile.patch there, so it works with above Makefile.sfw changes. I would use this: INSTALL_TOP=$(CFGPREFIX) ... INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 ... INSTALL= ginstall -p Also, after you get it completely working using gcc, try compiling it with SS12. You need to add a sunman-stability file to update the man pages. Here's an example: usr/src/cmd/webalizer/sunman-stability Change package name to SUNWlua and change the name of the pkgdefs directory to SUNWlua. Update the pkginfo.tmpl and prototype* files accordingly. Cheers, Jim
