From d6f10325943566e16a8aa2b9e7bbe4aacf0f889f Mon Sep 17 00:00:00 2001 From: Pedro Martelletto Date: Sun, 30 Jul 2006 04:51:39 +0000 Subject: [PATCH] Update to luasqlite3-0.4.1, okay sturm@ --- databases/luasqlite3/Makefile | 29 +++++++++-------- databases/luasqlite3/distinfo | 8 ++--- databases/luasqlite3/patches/patch-Makefile | 21 ------------ .../luasqlite3/patches/patch-Makefile_cfg | 25 --------------- .../luasqlite3/patches/patch-Makefile_in | 21 ++++++++++++ databases/luasqlite3/patches/patch-configure | 13 ++++++++ .../patches/patch-examples_aggregate_lua | 9 ++++++ .../patches/patch-examples_function_lua | 9 ++++++ .../patches/patch-examples_order_lua | 9 ++++++ .../patches/patch-examples_simple_lua | 9 ++++++ .../patches/patch-examples_smart_lua | 9 ++++++ .../patches/patch-examples_statement_lua | 9 ++++++ .../patches/patch-examples_tracing_lua | 8 +++++ .../luasqlite3/patches/patch-libluasqlite3_c | 32 +++++++++++++++++++ .../patches/patch-luasql-sqlite3_lua | 14 +++++--- .../luasqlite3/patches/patch-sqlite3_lua | 13 ++++---- databases/luasqlite3/pkg/PFRAG.shared | 5 +-- databases/luasqlite3/pkg/PLIST | 10 ++---- 18 files changed, 170 insertions(+), 83 deletions(-) delete mode 100644 databases/luasqlite3/patches/patch-Makefile delete mode 100644 databases/luasqlite3/patches/patch-Makefile_cfg create mode 100644 databases/luasqlite3/patches/patch-Makefile_in create mode 100644 databases/luasqlite3/patches/patch-configure create mode 100644 databases/luasqlite3/patches/patch-examples_aggregate_lua create mode 100644 databases/luasqlite3/patches/patch-examples_function_lua create mode 100644 databases/luasqlite3/patches/patch-examples_order_lua create mode 100644 databases/luasqlite3/patches/patch-examples_simple_lua create mode 100644 databases/luasqlite3/patches/patch-examples_smart_lua create mode 100644 databases/luasqlite3/patches/patch-examples_statement_lua create mode 100644 databases/luasqlite3/patches/patch-examples_tracing_lua create mode 100644 databases/luasqlite3/patches/patch-libluasqlite3_c diff --git a/databases/luasqlite3/Makefile b/databases/luasqlite3/Makefile index 31be848c2a..a9cc7e2efd 100644 --- a/databases/luasqlite3/Makefile +++ b/databases/luasqlite3/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2005/06/17 00:01:58 jolan Exp $ +# $OpenBSD: Makefile,v 1.3 2006/07/30 04:51:39 pedro Exp $ SHARED_ONLY= Yes COMMENT= "binding of sqlite3 for lua" -PKGNAME= luasqlite3-0.3 -DISTNAME= lua-sqlite3-0.3 +PKGNAME= luasqlite3-0.4.1 +DISTNAME= lua-sqlite3-0.4.1 CATEGORIES= databases lang/lua MASTER_SITES= ${HOMEPAGE} @@ -16,29 +16,32 @@ PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes USE_GMAKE= Yes +CONFIGURE_STYLE=gnu +CONFIGURE_ARGS+=--with-lua-dir=${PREFIX} +CFLAGS+= -fPIC -DPIC LIB_DEPENDS= sqlite3.8::databases/sqlite3 -BUILD_DEPENDS= ::lang/lua +BUILD_DEPENDS= :lua->=5.1:lang/lua RUN_DEPENDS= ${BUILD_DEPENDS} REGRESS_DEPENDS=::databases/luasqlite3 REGRESS_TARGET= check -post-extract: - @sed -e "s:@sqlite3path@:${PREFIX}/lua/luasqlite3/?.lua:g" \ - ${FILESDIR}/init.lua > ${WRKSRC}/init.lua - @perl -pi -e s,'^LUA_PATH.*',,g ${WRKSRC}/examples/*.lua +pre-install: + @rm -f ${WRKSRC}/examples/path.lua do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/lua/luasqlite3 + ${INSTALL_DATA_DIR} ${PREFIX}/share/lua/5.1 + ${INSTALL_DATA_DIR} ${PREFIX}/lib/lua/5.1/sqlite3 ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/luasqlite3 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/luasqlite3 - ${INSTALL_DATA} ${WRKSRC}/luasqlite3.so ${PREFIX}/lib - ${INSTALL_DATA} ${WRKSRC}/sqlite3.lua ${PREFIX}/lua/luasqlite3 - ${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/luasqlite3 + ${INSTALL_DATA} ${WRKSRC}/sqlite3.lua ${PREFIX}/share/lua/5.1 + ${INSTALL_DATA} ${WRKSRC}/libluasqlite3.so \ + ${PREFIX}/lib/lua/5.1/sqlite3/core.so ${INSTALL_DATA} ${WRKSRC}/documentation.html \ ${PREFIX}/share/doc/luasqlite3 - ${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/luasqlite3 + ${INSTALL_DATA} ${WRKSRC}/examples/*.lua \ + ${PREFIX}/share/examples/luasqlite3 .include diff --git a/databases/luasqlite3/distinfo b/databases/luasqlite3/distinfo index 1059be6df5..0bfbe8c819 100644 --- a/databases/luasqlite3/distinfo +++ b/databases/luasqlite3/distinfo @@ -1,4 +1,4 @@ -MD5 (lua-sqlite3-0.3.tar.gz) = cc059f848f1432ab4749bda03eff49ac -RMD160 (lua-sqlite3-0.3.tar.gz) = 8052acc2cc1ecbffed029b092b2f4e2a9c51c59b -SHA1 (lua-sqlite3-0.3.tar.gz) = 9a82084327a6dc77f7d52dca0f840aaa423dae11 -SIZE (lua-sqlite3-0.3.tar.gz) = 32243 +MD5 (lua-sqlite3-0.4.1.tar.gz) = 66db31f6f9744b1976f656b39d6949df +RMD160 (lua-sqlite3-0.4.1.tar.gz) = c63b6bdef5825792dd3a2ecd720217a4038f247e +SHA1 (lua-sqlite3-0.4.1.tar.gz) = e69ad345c60e7e73b150f08e05208bc69d90e3bd +SIZE (lua-sqlite3-0.4.1.tar.gz) = 62234 diff --git a/databases/luasqlite3/patches/patch-Makefile b/databases/luasqlite3/patches/patch-Makefile deleted file mode 100644 index 4ed4409d6f..0000000000 --- a/databases/luasqlite3/patches/patch-Makefile +++ /dev/null @@ -1,21 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.1.1.1 2005/04/27 04:33:53 jolan Exp $ ---- Makefile.orig Tue Apr 26 10:09:24 2005 -+++ Makefile Tue Apr 26 10:10:51 2005 -@@ -29,7 +29,7 @@ DEPS := Makefile Makefile.cfg - DESTDIR := - - --all: libluasqlite3.so libluasqlite3-loader.lua libluasqlite3-loader.lua.install -+all: luasqlite3.so # libluasqlite3-loader.lua libluasqlite3-loader.lua.install - - install: all - $(install-dirs) $(DESTDIR)$(luadir) -@@ -96,7 +96,7 @@ documentation.html: docs/doc.mrd - libluasqlite3.o: libluasqlite3.c $(DEPS) - $(COMPILE) $(LUA_CFLAGS) $(SQLITE3_CFLAGS) -o $@ $< - --libluasqlite3.so: libluasqlite3.o $(DEPS) -+luasqlite3.so: libluasqlite3.o $(DEPS) - $(LINKSHARED) $(LUA_LDFLAGS) $(SQLITE3_LDFLAGS) -o $@ $< $(LUA_LIBS) $(SQLITE3_LIBS) - - libluasqlite3-loader.lua.install: libluasqlite3-loader.lua.in $(DEPS) diff --git a/databases/luasqlite3/patches/patch-Makefile_cfg b/databases/luasqlite3/patches/patch-Makefile_cfg deleted file mode 100644 index c04268649b..0000000000 --- a/databases/luasqlite3/patches/patch-Makefile_cfg +++ /dev/null @@ -1,25 +0,0 @@ -$OpenBSD: patch-Makefile_cfg,v 1.1.1.1 2005/04/27 04:33:53 jolan Exp $ ---- Makefile.cfg.orig Thu Oct 7 14:25:27 2004 -+++ Makefile.cfg Tue Apr 26 16:09:19 2005 -@@ -1,5 +1,5 @@ - --prefix := /usr/local -+prefix := $(LOCALBASE) - - bindir := $(prefix)/bin - sbindir := $(prefix)/sbin -@@ -13,11 +13,11 @@ mandir := $(prefix)/man - - luadir := $(libdir)/lua - --CC := gcc -+CC := $(CC) - LD := $(CC) - --CFLAGS := -g -Wall -I$(includedir) --LDFLAGS := -L$(libdir) -Wl,-rpath,$(libdir) -+CFLAGS += -fPIC -I$(includedir) -+LDFLAGS := -L$(libdir) -fPIC -Wl,-rpath,$(libdir) - - COMPILE := $(CC) $(CFLAGS) -c - LINK := $(LD) $(LDFLAGS) diff --git a/databases/luasqlite3/patches/patch-Makefile_in b/databases/luasqlite3/patches/patch-Makefile_in new file mode 100644 index 0000000000..07e9b126aa --- /dev/null +++ b/databases/luasqlite3/patches/patch-Makefile_in @@ -0,0 +1,21 @@ +$OpenBSD: patch-Makefile_in,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- Makefile.in.orig Thu May 11 08:07:19 2006 ++++ Makefile.in Fri Jul 28 19:53:51 2006 +@@ -27,7 +27,7 @@ LIBS := @LIBS@ + + COMPILE = $(CC) -c $(CFLAGS) -o $@ $< + LINK = $(CC) $(LDFLAGS) -o $@ $+ $(LIBS) +-LINKSHARED = $(CC) -shared $(LDFLAGS) -o $@ $+ $(LIBS) ++LINKSHARED = $(CC) -shared -fPIC $(LDFLAGS) -o $@ $+ $(LIBS) + + DESTDIR = + +@@ -54,7 +54,7 @@ CLEAN_FILES := libluasqlite3.o libluasq + DESTDIR := + + +-all: libluasqlite3.so libluasqlite3-loader.lua libluasqlite3-loader.lua.install ++all: libluasqlite3.so + + install: all + $(install-dirs) $(DESTDIR)$(luadir) diff --git a/databases/luasqlite3/patches/patch-configure b/databases/luasqlite3/patches/patch-configure new file mode 100644 index 0000000000..7eec3eb563 --- /dev/null +++ b/databases/luasqlite3/patches/patch-configure @@ -0,0 +1,13 @@ +$OpenBSD: patch-configure,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- configure.orig Fri Jul 28 20:45:18 2006 ++++ configure Fri Jul 28 20:45:26 2006 +@@ -3512,8 +3512,7 @@ fi + + echo "$as_me:$LINENO: checking if we need -llua" >&5 + echo $ECHO_N "checking if we need -llua... $ECHO_C" >&6 +-need_llua=yes +-nm -D "$LUA" | $EGREP "T lua_open$" >/dev/null && need_llua=no ++need_llua=no + echo "$as_me:$LINENO: result: $need_llua" >&5 + echo "${ECHO_T}$need_llua" >&6 + if test $need_llua = yes; then diff --git a/databases/luasqlite3/patches/patch-examples_aggregate_lua b/databases/luasqlite3/patches/patch-examples_aggregate_lua new file mode 100644 index 0000000000..73fba1bb75 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_aggregate_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_aggregate_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/aggregate.lua.orig Fri Jul 28 21:58:46 2006 ++++ examples/aggregate.lua Fri Jul 28 21:59:30 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_function_lua b/databases/luasqlite3/patches/patch-examples_function_lua new file mode 100644 index 0000000000..7681158ea9 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_function_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_function_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/function.lua.orig Fri Jul 28 21:58:56 2006 ++++ examples/function.lua Fri Jul 28 21:59:32 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_order_lua b/databases/luasqlite3/patches/patch-examples_order_lua new file mode 100644 index 0000000000..c2cc24b330 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_order_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_order_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/order.lua.orig Fri Jul 28 21:58:59 2006 ++++ examples/order.lua Fri Jul 28 21:59:34 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_simple_lua b/databases/luasqlite3/patches/patch-examples_simple_lua new file mode 100644 index 0000000000..caee455051 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_simple_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_simple_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/simple.lua.orig Fri Jul 28 21:59:02 2006 ++++ examples/simple.lua Fri Jul 28 21:59:37 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_smart_lua b/databases/luasqlite3/patches/patch-examples_smart_lua new file mode 100644 index 0000000000..3586d73c34 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_smart_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_smart_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/smart.lua.orig Fri Jul 28 21:59:05 2006 ++++ examples/smart.lua Fri Jul 28 21:59:38 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_statement_lua b/databases/luasqlite3/patches/patch-examples_statement_lua new file mode 100644 index 0000000000..962d81a211 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_statement_lua @@ -0,0 +1,9 @@ +$OpenBSD: patch-examples_statement_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/statement.lua.orig Fri Jul 28 21:59:16 2006 ++++ examples/statement.lua Fri Jul 28 21:59:40 2006 +@@ -1,5 +1,4 @@ + +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-examples_tracing_lua b/databases/luasqlite3/patches/patch-examples_tracing_lua new file mode 100644 index 0000000000..69e646bb64 --- /dev/null +++ b/databases/luasqlite3/patches/patch-examples_tracing_lua @@ -0,0 +1,8 @@ +$OpenBSD: patch-examples_tracing_lua,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- examples/tracing.lua.orig Fri Jul 28 21:59:20 2006 ++++ examples/tracing.lua Fri Jul 28 21:59:43 2006 +@@ -1,4 +1,3 @@ +-require "path" + require "sqlite3" + + diff --git a/databases/luasqlite3/patches/patch-libluasqlite3_c b/databases/luasqlite3/patches/patch-libluasqlite3_c new file mode 100644 index 0000000000..5ed46c1724 --- /dev/null +++ b/databases/luasqlite3/patches/patch-libluasqlite3_c @@ -0,0 +1,32 @@ +$OpenBSD: patch-libluasqlite3_c,v 1.1 2006/07/30 04:51:39 pedro Exp $ +--- libluasqlite3.c.orig Thu May 11 08:06:16 2006 ++++ libluasqlite3.c Fri Jul 28 21:48:41 2006 +@@ -1627,15 +1627,25 @@ d_entry auth_entries[] = { + + + +-int luaopen_sqlite3(lua_State * L) ++ ++FUNC( init_api_entries ) + { + f(L, api_entries); + d(L, error_entries); + d(L, type_entries); + d(L, auth_entries); +- +- return 4; /* api, error codes, type codes, auth requests */ ++ ++ return 4; /* four objects placed on stack */ + } + ++f_entry init_entries[] = { ++ { "init", init_api_entries }, ++ { 0, 0 } ++}; + ++int luaopen_sqlite3_core(lua_State * L) ++{ ++ f(L, init_entries); + ++ return 1; /* one object placed on stack */ ++} diff --git a/databases/luasqlite3/patches/patch-luasql-sqlite3_lua b/databases/luasqlite3/patches/patch-luasql-sqlite3_lua index 52d2241f65..c2de1838ff 100644 --- a/databases/luasqlite3/patches/patch-luasql-sqlite3_lua +++ b/databases/luasqlite3/patches/patch-luasql-sqlite3_lua @@ -1,12 +1,16 @@ -$OpenBSD: patch-luasql-sqlite3_lua,v 1.1.1.1 2005/04/27 04:33:53 jolan Exp $ ---- luasql-sqlite3.lua.orig Mon Oct 4 11:06:02 2004 -+++ luasql-sqlite3.lua Tue Apr 26 16:02:07 2005 -@@ -58,7 +58,7 @@ local function isref(t) return t.ref_co +$OpenBSD: patch-luasql-sqlite3_lua,v 1.2 2006/07/30 04:51:39 pedro Exp $ +--- luasql-sqlite3.lua.orig Thu Jun 2 15:43:29 2005 ++++ luasql-sqlite3.lua Sat Jul 29 17:46:49 2006 +@@ -57,8 +57,11 @@ local function isref(t) return t.ref_co + function luasql.sqlite3() ++ local f = assert(package.loadlib("./libluasqlite3.so", ++ "luaopen_sqlite3_core")) ++ f = f() if not api then - api, ERR, TYPE, AUTH = load_libluasqlite3() -+ api, ERR, TYPE, AUTH = loadlib("luasqlite3.so", "luaopen_sqlite3")() ++ api, ERR, TYPE, AUTH = f.init() end local env = setmetatable( {}, env_class_mt ) diff --git a/databases/luasqlite3/patches/patch-sqlite3_lua b/databases/luasqlite3/patches/patch-sqlite3_lua index 8f21dba554..5540dcce1e 100644 --- a/databases/luasqlite3/patches/patch-sqlite3_lua +++ b/databases/luasqlite3/patches/patch-sqlite3_lua @@ -1,15 +1,16 @@ -$OpenBSD: patch-sqlite3_lua,v 1.2 2005/06/17 00:01:58 jolan Exp $ ---- sqlite3.lua.orig Wed Jun 15 16:33:54 2005 -+++ sqlite3.lua Thu Jun 16 12:08:07 2005 -@@ -44,9 +44,8 @@ TODO: +$OpenBSD: patch-sqlite3_lua,v 1.3 2006/07/30 04:51:39 pedro Exp $ +--- sqlite3.lua.orig Wed Sep 14 20:22:59 2005 ++++ sqlite3.lua Fri Jul 28 21:51:06 2006 +@@ -44,9 +44,9 @@ TODO: -require "libluasqlite3-loader" - -local api, ERR, TYPE, AUTH = load_libluasqlite3() -+local api, ERR, TYPE, AUTH = -+ assert(loadlib("luasqlite3.so", "luaopen_sqlite3"))() ++local f = assert(require("sqlite3.core")) ++local api, ERR, TYPE, AUTH = f.init() ++f = nil local db_class = { } local stmt_class = { } diff --git a/databases/luasqlite3/pkg/PFRAG.shared b/databases/luasqlite3/pkg/PFRAG.shared index d52986ccc6..64cde4f3c9 100644 --- a/databases/luasqlite3/pkg/PFRAG.shared +++ b/databases/luasqlite3/pkg/PFRAG.shared @@ -1,2 +1,3 @@ -@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2005/04/27 04:33:53 jolan Exp $ -lib/luasqlite3.so +@comment $OpenBSD: PFRAG.shared,v 1.2 2006/07/30 04:51:39 pedro Exp $ +lib/lua/5.1/sqlite3/ +lib/lua/5.1/sqlite3/core.so diff --git a/databases/luasqlite3/pkg/PLIST b/databases/luasqlite3/pkg/PLIST index 88bf2a06e0..1e9ba6c5b2 100644 --- a/databases/luasqlite3/pkg/PLIST +++ b/databases/luasqlite3/pkg/PLIST @@ -1,11 +1,5 @@ -@comment $OpenBSD: PLIST,v 1.1.1.1 2005/04/27 04:33:53 jolan Exp $ -@unexec lua ${SYSCONFDIR}/lua/luapkg.lua del luasqlite3 -@exec lua ${SYSCONFDIR}/lua/luapkg.lua add luasqlite3 ${PREFIX}/lua/luasqlite3/init.lua +@comment $OpenBSD: PLIST,v 1.2 2006/07/30 04:51:39 pedro Exp $ %%SHARED%% -lua/ -lua/luasqlite3/ -lua/luasqlite3/init.lua -lua/luasqlite3/sqlite3.lua share/doc/luasqlite3/ share/doc/luasqlite3/documentation.html share/examples/luasqlite3/ @@ -13,5 +7,7 @@ share/examples/luasqlite3/aggregate.lua share/examples/luasqlite3/function.lua share/examples/luasqlite3/order.lua share/examples/luasqlite3/simple.lua +share/examples/luasqlite3/smart.lua share/examples/luasqlite3/statement.lua share/examples/luasqlite3/tracing.lua +share/lua/5.1/sqlite3.lua