From 6047506c809283c5f840f4b0c462d1d77a84052e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 22 Mar 2018 16:07:08 +0000 Subject: main/lua-sql: rebuild against mariadb-connector-c --- main/lua-sql/APKBUILD | 10 ++++++---- main/lua-sql/luasql-mariadb.patch | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 main/lua-sql/luasql-mariadb.patch (limited to 'main') diff --git a/main/lua-sql/APKBUILD b/main/lua-sql/APKBUILD index 2b6a7d8d54..64e059371e 100644 --- a/main/lua-sql/APKBUILD +++ b/main/lua-sql/APKBUILD @@ -6,12 +6,12 @@ _drivers="mysql postgres sqlite3 odbc" pkgname=lua-sql _pkgname=luasql pkgver=2.3.5 -pkgrel=1 +pkgrel=2 pkgdesc="Lua SQL drivers" url="http://keplerproject.github.io/luasql/doc/us/" arch="all" license="MIT" -makedepends="mariadb-dev postgresql-dev sqlite-dev unixodbc-dev" +makedepends="mariadb-connector-c-dev postgresql-dev sqlite-dev unixodbc-dev" subpackages="" for _v in $_luaversions; do makedepends="$makedepends lua$_v-dev" @@ -23,7 +23,8 @@ for _d in $_drivers; do subpackages="$subpackages lua-sql-$_d:_meta_subpackage" done -source="$_pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$pkgver.tar.gz" +source="$_pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$pkgver.tar.gz + luasql-mariadb.patch" builddir="$srcdir/$_pkgname-$pkgver" prepare() { @@ -92,4 +93,5 @@ _subpackage() { echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } -sha512sums="28e25998366a2517cdd37933f0f00e0bb4b06bd9b6731209361777d6b755d62d763168dc78177cab5dfeee667deea04ff775912fb148ed145d64cea5407df4e7 luasql-2.3.5.tar.gz" +sha512sums="28e25998366a2517cdd37933f0f00e0bb4b06bd9b6731209361777d6b755d62d763168dc78177cab5dfeee667deea04ff775912fb148ed145d64cea5407df4e7 luasql-2.3.5.tar.gz +1c587dd5f8964079e8836a951eaf6f40fdd9482ee08c022e9f51af8b3630b01e404f836689ba35cb9a8e6eb25578fb3d444c89975192509822a62f9d514a6b0e luasql-mariadb.patch" diff --git a/main/lua-sql/luasql-mariadb.patch b/main/lua-sql/luasql-mariadb.patch new file mode 100644 index 0000000000..4237f6f94c --- /dev/null +++ b/main/lua-sql/luasql-mariadb.patch @@ -0,0 +1,28 @@ +From 6df3f672313f8dbca219199c8ec8d20c0247347f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1s=20Guisasola?= +Date: Mon, 31 Jul 2017 09:41:49 -0300 +Subject: [PATCH] Add support for building with MariaDB (thanks to Florian + Weimer). + +--- + src/ls_mysql.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/ls_mysql.c b/src/ls_mysql.c +index f80fae4..843153b 100644 +--- a/src/ls_mysql.c ++++ b/src/ls_mysql.c +@@ -603,7 +603,12 @@ LUASQL_API int luaopen_luasql_mysql (lua_State *L) { + luaL_setfuncs(L, driver, 0); + luasql_set_info (L); + lua_pushliteral (L, "_CLIENTVERSION"); +- lua_pushliteral (L, MYSQL_SERVER_VERSION); ++#ifdef MARIADB_CLIENT_VERSION_STR ++lua_pushliteral (L, MARIADB_CLIENT_VERSION_STR); ++#else ++lua_pushliteral (L, MYSQL_SERVER_VERSION); ++#endif ++ /*lua_pushliteral (L, MYSQL_SERVER_VERSION);*/ + lua_settable (L, -3); + return 1; + } -- cgit v1.2.3