debian/0000755000000000000000000000000012264017762007175 5ustar debian/lua5.2.manpages0000644000000000000000000000002312264016452011706 0ustar lua5.2.1 luac5.2.1 debian/liblua5.2-dev.install0000644000000000000000000000010212264016452013022 0ustar usr/include usr/lib/*/*.a usr/lib/*/*.so usr/lib/*/pkgconfig/*.pc debian/lua5.2.postinst0000644000000000000000000000077312264016452012012 0ustar #!/bin/sh -e case "$1" in configure) update-alternatives \ --install /usr/bin/lua lua-interpreter /usr/bin/lua5.2 120 \ --slave /usr/share/man/man1/lua.1.gz lua-manual \ /usr/share/man/man1/lua5.2.1.gz update-alternatives \ --install /usr/bin/luac lua-compiler /usr/bin/luac5.2 120 \ --slave /usr/share/man/man1/luac.1.gz lua-compiler-manual \ /usr/share/man/man1/luac5.2.1.gz ;; esac #DEBHELPER# debian/lua.pc.in0000644000000000000000000000137612264016452010711 0ustar #prefix=/usr #major_version=5.1 #version=5.1.0 #deb_host_multiarch=x86_64-linux-gnu lib_name=lua${major_version} libdir=${prefix}/lib/${deb_host_multiarch} includedir=${prefix}/include # # The following are intended to be used via "pkg-config --variable". # Install paths for Lua modules. For example, if a package wants to install # Lua source modules to the /usr/local tree, call pkg-config with # "--define-variable=prefix=/usr/local" and "--variable=INSTALL_LMOD". INSTALL_LMOD=${prefix}/share/lua/${major_version} INSTALL_CMOD=${prefix}/lib/${deb_host_multiarch}/lua/${major_version} Name: Lua Description: Lua language engine Version: ${version} Requires: Libs: -L${libdir} -l${lib_name} Libs.private: -lm -ldl Cflags: -I${includedir}/${lib_name_include} debian/examples/0000755000000000000000000000000012264016452011006 5ustar debian/examples/debian/0000755000000000000000000000000012264016452012230 5ustar debian/examples/debian/static_app/0000755000000000000000000000000012264016452014357 5ustar debian/examples/debian/static_app/README0000644000000000000000000000042412264016452015237 0ustar This is a minimal example of an application binary linked to the Lua library. The main points are to show the proper way to include a Lua header (e.g. "#include ") and how to use pkg-config to avoid hard-coding Lua header paths, library names, and dependent libraries. debian/examples/debian/static_app/app.c0000644000000000000000000000037012264016452015303 0ustar #include "lua.h" #include "lauxlib.h" #include "lualib.h" int main(void) { int result; lua_State* L = lua_open(); luaL_openlibs(L); result = luaL_dostring(L, "print 'hello from Lua'"); lua_close(L); return (result != 0); } debian/examples/debian/static_app/Makefile0000644000000000000000000000033312264016452016016 0ustar CFLAGS += -Wall LUA_CFLAGS := $(shell pkg-config lua5.1 --cflags) LUA_LINK_FLAGS := $(shell pkg-config lua5.1 --libs) all: test app: CFLAGS += $(LUA_CFLAGS) $(LUA_LINK_FLAGS) test: app ./app clean: $(RM) *.o app debian/examples/debian/README0000644000000000000000000000050412264016452013107 0ustar Index of examples: script - how to create an executable script static_app - how to build an app which uses the Lua C library binary_module - how to build static and shared binary modules To build and run all examples: $ make test For a quieter run use the "-s" option. Another useful target is "clean". debian/examples/debian/script/0000755000000000000000000000000012264016452013534 5ustar debian/examples/debian/script/README0000644000000000000000000000100012264016452014403 0ustar This is just a minimal example of an executable Lua script. Main points: * use the "env" tool to avoid hard-coding the Lua interpreter path. This allows programs calling your script to control the interpreter run via PATH. * don't use the ".lua" suffix on executable scripts. You may want to change the implementation language later (e.g. to C, LuaJIT, etc.). Your editor should be smart enough to detect a script's language by looking at the first line of the file, so that is not a valid excuse. debian/examples/debian/script/hello0000755000000000000000000000006212264016452014563 0ustar #!/usr/bin/env lua5.2 print 'hello from Lua 5.2' debian/examples/debian/script/Makefile0000644000000000000000000000004412264016452015172 0ustar all: test test: ./hello clean: ; debian/examples/debian/binary_module/0000755000000000000000000000000012264016452015061 5ustar debian/examples/debian/binary_module/README0000644000000000000000000000150512264016452015742 0ustar Binary Lua modules: best practices for Unix Key points ---------- * don't hard-code Lua header, library, or module paths in your build script * use pkg-config tool * use libtool, especially for modules to be loaded dynamically * for general modules which are to be published for use by various apps: * provide both static and dynamic library files Real example ------------ In this directory is a minimal binary Lua module called "foo" which has a single function "get_greeting" which returns a string. The purpose is to show how to build and use both dynamic and static modules in a portable way (as far as Unix goes). If you don't have libtool installed, try: $ apt-get install libtool Build and run the dynamic test with: $ make test-dynamic or the static test with: $ make test-dynamic debian/examples/debian/binary_module/lua-foo.c0000644000000000000000000000053512264016452016572 0ustar #define LUA_LIB #include #include static int get_greeting(lua_State* L) { lua_pushstring(L, "hello from Lua"); return 1; } static const luaL_Reg funcs[] = { { "get_greeting", get_greeting }, { NULL, NULL } }; int luaopen_foo(lua_State* L) { lua_newtable(L); luaL_setfuncs(L, funcs, 0); return 1; } debian/examples/debian/binary_module/app.c0000644000000000000000000000056512264016452016013 0ustar #include #include #include int luaopen_foo(lua_State* L); int main(void) { int result; lua_State* L = luaL_newstate(); luaL_openlibs(L); result = luaL_dostring(L, "foo = require 'foo'"); if (result != 0) return 1; result = luaL_dostring(L, "print(foo.get_greeting())"); lua_close(L); return (result != 0); } debian/examples/debian/binary_module/Makefile0000644000000000000000000000421712264016452016525 0ustar LIBTOOL = libtool --silent --tag=CC LUA_CFLAGS := $(shell pkg-config lua5.2 --cflags) LUA_LDFLAGS := $(shell pkg-config lua5.2 --libs) LUA_LDSFLAGS := $(shell pkg-config lua5.2 --static --libs) # this is the path where you'll eventually install the module RPATH=$(shell pkg-config lua5.2 --define-variable=prefix=/usr/local \ --variable=INSTALL_CMOD) # Following is a build and use example for a binary Lua module "foo". The # implementation is in "lua-foo.c". To support dynamic loading conventions # it will need to have an open function named "luaopen_foo" which registers # the global module "foo". test: test-dynamic test-static test-static-all # compile source to make objects for static and dynamic link lua-foo.lo: lua-foo.c $(LIBTOOL) --mode=compile $(CC) -c -Wall -O2 $(LUA_CFLAGS) lua-foo.c # link objects to make static and dynamic libraries. The .so will be # left in "./.libs/". Note that the Lua library and its dependencies are # not called out on the link line since they are assumed to be part of # whatever our library is linked to. We want to avoid duplicate library # copies, which is a waste of space and can cause run-time problems. liblua-foo.la foo.so: lua-foo.lo $(LIBTOOL) --mode=link $(CC) \ -rpath $(RPATH) $(LUA_LDSFLAGS) -o liblua-foo.la lua-foo.lo ln -sf ./.libs/liblua-foo.so foo.so # If all went well, we can dynamically load the module into Lua. The # following will load the library into the interpreter and call a function. test-dynamic: foo.so lua5.2 -l foo -e 'print(foo.get_greeting())' app: app.c liblua-foo.la $(LIBTOOL) --mode=link $(CC) -Wall -O2 $(LUA_CFLAGS) \ -static $(LUA_LDFLAGS) -o app app.c liblua-foo.la app-s: app.c liblua-foo.la $(LIBTOOL) --mode=link $(CC) -Wall -O2 $(LUA_CFLAGS) \ -static -Wc,-static $(LUA_LDSFLAGS) -o app-s app.c liblua-foo.la test-static: app ./app ldd app test-static-all: app-s ./app-s ldd app-s || true # install static and dynamic libraries for module to global location install: liblua-foo.la mkdir -p $(RPATH) $(LIBTOOL) --mode=install install liblua-foo.la $(RPATH)/liblua-foo.la rm $(RPATH)/liblua-foo.la clean: $(RM) *.o *.lo *.la *.so app app-s $(RM) -r ./.libs/ debian/examples/debian/Makefile0000644000000000000000000000021112264016452013662 0ustar SUBDIRS = script static_app binary_module .PHONY: $(SUBDIRS) %:: $(SUBDIRS) @: $(SUBDIRS):: $(MAKE) -C $(SUBDIR) $@ $(MAKECMDGOALS) debian/lua5.2.prerm0000644000000000000000000000031412264016452011243 0ustar #!/bin/sh -e case "$1" in remove) update-alternatives --remove lua-interpreter /usr/bin/lua5.2 update-alternatives --remove lua-compiler /usr/bin/luac5.2 ;; esac #DEBHELPER# debian/lua5.1.prerm0000644000000000000000000000032612264016452011245 0ustar #!/bin/sh -e case "$1" in remove|disappear) update-alternatives --remove lua-interpreter /usr/bin/lua5.2 update-alternatives --remove lua-compiler /usr/bin/luac5.2 ;; esac #DEBHELPER# debian/watch0000644000000000000000000000024212264016452010217 0ustar # test this watch file using: # uscan --watchfile debian/watch --upstream-version 0.0.1 --package lua5.2 # version=3 http://www.lua.org/ftp/ lua-(5.2.\d).tar.gz debian/rules0000755000000000000000000000263012264016452010251 0ustar #!/usr/bin/make -f ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)) MYLIBS=-lpthread endif %: dh $@ override_dh_auto_build: $(MAKE) linux \ MYCFLAGS="$(CFLAGS)" \ MYLDFLAGS="$(LDFLAGS)" \ MYLIBS=$(MYLIBS) PKG_CONFIG_FILE=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/lua5.2.pc LUA_MULTIARCH_INCLUDE = debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/ LUA_MULTIARCH = lua5.2-deb-multiarch.h override_dh_auto_configure: echo "#ifndef _LUA_DEB_MULTIARCH_" > src/$(LUA_MULTIARCH) echo "#define _LUA_DEB_MULTIARCH_" >> src/$(LUA_MULTIARCH) echo "#define DEB_HOST_MULTIARCH \"$(DEB_HOST_MULTIARCH)\"" >> \ src/$(LUA_MULTIARCH) echo "#endif" >> src/$(LUA_MULTIARCH) override_dh_auto_install: dh_auto_install mkdir -p `dirname $(PKG_CONFIG_FILE)` echo "prefix=/usr" > $(PKG_CONFIG_FILE) echo "major_version=5.2" >> $(PKG_CONFIG_FILE) echo "version=5.2.0" >> $(PKG_CONFIG_FILE) echo "lib_name_include=lua5.2" >> $(PKG_CONFIG_FILE) echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKG_CONFIG_FILE) cat debian/lua.pc.in >> $(PKG_CONFIG_FILE) cat doc/lua.1 | sed 's/TH LUA 1/TH LUA5.2 1/' > lua5.2.1 cat doc/luac.1 | sed 's/TH LUAC 1/TH LUAC5.2 1/' > luac5.2.1 mkdir -p $(LUA_MULTIARCH_INCLUDE) cp src/$(LUA_MULTIARCH) $(LUA_MULTIARCH_INCLUDE) override_dh_auto_clean: dh_auto_clean rm -f lua5.2.1 luac5.2.1 rm -f src/$(LUA_MULTIARCH) override_dh_strip: dh_strip --dbg-package=liblua5.2-0-dbg debian/compat0000644000000000000000000000000212264016452010366 0ustar 9 debian/lua5.2.install0000644000000000000000000000001012264016452011555 0ustar usr/bin debian/liblua5.2-0.install0000644000000000000000000000002112264016452012403 0ustar usr/lib/*/*.so.* debian/source/0000755000000000000000000000000012264016452010470 5ustar debian/source/format0000644000000000000000000000001412264016452011676 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000544012264016452011045 0ustar lua5.2 (5.2.3-1) unstable; urgency=medium * New upstream release (Closes: #734757) -- Enrico Tassi Fri, 10 Jan 2014 17:16:40 +0100 lua5.2 (5.2.2-3) unstable; urgency=low * Put ./?.lua in last position in package.path -- Enrico Tassi Mon, 25 Nov 2013 11:55:23 +0100 lua5.2 (5.2.2-2) unstable; urgency=low * Fix .pc to spit -L/usr/lib/$DEB_HOST_MULTIARCH * Fix interpreter version used in sample hello world script (Closes: #704526) * Fix alternative for luac (Closes: #702133) * Remove redundant ./?.lua entry in package.path (Closes: #688679) * debian-make patch fixed to use MYLDFLAGS when building the .so -- Enrico Tassi Tue, 17 Sep 2013 23:49:47 +0200 lua5.2 (5.2.2-1) unstable; urgency=low * New upstream release * Packaging moved to git * Fix watch file * Call update-alternatives --remove in prerm (thanks lintian) -- Enrico Tassi Mon, 23 Jul 2012 15:00:02 +0200 lua5.2 (5.2.1-3) unstable; urgency=low * Rename lua-deb-multiarch.h into lua5.2-deb-multiarch.h and install it in /usr/include/$DEB_HOST_MULTIARCH/ to make it available with no extra -I directive -- Enrico Tassi Wed, 18 Jul 2012 18:43:06 +0200 lua5.2 (5.2.1-2) unstable; urgency=low * Install architecture dependent .h file in /usr/lib and fix .pc files accordingly to fix multiarch issues -- Enrico Tassi Fri, 15 Jun 2012 10:13:41 +0200 lua5.2 (5.2.1-1) unstable; urgency=low * New upstream release -- Enrico Tassi Fri, 04 May 2012 16:34:31 +0200 lua5.2 (5.2.0-3) unstable; urgency=low * Add DEB_HOST_MULTIARCH to cflags in the .pc file (see #671286). * On hurd add -lpthreads * Quilt patches refreshed -- Enrico Tassi Fri, 04 May 2012 16:29:29 +0200 lua5.2 (5.2.0-2) unstable; urgency=low * Add pre/postrm scripts to remove alternatives (Closes: #668434) * debian/compat set to 9 to install debug symbols in the right place * Standards-version set to 3.9.3, no changes -- Enrico Tassi Thu, 12 Apr 2012 10:00:25 +0200 lua5.2 (5.2.0-1) unstable; urgency=low * Final 5.2 release * Link the shared library with -lm and -ldl -- Enrico Tassi Sat, 24 Dec 2011 11:44:39 +0100 lua5.2 (5.2.0~rc5-1) experimental; urgency=low * Do not link against ncurses (patch by Sven Joachim) (Closes: #646165) * Include manpages (Closes: #636149) -- Enrico Tassi Wed, 07 Dec 2011 18:40:43 +0100 lua5.2 (5.2.0~beta-1) experimental; urgency=low * Initial release. (Closes: #604972) -- Enrico Tassi Sat, 30 Jul 2011 10:42:07 +0200 debian/copyright0000644000000000000000000000242612264016452011127 0ustar Format: http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=174 Upstream-Name: Lua team Upstream-Contact: team@lua.org Source: http://www.lua.org/ftp Files: * Copyright: Copyright 1994-2011 Lua.org, PUC-Rio. License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/lua5.2-doc.docs0000644000000000000000000000005112264016452011607 0ustar doc/*.html doc/*.css doc/*.png doc/*.gif debian/control0000644000000000000000000000664212264016452010603 0ustar Source: lua5.2 Section: interpreters Priority: optional Maintainer: Enrico Tassi Uploaders: John V. Belmonte Build-Depends: debhelper (>= 9), quilt (>= 0.40), libtool, libreadline-dev Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-lua/lua5.2.git Vcs-Browser: http://git.debian.org/?p=pkg-lua/lua5.2.git Homepage: http://www.lua.org Package: lua5.2-doc Architecture: all Section: doc Depends: ${misc:Depends} Description: Documentation for the Lua language version 5.2 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains the official manual covering the Lua language and C API, examples, etc. Package: lua5.2 Architecture: any Multi-Arch: foreign Provides: lua Depends: ${shlibs:Depends}, ${misc:Depends} Description: Simple, extensible, embeddable programming language Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains the Lua command line interpreter and bytecode compiler. Install it if you are developing or using Lua scripts. Package: liblua5.2-dev Architecture: any Multi-Arch: same Depends: liblua5.2-0 (= ${binary:Version}), libc6-dev|libc-dev, libreadline-dev, ${misc:Depends} Recommends: pkg-config, libtool Section: libdevel Description: Development files for the Lua language version 5.2 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains developer resources for using the Lua library. Install it if you are developing programs which use the Lua C API. Package: liblua5.2-0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs Description: Shared library for the Lua interpreter version 5.2 Lua is a powerful, light-weight programming language designed for extending applications. The language engine is accessible as a library, having a C API which allows the application to exchange data with Lua programs and also to extend Lua with C functions. Lua is also used as a general-purpose, stand-alone language through the simple command line interpreter provided. . This package contains runtime libraries. You shouldn't need to install it explicitly. Package: liblua5.2-0-dbg Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, liblua5.2-0 (= ${binary:Version}), ${misc:Depends} Section: debug Priority: extra Description: Debug symbols for the Lua shared library interpreter This package contains the debugging symbols for liblua5.2 and lua5.2 debian/patches/0000755000000000000000000000000012264016452010617 5ustar debian/patches/0001-debian-make.patch0000644000000000000000000002334212264016452014357 0ustar From: Enrico Tassi Date: Sun, 30 Jun 2013 22:55:45 +0200 Subject: debian-make =================================================================== --- Makefile | 22 ++++++------- src/Makefile | 103 +++++++++++++++++++++++++++++++---------------------------- 2 files changed, 66 insertions(+), 59 deletions(-) diff --git a/Makefile b/Makefile index bd9515f..e173fea 100644 --- a/Makefile +++ b/Makefile @@ -10,17 +10,17 @@ PLAT= none # so take care if INSTALL_TOP is not an absolute path. See the local target. # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. -INSTALL_TOP= /usr/local +INSTALL_TOP= $(DESTDIR)/usr INSTALL_BIN= $(INSTALL_TOP)/bin -INSTALL_INC= $(INSTALL_TOP)/include -INSTALL_LIB= $(INSTALL_TOP)/lib -INSTALL_MAN= $(INSTALL_TOP)/man/man1 -INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V -INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V +INSTALL_INC= $(INSTALL_TOP)/include/lua$(V) +INSTALL_LIB= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH) +INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$(V) +INSTALL_CMOD= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH)/lua/$(V) # How to install. If your install program does not support "-p", then # you may have to run ranlib on the installed liblua.a. -INSTALL= install -p +INSTALL= libtool --quiet --mode=install install -p INSTALL_EXEC= $(INSTALL) -m 0755 INSTALL_DATA= $(INSTALL) -m 0644 # @@ -39,9 +39,9 @@ RM= rm -f PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris # What to install. -TO_BIN= lua luac +TO_BIN= lua$(V) luac$(V) TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp -TO_LIB= liblua.a +TO_LIB= liblua$(V).la TO_MAN= lua.1 luac.1 # Lua version and release. @@ -52,10 +52,10 @@ R= $V.1 all: $(PLAT) $(PLATS) clean: - cd src && $(MAKE) $@ + cd src && $(MAKE) $@ INSTALL_LIB=$(INSTALL_LIB) test: dummy - src/lua -v + -src/lua$(V) -v install: dummy cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) diff --git a/src/Makefile b/src/Makefile index fea895b..086d36c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,9 +4,10 @@ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= # Your platform. See PLATS for possible values. -PLAT= none +PLAT= -CC= gcc +CC= libtool --quiet --mode=compile --tag=CC gcc +LD= libtool --quiet --mode=link --tag=CC gcc CFLAGS= -O2 -Wall -DLUA_COMPAT_ALL $(SYSCFLAGS) $(MYCFLAGS) LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) LIBS= -lm $(SYSLIBS) $(MYLIBS) @@ -28,19 +29,19 @@ MYOBJS= PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris -LUA_A= liblua.a -CORE_O= lapi.o lcode.o lctype.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 -LIB_O= lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o \ - lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o +LUA_A= liblua5.2.la +CORE_O= lapi.lo lcode.lo lctype.lo ldebug.lo ldo.lo ldump.lo lfunc.lo lgc.lo llex.lo \ + lmem.lo lobject.lo lopcodes.lo lparser.lo lstate.lo lstring.lo ltable.lo \ + ltm.lo lundump.lo lvm.lo lzio.lo +LIB_O= lauxlib.lo lbaselib.lo lbitlib.lo lcorolib.lo ldblib.lo liolib.lo \ + lmathlib.lo loslib.lo lstrlib.lo ltablib.lo loadlib.lo linit.lo BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) -LUA_T= lua -LUA_O= lua.o +LUA_T= lua5.2 +LUA_O= lua.lo -LUAC_T= luac -LUAC_O= luac.o +LUAC_T= luac5.2 +LUAC_O= luac.lo ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) @@ -58,12 +59,13 @@ a: $(ALL_A) $(LUA_A): $(BASE_O) $(AR) $@ $(BASE_O) $(RANLIB) $@ + $(LD) -o $@ $(LDFLAGS) -version-info 0:0:0 -rpath $(INSTALL_LIB) $(BASE_O) -lm -ldl $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + $(LD) -o $@ $(LDFLAGS) -static -Wl,-E lua.o $(LUA_A) $(LIBS) $(LUAC_T): $(LUAC_O) $(LUA_A) - $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + $(LD) -o $@ $(LDFLAGS) -static luac.o lundump.o lopcodes.o $(LUA_A) -lm -ldl clean: $(RM) $(ALL_T) $(ALL_O) @@ -125,63 +127,68 @@ solaris: # DO NOT DELETE -lapi.o: lapi.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ +%.lo:%.c + $(CC) $(CFLAGS) -c $< + + + +lapi.lo: lapi.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h ltable.h lundump.h \ lvm.h -lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h -lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h -lbitlib.o: lbitlib.c lua.h luaconf.h lauxlib.h lualib.h -lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ +lauxlib.lo: lauxlib.c lua.h luaconf.h lauxlib.h +lbaselib.lo: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h +lbitlib.lo: lbitlib.c lua.h luaconf.h lauxlib.h lualib.h +lcode.lo: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lgc.h \ lstring.h ltable.h lvm.h -lcorolib.o: lcorolib.c lua.h luaconf.h lauxlib.h lualib.h -lctype.o: lctype.c lctype.h lua.h luaconf.h llimits.h -ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h -ldebug.o: ldebug.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ +lcorolib.lo: lcorolib.c lua.h luaconf.h lauxlib.h lualib.h +lctype.lo: lctype.c lctype.h lua.h luaconf.h llimits.h +ldblib.lo: ldblib.c lua.h luaconf.h lauxlib.h lualib.h +ldebug.lo: ldebug.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h ldebug.h ldo.h \ lfunc.h lstring.h lgc.h ltable.h lvm.h -ldo.o: ldo.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ +ldo.lo: ldo.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h ltm.h \ lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h \ lstring.h ltable.h lundump.h lvm.h -ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \ +ldump.lo: ldump.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h \ lzio.h lmem.h lundump.h -lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h \ +lfunc.lo: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h \ lstate.h ltm.h lzio.h lmem.h -lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ +lgc.lo: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h -linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h -liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h -llex.o: llex.c lua.h luaconf.h lctype.h llimits.h ldo.h lobject.h \ +linit.lo: linit.c lua.h luaconf.h lualib.h lauxlib.h +liolib.lo: liolib.c lua.h luaconf.h lauxlib.h lualib.h +llex.lo: llex.c lua.h luaconf.h lctype.h llimits.h ldo.h lobject.h \ lstate.h ltm.h lzio.h lmem.h llex.h lparser.h lstring.h lgc.h ltable.h -lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h -lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ +lmathlib.lo: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h +lmem.lo: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ ltm.h lzio.h lmem.h ldo.h lgc.h -loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h -lobject.o: lobject.c lua.h luaconf.h lctype.h llimits.h ldebug.h lstate.h \ +loadlib.lo: loadlib.c lua.h luaconf.h lauxlib.h lualib.h +lobject.lo: lobject.c lua.h luaconf.h lctype.h llimits.h ldebug.h lstate.h \ lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h lvm.h -lopcodes.o: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h -loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h -lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ +lopcodes.lo: lopcodes.c lopcodes.h llimits.h lua.h luaconf.h +loslib.lo: loslib.c lua.h luaconf.h lauxlib.h lualib.h +lparser.lo: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \ lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h ldo.h lfunc.h \ lstring.h lgc.h ltable.h -lstate.o: lstate.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ +lstate.lo: lstate.c lua.h luaconf.h lapi.h llimits.h lstate.h lobject.h \ ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h lstring.h \ ltable.h -lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ +lstring.lo: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \ ltm.h lzio.h lstring.h lgc.h -lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h -ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ +lstrlib.lo: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h +ltable.lo: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \ ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h -ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h -ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ +ltablib.lo: ltablib.c lua.h luaconf.h lauxlib.h lualib.h +ltm.lo: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \ lmem.h lstring.h lgc.h ltable.h -lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h -luac.o: luac.c lua.h luaconf.h lauxlib.h lobject.h llimits.h lstate.h \ +lua.lo: lua.c lua.h luaconf.h lauxlib.h lualib.h +luac.lo: luac.c lua.h luaconf.h lauxlib.h lobject.h llimits.h lstate.h \ ltm.h lzio.h lmem.h lundump.h ldebug.h lopcodes.h -lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ +lundump.lo: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \ llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h lundump.h -lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ +lvm.lo: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \ lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h -lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ +lzio.lo: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ lzio.h debian/patches/series0000644000000000000000000000005712264016452012036 0ustar 0001-debian-make.patch 0002-debian-paths.patch debian/patches/0002-debian-paths.patch0000644000000000000000000000251412264016452014560 0ustar From: Enrico Tassi Date: Sun, 30 Jun 2013 22:55:45 +0200 Subject: debian-paths =================================================================== --- src/luaconf.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/luaconf.h b/src/luaconf.h index df802c9..6a19853 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -98,16 +98,23 @@ LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll;" ".\\?.dll" #else /* }{ */ - +/* This defines DEB_HOST_MULTIARCH */ +#include "lua5.2-deb-multiarch.h" #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/" #define LUA_ROOT "/usr/local/" +#define LUA_ROOT2 "/usr/" #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR +#define LUA_LDIR2 LUA_ROOT2 "share/lua/" LUA_VDIR #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR +#define LUA_CDIR2 LUA_ROOT2 "lib/" DEB_HOST_MULTIARCH "/lua/" LUA_VDIR +#define LUA_CDIR3 LUA_ROOT2 "lib/lua/" LUA_VDIR #define LUA_PATH_DEFAULT \ LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ - LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" "./?.lua" + LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ + LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua;" "./?.lua" #define LUA_CPATH_DEFAULT \ - LUA_CDIR"?.so;" LUA_CDIR"loadall.so;" "./?.so" + LUA_CDIR"?.so;" LUA_CDIR2"?.so;" \ + LUA_CDIR3"?.so;" LUA_CDIR"loadall.so;" "./?.so" #endif /* } */