diff --git a/databases/Makefile b/databases/Makefile index 44e640449d08..867d64867d7e 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -165,6 +165,7 @@ SUBDIR += linux-oracle-instantclient-sqlplus SUBDIR += liquibase SUBDIR += lmdb + SUBDIR += lua-lsqlite3 SUBDIR += lua-resty-redis SUBDIR += lua-xapian SUBDIR += luadbi diff --git a/databases/lua-lsqlite3/Makefile b/databases/lua-lsqlite3/Makefile new file mode 100644 index 000000000000..ff34a3aef532 --- /dev/null +++ b/databases/lua-lsqlite3/Makefile @@ -0,0 +1,64 @@ +# Created by: Yarema +# $FreeBSD$ + +PORTNAME= lsqlite3 +PORTVERSION= 0.9.5 +CATEGORIES= databases +MASTER_SITES= http://Lua.SQLite.org/index.cgi/zip/ +PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME}_fsl_9y + +MAINTAINER= yds@Necessitu.de +COMMENT= LuaSQLite3 - a Lua 5.1 to 5.3 wrapper for the SQLite3 library + +LICENSE= MIT + +BUILD_DEPENDS= ${NONEXISTENT}:databases/sqlite3:patch + +USES= localbase:ldflags sqlite:3 zip + +OPTIONS_DEFINE= DOCS EXAMPLES +OPTIONS_SINGLE= LUA_VERSION +OPTIONS_SINGLE_LUA_VERSION= LUA51 LUA52 LUA53 +OPTIONS_DEFAULT= LUA51 + +LUA51_USES= lua:51 +LUA52_USES= lua:52 +LUA53_USES= lua:53 + +CFLAGS+= -pedantic -Wall -Qunused-arguments -fPIC -DPIC\ + -std=c99 -fno-strict-aliasing -I${LUA_INCDIR}\ + -DLSQLITE_VERSION=\"${PORTVERSION}\" +LDFLAGS+= -shared -pthread -lm -L${LOCALBASE}/lib + +DOCSDIR= ${PREFIX}/share/doc/lua${LUA_VER_STR}/${PORTNAME} +EXAMPLESDIR= ${PREFIX}/share/examples/lua${LUA_VER_STR}/${PORTNAME} + +pre-configure: + @${CP} -p `${MAKE} -V WRKSRC -C ${PORTSDIR}/databases/sqlite3`/sqlite3.[ch] ${WRKSRC} + +do-build: + cd ${WRKSRC} &&\ + ${CC} ${CFLAGS} ${LDFLAGS} -lsqlite3\ + -o ${PORTNAME}.so ${PORTNAME}.c + cd ${WRKSRC} &&\ + ${CC} ${CFLAGS} ${LDFLAGS}\ + -I. -Dluaopen_lsqlite3=luaopen_lsqlite3complete\ + -o ${PORTNAME}complete.so ${PORTNAME}.c sqlite3.c + +do-install: + @${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR} + ${INSTALL_LIB} ${WRKSRC}/${PORTNAME}.so ${STAGEDIR}${LUA_MODLIBDIR} + ${INSTALL_LIB} ${WRKSRC}/${PORTNAME}complete.so ${STAGEDIR}${LUA_MODLIBDIR} + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/${PORTNAME}.wiki ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/HISTORY ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/*.lua ${STAGEDIR}${EXAMPLESDIR} + +.include diff --git a/databases/lua-lsqlite3/distinfo b/databases/lua-lsqlite3/distinfo new file mode 100644 index 000000000000..67976470547a --- /dev/null +++ b/databases/lua-lsqlite3/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1553623319 +SHA256 (lsqlite3_fsl_9y.zip) = ad81bf0d081b8200932c851e19b2a0a6319bc7b6e3401deeb9c29e5d041e6540 +SIZE (lsqlite3_fsl_9y.zip) = 2123295 diff --git a/databases/lua-lsqlite3/pkg-descr b/databases/lua-lsqlite3/pkg-descr new file mode 100644 index 000000000000..560e3abc76f1 --- /dev/null +++ b/databases/lua-lsqlite3/pkg-descr @@ -0,0 +1,14 @@ +LuaSQLite3 is a thin wrapper around the public domain SQLite3 +database engine. + +LuaSQLite3 provides a means to manipulate SQLite3 databases +directly from Lua using Lua 5. + +There are two modules, identical except that one links SQLite3 +dynamically, the other statically. + +The module `lsqlite3` links SQLite3 dynamically. + +The module `lsqlite3complete` links SQLite3 statically. + +WWW: http://Lua.SQLite.org/index.cgi/doc/tip/doc/lsqlite3.wiki diff --git a/databases/lua-lsqlite3/pkg-plist b/databases/lua-lsqlite3/pkg-plist new file mode 100644 index 000000000000..e45dddce5ede --- /dev/null +++ b/databases/lua-lsqlite3/pkg-plist @@ -0,0 +1,14 @@ +%%LUA_MODLIBDIR%%/lsqlite3.so +%%LUA_MODLIBDIR%%/lsqlite3complete.so +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/HISTORY +%%PORTDOCS%%%%DOCSDIR%%/lsqlite3.wiki +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/aggregate.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/function.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/hooks_advanced.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/order.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/simple.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/smart.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/statement.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tracing.lua +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/update_hook.lua