diff options
Diffstat (limited to 'main/lua-sql')
-rw-r--r-- | main/lua-sql/APKBUILD | 16 | ||||
-rw-r--r-- | main/lua-sql/sqlite_v2_api.patch | 26 | ||||
-rw-r--r-- | main/lua-sql/widechars.patch | 10 |
3 files changed, 37 insertions, 15 deletions
diff --git a/main/lua-sql/APKBUILD b/main/lua-sql/APKBUILD index 45eda19d03..bf54770fac 100644 --- a/main/lua-sql/APKBUILD +++ b/main/lua-sql/APKBUILD @@ -4,7 +4,7 @@ _drivers="mysql postgres sqlite3 odbc" pkgname=lua-sql pkgver=2.3.0 -pkgrel=0 +pkgrel=1 pkgdesc="Lua SQL drivers" url="http://www.keplerproject.org/luasql/" arch="all" @@ -24,11 +24,17 @@ for _j in $_drivers; do done source="luasql-$pkgver.tar.gz::https://github.com/keplerproject/luasql/archive/v$pkgver.tar.gz - widechars.patch" + sqlite_v2_api.patch" _sdir="$srcdir"/luasql-$pkgver prepare() { cd "$_sdir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + # apply patches here # The config has DRIVER_INCS but it seems like its not respected @@ -108,8 +114,8 @@ for _j in $_drivers; do done md5sums="af9f0f3a2313a1fcf88c40700092048d luasql-2.3.0.tar.gz -a706dfeb8cdfcca209b90755e8104545 widechars.patch" +656699a57b5529aa9594f0fe6bad1dd4 sqlite_v2_api.patch" sha256sums="e173ff7b17a2757951b4b2f67d3b1bfe04caad7185b68cffa7758ce822e25e9f luasql-2.3.0.tar.gz -89aed953834f9b6ed9998baac8454d7761f317d61513b532c17d0262c401a446 widechars.patch" +74fb0ad9161346a29dc133508b5b444084a46d792a9a4e987766fc3989dd0435 sqlite_v2_api.patch" sha512sums="62309cf6241ffab1ed32e718536a5c986168a7bb6fcf2cf55e884db5043d5ec473bbbb7c93b399dfc0a19f282e850f742452583ad0d973661a7f672b0f8da2d5 luasql-2.3.0.tar.gz -b31fa46b99d06d6069c03679b7cef08412eee6d5e4606b02e02b98cb97e03c0b884d65390c1e80cf5a36fa41b3afba9cbbc441284ec3a1e725e3de7bc824908e widechars.patch" +7ea3eb63d4e121875033dd8b7a027eb8fd7784831f9999c880a22d64cf8d50a9ef2cde804b86b416d39262e1f7185054bac1e7fb4fb560320c0a53cce52f80cc sqlite_v2_api.patch" diff --git a/main/lua-sql/sqlite_v2_api.patch b/main/lua-sql/sqlite_v2_api.patch new file mode 100644 index 0000000000..498c699e27 --- /dev/null +++ b/main/lua-sql/sqlite_v2_api.patch @@ -0,0 +1,26 @@ +--- a/src/ls_sqlite3.c ++++ b/src/ls_sqlite3.c +@@ -382,7 +382,11 @@ static int conn_execute(lua_State *L) + int numcols; + const char *tail; + ++#if SQLITE_VERSION_NUMBER > 3006013 ++ res = sqlite3_prepare_v2(conn->sql_conn, statement, -1, &vm, &tail); ++#else + res = sqlite3_prepare(conn->sql_conn, statement, -1, &vm, &tail); ++#endif + if (res != SQLITE_OK) + { + errmsg = sqlite3_errmsg(conn->sql_conn); + @@ -544,7 +548,11 @@ static int env_connect(lua_State *L) + + sourcename = luaL_checkstring(L, 2); + ++#if SQLITE_VERSION_NUMBER > 3006013 ++ res = sqlite3_open_v2(sourcename, &conn, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); ++#else + res = sqlite3_open(sourcename, &conn); ++#endif + if (res != SQLITE_OK) + { + errmsg = sqlite3_errmsg(conn); diff --git a/main/lua-sql/widechars.patch b/main/lua-sql/widechars.patch deleted file mode 100644 index 784793348d..0000000000 --- a/main/lua-sql/widechars.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/ls_odbc.c -+++ b/src/ls_odbc.c -@@ -150,6 +150,7 @@ - case SQL_TYPE_DATE: case SQL_TYPE_TIME: case SQL_TYPE_TIMESTAMP: - case SQL_DATE: case SQL_INTERVAL: case SQL_TIMESTAMP: - case SQL_LONGVARCHAR: -+ case SQL_WCHAR: case SQL_WVARCHAR: case SQL_WLONGVARCHAR: - return "string"; - case SQL_BIGINT: case SQL_TINYINT: case SQL_NUMERIC: - case SQL_DECIMAL: case SQL_INTEGER: case SQL_SMALLINT: |