Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.3 2013/10/30 06:03:38 dholland Exp $
# $NetBSD: Makefile,v 1.7 2014/10/19 22:27:43 alnsn Exp $
DISTNAME= lua-sqlite3-0.4.1
PKGNAME= ${LUA_PKGPREFIX}-sqlite3-0.4.1
PKGREVISION= 1
PKGREVISION= 5
CATEGORIES= databases
MASTER_SITES= http://www.mroth.net/lua-sqlite3/
EXTRACT_SUFX= .tar.bz2
@@ -13,6 +13,16 @@ COMMENT= SQLite3 binding for LUA
LICENSE= mit
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --libdir=${PREFIX}/${LUA_CDIR}
CONFIGURE_ARGS+= --with-lua=${LUA_INTERPRETER:Q}
CFLAGS+= -fPIC
INSTALLATION_DIRS+= ${LUA_LDIR} ${LUA_CDIR}
post-install:
mv ${DESTDIR}${PREFIX}/${LUA_CDIR}/*.lua \
${DESTDIR}${PREFIX}/${LUA_LDIR}
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../lang/lua/module.mk"

View File

@@ -1,5 +1,5 @@
@comment $NetBSD: PLIST,v 1.1 2013/07/04 18:06:24 adam Exp $
lib/lua/libluasqlite3-loader.lua
lib/lua/libluasqlite3.so
lib/lua/luasql-sqlite3.lua
lib/lua/sqlite3.lua
@comment $NetBSD: PLIST,v 1.2 2014/05/03 13:01:24 alnsn Exp $
${LUA_CDIR}/libluasqlite3.so
${LUA_LDIR}/libluasqlite3-loader.lua
${LUA_LDIR}/luasql-sqlite3.lua
${LUA_LDIR}/sqlite3.lua

View File

@@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.1 2013/07/04 18:06:24 adam Exp $
$NetBSD: distinfo,v 1.2 2014/05/03 13:01:24 alnsn Exp $
SHA1 (lua-sqlite3-0.4.1.tar.bz2) = cdc1043c1c5a0d5456e5b5e9bfb23ad64644fb99
RMD160 (lua-sqlite3-0.4.1.tar.bz2) = ab502207f8cdaaf7749500b2f02cf7990da1f87c
Size (lua-sqlite3-0.4.1.tar.bz2) = 54780 bytes
SHA1 (patch-configure) = b0e6f7045da2be407b3babe8098aa4d2a87248d8
SHA1 (patch-Makefile.in) = 6a1482242354c6b1b5c935695fd49154312a9a5d
SHA1 (patch-configure) = a9950af9c314bf3bc2ab813d3cc7d8e6c410b4dd
SHA1 (patch-libluasqlite3.c) = 7eccef9ebdbc9e33b6bb52ce0b214a19786aa230

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-Makefile.in,v 1.1 2014/05/03 13:01:24 alnsn Exp $
--- Makefile.in.orig 2006-05-11 11:07:19.000000000 +0000
+++ Makefile.in
@@ -9,7 +9,7 @@ libdir := @libdir@
libexecdir := @libexecdir@
mandir := @mandir@
-luadir := @libdir@/lua
+luadir := @libdir@
install := install
install-data := $(install) -p -m 644
@@ -27,7 +27,6 @@ LIBS := @LIBS@
COMPILE = $(CC) -c $(CFLAGS) -o $@ $<
LINK = $(CC) $(LDFLAGS) -o $@ $+ $(LIBS)
-LINKSHARED = $(CC) -shared $(LDFLAGS) -o $@ $+ $(LIBS)
DESTDIR =
@@ -127,7 +126,7 @@ libluasqlite3.o: libluasqlite3.c
$(COMPILE)
libluasqlite3.so: libluasqlite3.o
- $(LINKSHARED)
+ $(CC) -shared $(LDFLAGS) libluasqlite3.o -o $@ $(LIBS)
libluasqlite3-loader.lua.install: libluasqlite3-loader.lua.in
m4 -DSHARED_LIB_PATH=$(luadir) \

View File

@@ -1,8 +1,8 @@
$NetBSD: patch-configure,v 1.1 2013/07/04 18:06:24 adam Exp $
$NetBSD: patch-configure,v 1.2 2014/05/03 13:01:24 alnsn Exp $
nm -D is not portable, but -llua is needed anyway.
--- configure.orig 2013-07-04 17:48:44.000000000 +0000
--- configure.orig 2006-05-11 11:23:29.000000000 +0000
+++ configure
@@ -3513,7 +3513,6 @@ fi
echo "$as_me:$LINENO: checking if we need -llua" >&5

View File

@@ -0,0 +1,122 @@
$NetBSD: patch-libluasqlite3.c,v 1.1 2014/05/03 13:01:24 alnsn Exp $
--- libluasqlite3.c.orig 2006-05-11 11:06:16.000000000 +0000
+++ libluasqlite3.c
@@ -302,10 +302,28 @@ static void report_error(lua_State * L,
#define checkint(L, narg) ( (int) checknumber((L), (narg)) )
#define checkdouble(L, narg) ( (double) checknumber((L), (narg)) )
+#if LUA_VERSION_NUM >= 502 /* Lua 5.2 */
+#define stringlen(L, narg) lua_rawlen(L, narg)
+#else
+#define stringlen(L, narg) lua_strlen(L, narg)
+#endif
+
+/*
+ * Quote from http://www.lua.org/manual/5.2/manual.html#8.3:
+ * luaL_typerror was removed. Write your own version if you need it.
+ */
+static int typerror(lua_State *L, int narg, const char *tname)
+{
+ const char *msg;
+
+ msg = lua_pushfstring(L, "%s expected, got %s", tname, luaL_typename(L, narg));
+ return luaL_argerror(L, narg, msg);
+}
+
static void * checkudata(lua_State * L, int narg)
{
if (!lua_isuserdata(L, narg))
- luaL_typerror(L, narg, "userdata");
+ typerror(L, narg, "userdata");
return lua_touserdata(L, narg);
}
@@ -330,7 +348,7 @@ static int checknilornoneorfunc(lua_Stat
return 0;
if (lua_isfunction(L, narg))
return 1;
- luaL_typerror(L, narg, "nil, none or function");
+ typerror(L, narg, "nil, none or function");
return 0; /* never reached, make compiler happy... */
}
@@ -348,14 +366,14 @@ FUNC( l_sqlite3_bind_null )
FUNC( l_sqlite3_bind_text )
{
- lua_pushnumber(L, sqlite3_bind_text(checkstmt_stmt(L, 1), checkint(L, 2), checkstr(L, 3), lua_strlen(L, 3), SQLITE_TRANSIENT) );
+ lua_pushnumber(L, sqlite3_bind_text(checkstmt_stmt(L, 1), checkint(L, 2), checkstr(L, 3), stringlen(L, 3), SQLITE_TRANSIENT) );
return 1;
}
FUNC( l_sqlite3_bind_blob )
{
- lua_pushnumber(L, sqlite3_bind_blob(checkstmt_stmt(L, 1), checkint(L, 2), checkstr(L, 3), lua_strlen(L, 3), SQLITE_TRANSIENT) );
+ lua_pushnumber(L, sqlite3_bind_blob(checkstmt_stmt(L, 1), checkint(L, 2), checkstr(L, 3), stringlen(L, 3), SQLITE_TRANSIENT) );
return 1;
}
@@ -420,7 +438,7 @@ FUNC( l_sqlite3_bind )
break;
case LUA_TSTRING:
- lua_pushnumber(L, sqlite3_bind_text(stmt, index, lua_tostring(L, 3), lua_strlen(L, 3), SQLITE_TRANSIENT) );
+ lua_pushnumber(L, sqlite3_bind_text(stmt, index, lua_tostring(L, 3), stringlen(L, 3), SQLITE_TRANSIENT) );
break;
default:
@@ -764,7 +782,7 @@ FUNC( l_sqlite3_prepare )
DB * db = checkdb(L, 1);
const char * sql = checkstr(L, 2);
- int sql_size = lua_strlen(L, 2);
+ int sql_size = stringlen(L, 2);
const char * leftover = 0;
sqlite3_stmt * sqlite3_stmt = 0;
int error, leftover_size;
@@ -898,7 +916,7 @@ static void func_callback_wrapper(int wh
if (lua_pcall(L, values ? 3 : 1, 0, 0))
{
fprintf(stderr, "libluasqlite3: func_callback_wrapper: Warning: user function error: %s\n", lua_tostring(L, -1));
- sqlite3_result_error(ctx, lua_tostring(L, -1), lua_strlen(L, -1));
+ sqlite3_result_error(ctx, lua_tostring(L, -1), stringlen(L, -1));
lua_pop(L, 1);
}
}
@@ -1077,7 +1095,7 @@ FUNC( l_sqlite3_result_null )
FUNC( l_sqlite3_result_error )
{
- sqlite3_result_error(checkcontext(L, 1), checkstr(L, 2), lua_strlen(L, 2));
+ sqlite3_result_error(checkcontext(L, 1), checkstr(L, 2), stringlen(L, 2));
return 0;
}
@@ -1111,14 +1129,14 @@ FUNC( l_sqlite3_result_number )
FUNC( l_sqlite3_result_blob )
{
- sqlite3_result_blob(checkcontext(L, 1), checkstr(L, 2), lua_strlen(L, 2), SQLITE_TRANSIENT);
+ sqlite3_result_blob(checkcontext(L, 1), checkstr(L, 2), stringlen(L, 2), SQLITE_TRANSIENT);
return 0;
}
FUNC( l_sqlite3_result_text )
{
- sqlite3_result_text(checkcontext(L, 1), checkstr(L, 2), lua_strlen(L, 2), SQLITE_TRANSIENT);
+ sqlite3_result_text(checkcontext(L, 1), checkstr(L, 2), stringlen(L, 2), SQLITE_TRANSIENT);
return 0;
}
@@ -1161,7 +1179,7 @@ FUNC( l_sqlite3_result )
break;
case LUA_TSTRING:
- sqlite3_result_text(context, lua_tostring(L, 2), lua_strlen(L, 2), SQLITE_TRANSIENT);
+ sqlite3_result_text(context, lua_tostring(L, 2), stringlen(L, 2), SQLITE_TRANSIENT);
break;
default: