diff -Nru lua5.1-5.1.5/Makefile lua5.1-5.1.5/Makefile --- lua5.1-5.1.5/Makefile 2012-12-04 03:52:47.000000000 +0000 +++ lua5.1-5.1.5/Makefile 2012-02-10 09:50:23.000000000 +0000 @@ -22,14 +22,14 @@ # How to install. If your install program does not support "-p", then you # may have to run ranlib on the installed liblua.a (do "make ranlib"). -#INSTALL= install -p -#INSTALL_EXEC= $(INSTALL) -m 0755 -#INSTALL_DATA= $(INSTALL) -m 0644 +INSTALL= install -p +INSTALL_EXEC= $(INSTALL) -m 0755 +INSTALL_DATA= $(INSTALL) -m 0644 # # If you don't have install you can use cp instead. -INSTALL= cp -p -INSTALL_EXEC= $(INSTALL) -INSTALL_DATA= $(INSTALL) +# INSTALL= cp -p +# INSTALL_EXEC= $(INSTALL) +# INSTALL_DATA= $(INSTALL) # Utilities. MKDIR= mkdir -p diff -Nru lua5.1-5.1.5/debian/changelog lua5.1-5.1.5/debian/changelog --- lua5.1-5.1.5/debian/changelog 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/changelog 2012-12-04 11:58:57.000000000 +0000 @@ -1,14 +1,94 @@ -lua5.1 (5.1.5-0ubuntu0ppa2~precise) precise; urgency=low - * New upstream release +lua5.1 (5.1.5-0ubuntu0ppa3) precise; urgency=low - -- Bearnard Hibbins Mon, 02 Dec 2012 20:44:38 +0200 + * No-change backport to precise, for the nginx-openresty PPA. -lua5.1 (5.1.4-5) unstable; urgency=low + -- Stefano Rivera Tue, 04 Dec 2012 13:40:26 +0200 - * Fixed #include directives and calls to luaopen_* in the examples. - Thanks Mike Pall for reporting that (private mail). +lua5.1 (5.1.5-4) unstable; urgency=low - -- Enrico Tassi Thu, 05 Nov 2009 20:44:38 +0100 + * Rename lua-deb-multiarch.h into lua5.1-deb-multiarch.h and install it in + /usr/include/$DEB_HOST_MULTIARCH/ to make it available with no extra + -I directive (Closes: #682234, #682183, #682299) + + -- Enrico Tassi Wed, 18 Jul 2012 18:43:50 +0200 + +lua5.1 (5.1.5-3) unstable; urgency=low + + * Install architecture dependent .h file in /usr/lib and fix .pc files + accordingly to fix multiarch issues (Closes: #676695) + + -- Enrico Tassi Mon, 16 Jul 2012 12:48:01 +0200 + +lua5.1 (5.1.5-2) unstable; urgency=low + + * Put in the pkg-config .pc file -DDEB_HOST_MULTIARCH so that including + lua.h (and consequently luaconf.h) works fine even if one is not using + debhelpers (Closes: #671286, LP: #977813) + + -- Enrico Tassi Thu, 03 May 2012 14:34:16 +0200 + +lua5.1 (5.1.5-1) unstable; urgency=low + + * New upstream release (Closes: #647518) + * Bump Standards-Version to 3.9.3 (no changes) + * Fix paths of debug symbols setting debian/compat to 9 (Closes: #650104) + * Build-depend on debhelper >= 9 + * Update debian/copyright yeas to 2012 + + -- Enrico Tassi Mon, 02 Apr 2012 17:47:48 +0200 + +lua5.1 (5.1.4-12) unstable; urgency=low + + * Provide liblua5.1-c++.so and lua5.1-c++.pc to make it possible to C++ + programs to link against Lua and use the C++ exception mecanism. + (Closes: #560139) + * Add lua patch 5.1.4-4 fixing all known bugs of lua 5.1.4 + + -- Enrico Tassi Sun, 25 Dec 2011 20:15:03 +0100 + +lua5.1 (5.1.4-11) unstable; urgency=low + + * Provides: lua, as lua50 does + + -- Enrico Tassi Wed, 07 Dec 2011 21:27:02 +0100 + +lua5.1 (5.1.4-10) unstable; urgency=low + + * Use -lpthread on lua5.1 only on hurd. + + -- Enrico Tassi Mon, 25 Jul 2011 10:15:30 +0200 + +lua5.1 (5.1.4-9) unstable; urgency=low + + * Use -lpthread on hurd also for lua5.1, and not only liblua5.1 + + -- Enrico Tassi Mon, 25 Jul 2011 00:24:09 +0200 + +lua5.1 (5.1.4-8) unstable; urgency=low + + * cosmetic change to rules + * LDFLAGS=-lpthread on hurd, to allow to dlopen libs linked with pthreads + + -- Enrico Tassi Sun, 24 Jul 2011 21:59:46 +0200 + +lua5.1 (5.1.4-7) unstable; urgency=low + + * Fixed dh_installdocs target for dpkg-buildpackage -B + + -- Enrico Tassi Wed, 20 Jul 2011 12:42:45 +0200 + +lua5.1 (5.1.4-6) unstable; urgency=low + + * Switch to source-format 3.0 (quilt) + * Switch from CDBS to dh, thanks for all the fish CDBS! + * Muti-Arch compatibility + * Removed .la file and updated examples accordingly + * Fixed flags in .pc file (Closes: #497942) + * Added upstream patch-lua-5.1.4-3 (Closes: #586552) + * Better short descriptions (Closes: #597081) + * Update Standards-Version to 3.9.2 (no changes) + + -- Enrico Tassi Tue, 19 Jul 2011 16:06:11 +0200 lua5.1 (5.1.4-5) unstable; urgency=low diff -Nru lua5.1-5.1.5/debian/compat lua5.1-5.1.5/debian/compat --- lua5.1-5.1.5/debian/compat 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/compat 2012-04-02 15:48:44.000000000 +0000 @@ -1 +1 @@ -5 +9 diff -Nru lua5.1-5.1.5/debian/control lua5.1-5.1.5/debian/control --- lua5.1-5.1.5/debian/control 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/control 2012-04-02 15:48:44.000000000 +0000 @@ -3,8 +3,8 @@ Priority: optional Maintainer: John V. Belmonte Uploaders: Enrico Tassi -Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), dpatch, libtool, libreadline-dev -Standards-Version: 3.8.3 +Build-Depends: debhelper (>= 9), quilt (>= 0.40), libtool, libreadline-dev +Standards-Version: 3.9.3 Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua5.1 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua5.1 Homepage: http://www.lua.org @@ -13,7 +13,7 @@ Architecture: all Section: doc Depends: ${misc:Depends} -Description: Simple, extensible, embeddable programming language +Description: Documentation for the Lua language version 5.1 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 @@ -25,6 +25,8 @@ Package: lua5.1 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 @@ -40,10 +42,11 @@ Provides: liblua5.1-dev Conflicts: liblua5.1-dev Architecture: any +Multi-Arch: same Depends: liblua5.1-0 (= ${binary:Version}), libc6-dev|libc-dev, libreadline-dev, ${misc:Depends} Recommends: pkg-config, libtool Section: libdevel -Description: Simple, extensible, embeddable programming language +Description: Development files for the Lua language version 5.1 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 @@ -51,13 +54,16 @@ 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. + Install it if you are developing programs which use the Lua C API, both + in C or C++. Package: liblua5.1-0 Architecture: any +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Section: libs -Description: Simple, extensible, embeddable programming language +Description: Shared library for the Lua interpreter version 5.1 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 @@ -69,8 +75,10 @@ Package: liblua5.1-0-dbg Architecture: any +Multi-Arch: same Depends: ${shlibs:Depends}, liblua5.1-0 (= ${binary:Version}), ${misc:Depends} Section: debug Priority: extra -Description: Simple, extensible, embeddable programming language +Description: Debug symbols for the Lua shared library interpreter This package contains the debugging symbols for liblua5.1 and lua5.1 + diff -Nru lua5.1-5.1.5/debian/copyright lua5.1-5.1.5/debian/copyright --- lua5.1-5.1.5/debian/copyright 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/copyright 2012-04-02 15:48:44.000000000 +0000 @@ -7,7 +7,7 @@ License: -Copyright (C) 1994-2005 Lua.org, PUC-Rio. +Copyright (C) 1994-2012 Lua.org, PUC-Rio. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), diff -Nru lua5.1-5.1.5/debian/examples/debian/binary_module/Makefile lua5.1-5.1.5/debian/examples/debian/binary_module/Makefile --- lua5.1-5.1.5/debian/examples/debian/binary_module/Makefile 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/examples/debian/binary_module/Makefile 2011-07-19 14:28:43.000000000 +0000 @@ -1,9 +1,8 @@ LIBTOOL = libtool --silent --tag=CC LUA_CFLAGS := $(shell pkg-config lua5.1 --cflags) -# This retrieves the name of the libtool convenience library for Lua -# (e.g. "/usr/lib/liblua5.1.la"). -LUA_LIBTOOL := $(shell pkg-config lua5.1 --variable=libtool_lib) +LUA_LDFLAGS := $(shell pkg-config lua5.1 --libs) +LUA_LDSFLAGS := $(shell pkg-config lua5.1 --static --libs) # this is the path where you'll eventually install the module RPATH=$(shell pkg-config lua5.1 --define-variable=prefix=/usr/local \ --variable=INSTALL_CMOD) @@ -13,7 +12,7 @@ # it will need to have an open function named "luaopen_foo" which registers # the global module "foo". -test: test-dynamic test-static +test: test-dynamic test-static test-static-all # compile source to make objects for static and dynamic link lua-foo.lo: lua-foo.c @@ -26,7 +25,7 @@ # 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) -o liblua-foo.la lua-foo.lo + -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 @@ -36,15 +35,25 @@ app: app.c liblua-foo.la $(LIBTOOL) --mode=link $(CC) -Wall -O2 $(LUA_CFLAGS) \ - $(LUA_LIBTOOL) -static -o app app.c liblua-foo.la + -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 diff -Nru lua5.1-5.1.5/debian/liblua5.1-0-dev.install lua5.1-5.1.5/debian/liblua5.1-0-dev.install --- lua5.1-5.1.5/debian/liblua5.1-0-dev.install 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/liblua5.1-0-dev.install 2012-07-22 09:52:02.000000000 +0000 @@ -1,4 +1,4 @@ usr/include -usr/lib/*.la -usr/lib/*.a -usr/lib/*.so +usr/lib/*/*.a +usr/lib/*/*.so +usr/lib/*/pkgconfig/*.pc diff -Nru lua5.1-5.1.5/debian/liblua5.1-0.install lua5.1-5.1.5/debian/liblua5.1-0.install --- lua5.1-5.1.5/debian/liblua5.1-0.install 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/liblua5.1-0.install 2011-07-19 14:28:43.000000000 +0000 @@ -1 +1 @@ -usr/lib/*.so.* +usr/lib/*/*.so.* diff -Nru lua5.1-5.1.5/debian/lua-c++.pc.in lua5.1-5.1.5/debian/lua-c++.pc.in --- lua5.1-5.1.5/debian/lua-c++.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/lua-c++.pc.in 2012-07-23 09:41:06.000000000 +0000 @@ -0,0 +1,25 @@ +#prefix=/usr +#major_version=5.1 +#version=5.1.0 +#deb_host_multiarch=x86_64-linux-gnu + +lib_name=lua${major_version}-c++ +libdir=${prefix}/lib +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} diff -Nru lua5.1-5.1.5/debian/lua.pc.in lua5.1-5.1.5/debian/lua.pc.in --- lua5.1-5.1.5/debian/lua.pc.in 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/lua.pc.in 2012-07-23 09:41:06.000000000 +0000 @@ -1,6 +1,7 @@ #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 @@ -9,20 +10,16 @@ # # The following are intended to be used via "pkg-config --variable". -# The location of the libtool library. This is used when linking to the Lua -# library via libtool. -libtool_lib=${libdir}/lib${lib_name}.la - # 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/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 -Cflags: -I${includedir}/${lib_name} +Libs.private: -lm -ldl +Cflags: -I${includedir}/${lib_name_include} diff -Nru lua5.1-5.1.5/debian/patches/00dpatch.conf lua5.1-5.1.5/debian/patches/00dpatch.conf --- lua5.1-5.1.5/debian/patches/00dpatch.conf 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/00dpatch.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -conf_debianonly=1 -conf_origtargzpath=../tarballs/ diff -Nru lua5.1-5.1.5/debian/patches/00list lua5.1-5.1.5/debian/patches/00list --- lua5.1-5.1.5/debian/patches/00list 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian_make -module_paths diff -Nru lua5.1-5.1.5/debian/patches/debian_make.dpatch lua5.1-5.1.5/debian/patches/debian_make.dpatch --- lua5.1-5.1.5/debian/patches/debian_make.dpatch 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/debian_make.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## Makefile.dpatch by John V. Belmonte -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Add support for Debian package to makefiles. - -@DPATCH@ -diff -urNad trunk~/Makefile trunk/Makefile ---- trunk~/Makefile 2006-01-11 18:50:05.000000000 -0500 -+++ trunk/Makefile 2006-01-22 22:12:01.000000000 -0500 -@@ -102,3 +102,28 @@ - @find . -newer MANIFEST -type f - - # (end of Makefile) -+ -+# Use libtool for binary installs, etc. -+ -+export V -+export LIBTOOL = libtool --quiet --tag=CC -+# See libtool manual about how to set this -+export LIB_VERSION = 0:0:0 -+ -+debian_clean: -+ cd src; $(MAKE) $@ -+ -+debian_test: debian_linux -+ src/lua$(V) test/hello.lua -+ -+debian_install: debian_linux -+ cd src; mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) -+ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$(V) luac$(V) $(INSTALL_BIN) -+ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) -+ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$(V).la $(INSTALL_LIB) -+ $(foreach NAME,$(TO_MAN),$(INSTALL_DATA) doc/$(NAME) $(INSTALL_MAN)/$(basename $(NAME))$(V)$(suffix $(NAME));) -+ -+# ISSUE: MYCFLAGS not honored in the case of a CFLAGS override -+debian_linux: -+ cd src; $(MAKE) debian_all CFLAGS+=-DLUA_USE_LINUX \ -+ LIB_LIBS="-lm -ldl" LUA_LIBS="-lreadline" -diff -urNad trunk~/src/Makefile trunk/src/Makefile ---- trunk~/src/Makefile 2006-01-11 18:49:05.000000000 -0500 -+++ trunk/src/Makefile 2006-01-22 22:11:48.000000000 -0500 -@@ -165,3 +165,29 @@ - ltm.h lzio.h lmem.h lopcodes.h lundump.h - - # (end of Makefile) -+ -+# The following rules use libtool for compiling and linking in order to -+# provide shared library support. While we are at it, our desired version -+# suffixes are added to the targets, preventing conflicts with rules in -+# the upstream makefile. -+ -+LIB_NAME = liblua$(V).la -+LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) -+ -+%.lo %.o: %.c -+ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -+ -+$(LIB_NAME) $(LIB_NAME:.la=.a): $(LIB_OBJS) -+ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ -+ -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) -+ -+lua$(V): $(LUA_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) -+ -+luac$(V): $(LUAC_O) $(LIB_NAME) -+ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) -+ -+debian_clean: -+ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$(V) luac$(V) -+ -+debian_all: $(LIB_NAME) lua$(V) luac$(V) diff -Nru lua5.1-5.1.5/debian/patches/debian_make.patch lua5.1-5.1.5/debian/patches/debian_make.patch --- lua5.1-5.1.5/debian/patches/debian_make.patch 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/debian_make.patch 2012-07-23 09:41:06.000000000 +0000 @@ -0,0 +1,87 @@ +Author: John V. Belmonte +Description: Add support for Debian package to makefiles. +Index: lua5.1-5.1.5/Makefile +=================================================================== +--- lua5.1-5.1.5.orig/Makefile 2012-02-10 10:50:23.000000000 +0100 ++++ lua5.1-5.1.5/Makefile 2012-07-16 12:25:26.000000000 +0200 +@@ -12,7 +12,7 @@ + INSTALL_TOP= /usr/local + INSTALL_BIN= $(INSTALL_TOP)/bin + INSTALL_INC= $(INSTALL_TOP)/include +-INSTALL_LIB= $(INSTALL_TOP)/lib ++INSTALL_LIB= $(INSTALL_TOP)/lib/$(DEB_HOST_MULTIARCH) + INSTALL_MAN= $(INSTALL_TOP)/man/man1 + # + # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with +@@ -126,3 +126,30 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + + # (end of Makefile) ++ ++# Use libtool for binary installs, etc. ++ ++export V ++export LIBTOOL = libtool --quiet --tag=CC ++export LIBTOOLPP = libtool --quiet --tag=CXX ++# See libtool manual about how to set this ++export LIB_VERSION = 0:0:0 ++ ++debian_clean: ++ cd src; $(MAKE) $@ ++ ++debian_test: debian_linux ++ src/lua$(V) test/hello.lua ++ ++debian_install: debian_linux ++ cd src; mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$(V) luac$(V) $(INSTALL_BIN) ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$(V).la $(INSTALL_LIB) ++ cd src; $(LIBTOOLPP) --mode=install $(INSTALL_DATA) liblua$(V)-c++.la $(INSTALL_LIB) ++ $(foreach NAME,$(TO_MAN),$(INSTALL_DATA) doc/$(NAME) $(INSTALL_MAN)/$(basename $(NAME))$(V)$(suffix $(NAME));) ++ ++# ISSUE: MYCFLAGS not honored in the case of a CFLAGS override ++debian_linux: ++ cd src; $(MAKE) debian_all CFLAGS+=-DLUA_USE_LINUX \ ++ LIB_LIBS="-lm -ldl" LUA_LIBS="-lreadline" LDFLAGS="$(LDFLAGS)" +Index: lua5.1-5.1.5/src/Makefile +=================================================================== +--- lua5.1-5.1.5.orig/src/Makefile 2012-02-13 21:41:22.000000000 +0100 ++++ lua5.1-5.1.5/src/Makefile 2012-07-16 12:24:40.000000000 +0200 +@@ -180,3 +180,36 @@ + ltm.h lzio.h lmem.h lopcodes.h lundump.h + + # (end of Makefile) ++ ++# The following rules use libtool for compiling and linking in order to ++# provide shared library support. While we are at it, our desired version ++# suffixes are added to the targets, preventing conflicts with rules in ++# the upstream makefile. ++ ++LIB_NAME = liblua$(V).la ++LIBPP_NAME = liblua$(V)-c++.la ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) ++LIBPP_OBJS = $(CORE_O:%.o=%-c++.lo) $(LIB_O:%.o=%-c++.lo) ++ ++%-c++.lo %-c++.o: %.c ++ $(LIBTOOLPP) --mode=compile $(CXX) -o $*-c++.lo -c $(CPPFLAGS) $(CFLAGS) $< ++%.lo %.o: %.c ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $< ++ ++$(LIB_NAME) $(LIB_NAME:.la=.a): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \ ++ -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) ++$(LIBPP_NAME) $(LIBPP_NAME:.la=.a): $(LIBPP_OBJS) ++ $(LIBTOOLPP) --mode=link $(CXX) -version-info $(LIB_VERSION) \ ++ -rpath $(RPATH) -o $(LIBPP_NAME) $(LIBPP_OBJS) $(LIB_LIBS) ++ ++lua$(V): $(LUA_O) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) $(LDFLAGS) ++ ++luac$(V): $(LUAC_O) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) ++ ++debian_clean: ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$(V) luac$(V) ++ ++debian_all: $(LIB_NAME) $(LIBPP_NAME) lua$(V) luac$(V) diff -Nru lua5.1-5.1.5/debian/patches/extern_C.patch lua5.1-5.1.5/debian/patches/extern_C.patch --- lua5.1-5.1.5/debian/patches/extern_C.patch 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/extern_C.patch 2011-12-24 15:29:35.000000000 +0000 @@ -0,0 +1,18 @@ +Author: Enrico Tassi +Description: avoid name mangling while building with C++ +Index: lua5.1-5.1.4/src/luaconf.h +=================================================================== +--- lua5.1-5.1.4.orig/src/luaconf.h 2011-12-24 15:59:53.000000000 +0100 ++++ lua5.1-5.1.4/src/luaconf.h 2011-12-24 16:01:42.000000000 +0100 +@@ -166,7 +166,11 @@ + + #else + ++#ifdef __cplusplus ++#define LUA_API extern "C" ++#else + #define LUA_API extern ++#endif + + #endif + diff -Nru lua5.1-5.1.5/debian/patches/module_paths.dpatch lua5.1-5.1.5/debian/patches/module_paths.dpatch --- lua5.1-5.1.5/debian/patches/module_paths.dpatch 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/module_paths.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## src_luaconf.h.dpatch by John V. Belmonte -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Set Lua's default PATH and CPATH. - -@DPATCH@ -diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h ---- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500 -+++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500 -@@ -83,13 +83,17 @@ - - #else - #define LUA_ROOT "/usr/local/" -+#define LUA_ROOT2 "/usr/" - #define LUA_LDIR LUA_ROOT "share/lua/5.1/" -+#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" - #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" -+#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" - #define LUA_PATH_DEFAULT \ - "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ -- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" -+ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ -+ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" - #define LUA_CPATH_DEFAULT \ -- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" -+ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" - #endif - - diff -Nru lua5.1-5.1.5/debian/patches/module_paths.patch lua5.1-5.1.5/debian/patches/module_paths.patch --- lua5.1-5.1.5/debian/patches/module_paths.patch 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/module_paths.patch 2012-07-23 09:41:06.000000000 +0000 @@ -0,0 +1,30 @@ +Author: John V. Belmonte +Description: Set Lua's default PATH and CPATH. +Index: lua5.1-5.1.5/src/luaconf.h +=================================================================== +--- lua5.1-5.1.5.orig/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100 ++++ lua5.1-5.1.5/src/luaconf.h 2012-07-16 12:23:12.000000000 +0200 +@@ -94,14 +94,21 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else ++/* This defines DEB_HOST_MULTIARCH */ ++#include "lua5.1-deb-multiarch.h" + #define LUA_ROOT "/usr/local/" ++#define LUA_ROOT2 "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" ++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_CDIR2 LUA_ROOT2 "lib/" DEB_HOST_MULTIARCH "/lua/5.1/" ++#define LUA_CDIR3 LUA_ROOT2 "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ +- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" ++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ ++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" + #define LUA_CPATH_DEFAULT \ +- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" ++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR3"?.so;" LUA_CDIR"loadall.so" + #endif + + diff -Nru lua5.1-5.1.5/debian/patches/series lua5.1-5.1.5/debian/patches/series --- lua5.1-5.1.5/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/patches/series 2012-04-02 15:48:44.000000000 +0000 @@ -0,0 +1,3 @@ +debian_make.patch +module_paths.patch +extern_C.patch diff -Nru lua5.1-5.1.5/debian/rules lua5.1-5.1.5/debian/rules --- lua5.1-5.1.5/debian/rules 2012-12-04 02:59:22.000000000 +0000 +++ lua5.1-5.1.5/debian/rules 2012-07-23 09:41:06.000000000 +0000 @@ -1,42 +1,77 @@ #!/usr/bin/make -f -include /usr/share/cdbs/1/class/makefile.mk -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/rules/dpatch.mk - LUA_V = 5.1 -LUA_FULL_V = 5.1.4 +LUA_FULL_V = 5.1.5 SONUM = 0 LUA = lua$(LUA_V) -DEB_DESTDIR := $(DEB_DESTDIR)usr -DEB_MAKE_BUILD_TARGET = \ - debian_linux \ - RPATH=/usr/lib -DEB_MAKE_CLEAN_TARGET = debian_clean -DEB_MAKE_CHECK_TARGET = debian_test -# adjust some install directories -DEB_MAKE_INSTALL_TARGET = \ - debian_install \ - INSTALL_TOP=$(DEB_DESTDIR) \ - INSTALL_MAN=$(DEB_DESTDIR)/share/man/man1 \ - INSTALL_INC=$(DEB_DESTDIR)/include/$(LUA) +DEB_DESTDIR := $(shell pwd)/debian/tmp/usr LIB_PACKAGE_NAME = lib$(LUA)-$(SONUM) -DEB_INSTALL_DOCS_$(LUA)-doc = -X/man/ -DEB_INSTALL_DOCS_ALL = debian/README.Debian -DEB_DH_INSTALL_SOURCEDIR = debian/tmp - -PKG_CONFIG_FILE = debian/$(LIB_PACKAGE_NAME)-dev/usr/lib/pkgconfig/$(LUA).pc +PKG_DIR = $(DEB_DESTDIR)/lib/$(DEB_HOST_MULTIARCH)/pkgconfig +PKG_CONFIG_FILE = $(PKG_DIR)/$(LUA).pc +PKGPP_CONFIG_FILE = $(PKG_DIR)/$(LUA)-c++.pc DOC_DIR = debian/$(LUA)-doc/usr/share/doc/$(LUA)-doc -binary-install/$(LUA)-doc:: +LUA_MULTIARCH_INCLUDE = $(DEB_DESTDIR)/include/$(DEB_HOST_MULTIARCH)/ +LUA_MULTIARCH = lua5.1-deb-multiarch.h + +ifeq (hurd,$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)) + LDFLAGS=-lpthread +endif + +%: + dh $* + +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_build: + $(MAKE) debian_linux \ + RPATH=/usr/lib/$(DEB_HOST_MULTIARCH) \ + LDFLAGS="$(LDFLAGS)" + +override_dh_auto_install: + $(MAKE) debian_install \ + INSTALL_TOP=$(DEB_DESTDIR) \ + INSTALL_MAN=$(DEB_DESTDIR)/share/man/man1 \ + INSTALL_INC=$(DEB_DESTDIR)/include/$(LUA) + +override_dh_auto_clean: + rm -f src/$(LUA_MULTIARCH) + $(MAKE) debian_clean + +override_dh_auto_test: + $(MAKE) debian_test + +override_dh_installdocs: + dh_installdocs -X/man/ -A debian/README.Debian +ifneq (,$(filter lua5.1-doc, $(shell dh_listpackages))) chmod +x $(DOC_DIR)/examples/debian/script/hello mv $(DOC_DIR)/doc/readme.html $(DOC_DIR)/doc/index.html +endif -binary-install/$(LIB_PACKAGE_NAME)-dev:: - mkdir -p $(dir $(PKG_CONFIG_FILE)) +override_dh_install: + mkdir -p $(PKG_DIR) echo "prefix=/usr" > $(PKG_CONFIG_FILE) echo "major_version=$(LUA_V)" >> $(PKG_CONFIG_FILE) echo "version=$(LUA_FULL_V)" >> $(PKG_CONFIG_FILE) + echo "lib_name_include=lua$(LUA_V)" >> $(PKG_CONFIG_FILE) + echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKG_CONFIG_FILE) cat debian/lua.pc.in >> $(PKG_CONFIG_FILE) + echo "prefix=/usr" > $(PKGPP_CONFIG_FILE) + echo "major_version=$(LUA_V)" >> $(PKGPP_CONFIG_FILE) + echo "version=$(LUA_FULL_V)" >> $(PKGPP_CONFIG_FILE) + echo "lib_name_include=lua$(LUA_V)" >> $(PKGPP_CONFIG_FILE) + echo "deb_host_multiarch=$(DEB_HOST_MULTIARCH)" >> $(PKGPP_CONFIG_FILE) + cat debian/lua-c++.pc.in >> $(PKGPP_CONFIG_FILE) + mkdir -p $(LUA_MULTIARCH_INCLUDE) + cp src/$(LUA_MULTIARCH) $(LUA_MULTIARCH_INCLUDE) + dh_install + +override_dh_strip: + dh_strip --dbg-package=$(LIB_PACKAGE_NAME)-dbg diff -Nru lua5.1-5.1.5/debian/source/format lua5.1-5.1.5/debian/source/format --- lua5.1-5.1.5/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ lua5.1-5.1.5/debian/source/format 2012-12-04 12:12:13.129738963 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru lua5.1-5.1.5/src/luaconf.h lua5.1-5.1.5/src/luaconf.h --- lua5.1-5.1.5/src/luaconf.h 2012-12-04 03:52:47.000000000 +0000 +++ lua5.1-5.1.5/src/luaconf.h 2008-02-11 16:25:08.000000000 +0000 @@ -757,11 +757,6 @@ ** without modifying the main part of the file. */ -#undef LUA_COMPAT_VARARG -#undef LUA_COMPAT_MOD -#undef LUA_COMPAT_LSTR -#undef LUA_COMPAT_GFIND -#undef LUA_COMPAT_OPENLIB #endif