diff options
Diffstat (limited to 'dev-lua/luadbi')
-rw-r--r-- | dev-lua/luadbi/Manifest | 7 | ||||
-rw-r--r-- | dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type.patch | 163 | ||||
-rw-r--r-- | dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type2.patch | 29 | ||||
-rw-r--r-- | dev-lua/luadbi/files/luadbi-0.7.2-mysql-8.patch | 55 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.7.2-r2.ebuild | 107 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.7.3.ebuild | 2 |
6 files changed, 2 insertions, 361 deletions
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest index 5e1235744bd4..e4f7b9b73e40 100644 --- a/dev-lua/luadbi/Manifest +++ b/dev-lua/luadbi/Manifest @@ -1,8 +1,3 @@ -AUX luadbi-0.7.2-incompatible-pointer-type.patch 4723 BLAKE2B 0d71eeb95b87e8dc7ed082de3e66b69bf1dc758e02fa066ee50c2d803910512d591a209623617b5b50647905b6cda40066e02c00f031ea7a390cef176e0f094d SHA512 54aa115a2d3c1b9165c20340f1a9ed8a9043336c36a2a1a84bc971c14a7d290809c9634dc846e9774ef1fda6ad970f9704632fc346652190bc21bf533d27a516 -AUX luadbi-0.7.2-incompatible-pointer-type2.patch 738 BLAKE2B d05969aa6b14b252b93d24f8e5426867094d331bf4303eeb34f9bef9a78ec2ebdec71c4ae52f08191f1cd87e0026548cef56f1c39334b6b3bac08f5546babc9a SHA512 68de22724615e687af85d699dc4e0cfde9d715fc2e9829598d90925d29884f80420fbeab283c269fdcc54f3c1fe62cf3dadd2dbfde49df24312ef01ca24b2596 -AUX luadbi-0.7.2-mysql-8.patch 1920 BLAKE2B 5b8f65c9a6966df0bd18487e09effc073fb4ce9ed7913e1b9397ae722a2fe8cc04bcd8f5dce403fc5181fef8f95bdf71bffd00cb5b99932c6cf48e00daa49175 SHA512 436aa613eb420126f158103bc7c36cb3cc2a680c76d32e6239c2b310b7367bd5275c85640645d904ffee059b970095e8176df23dbca8b54aa13f436a619e2f6f -DIST luadbi-0.7.2.tar.gz 36462 BLAKE2B 581c7353bfa36b3f6cabed2df78372f8810300bf4525bf8d370e61d469f9daa5a5c40c58916164a8d0a621a61e983e85c67b23ef03f51212be79f09ad8512047 SHA512 891f99cbc8f1b5327ef820641a1608abf41410f2f28584b975cc3cf65154b9bebf6f1b9ca7d1818b9c965738ad700dd17ae042dfd2a7146cf755871ebae535b9 DIST luadbi-0.7.3.tar.gz 35753 BLAKE2B ff5fdd144560153fc74733131b48a60a14b7e95de5d6faaa982588cc5df28aa979aa805c5000fdc76fae98b99be4cc4ccb82938c8f6222bcdfe4fca4d12c9bfa SHA512 1122bc9e83cf7071aff8685163a2dc387b40d2fb28aeb57e9c19e14afa6dcb0fb05fa76ea700f69751fdc79b0f1155235195d525041124fed5cefab0d50835bb -EBUILD luadbi-0.7.2-r2.ebuild 2089 BLAKE2B 4ee61305c6011d5abd02575b6d83f13b66355e6fa28cc6e1e430aff9fd93d6138c121e1e4ab29291d798858adc6ebe1a9726fd83c4d460e0f3c900f6046c4418 SHA512 67bef07f554c91303587f74cd8d86c40e7dce73b0510e01707304dd00de87c77fbaf3d9006726583a7f751c818b67d35243259473fdb565b20aaf32f20a93d69 -EBUILD luadbi-0.7.3.ebuild 1916 BLAKE2B 39c8e22a61618186dad46ca405becfa097d2c7cbcf2a2def55cd078124f102f080adb44f78bdcdc15264c085432022450c1bc72b1bec4f9d3732ae73710342e5 SHA512 d956b07522c6413ff85c6a74035de00ce72d3e47d8d4a204cee1d084866f69814e9bba5bb283047b5fde7697211ff0e251e790f1a454be20c259b137e42e086e +EBUILD luadbi-0.7.3.ebuild 1910 BLAKE2B e388e2fb61d89497cf760b3cd9308215739878e7009f94532052ff54e4582f12f625a1bdba83d2357d634fd4aef3ef8f5679a26e5fc8f04ba5626b604e21be13 SHA512 f046b595d1e59d8ae0381c94f04c4012e509c4236034b2fceb44c8f3ad039cb7531f195039d87a031158cb8905a350725b8662224592b530f2ef39314ca8444b MISC metadata.xml 329 BLAKE2B 63f2efc683cb8c68fc27953c6003708f965328cc4b445e5b62c1cffc85e79c9971ef4bfca6ae6b7a95179c3ad13e9374a2d0f1e06518403902a461d7598ade72 SHA512 c1f454ba961c109a06e0a06e85ad426dc6d6cc5697e6c2ceda3fe003242c1d50ef5c71fa0a84201d0a20b7d22bdf1ab597ff780b681a3a32e08c14457f7a2081 diff --git a/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type.patch b/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type.patch deleted file mode 100644 index dfe3db4b030d..000000000000 --- a/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type.patch +++ /dev/null @@ -1,163 +0,0 @@ -From 7f9c10e753325e3cc00d4955bf9d6a77a896bdcb Mon Sep 17 00:00:00 2001 -From: Matthew Wild <mwild1@gmail.com> -Date: Thu, 5 Sep 2019 14:25:20 +0100 -Subject: [PATCH 1/3] MySQL: Don't set (unused) field is_null to nonsense - value, fixes #56 - ---- - dbd/mysql/statement.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/dbd/mysql/statement.c b/dbd/mysql/statement.c -index aca865a..dd01c1e 100644 ---- a/dbd/mysql/statement.c -+++ b/dbd/mysql/statement.c -@@ -218,7 +218,6 @@ static int statement_execute(lua_State *L) { - switch(type) { - case LUA_TNIL: - bind[i].buffer_type = MYSQL_TYPE_NULL; -- bind[i].is_null = (int*)1; - break; - - case LUA_TBOOLEAN: - -From 83954fe0ba8c83fbe9351937e0d30b9c842dadb1 Mon Sep 17 00:00:00 2001 -From: Matthew Wild <mwild1@gmail.com> -Date: Thu, 5 Sep 2019 14:26:04 +0100 -Subject: [PATCH 2/3] Add test for handling of NULL values - ---- - tests/run_tests.lua | 48 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -diff --git a/tests/run_tests.lua b/tests/run_tests.lua -index 0dd9f72..80526b6 100755 ---- a/tests/run_tests.lua -+++ b/tests/run_tests.lua -@@ -301,6 +301,51 @@ local function test_insert_multi() - - end - -+local function test_insert_null() -+ -+ local sth, sth2, err, success -+ local stringy = os.date() -+ -+ -+ sth, err = dbh:prepare(code('insert')) -+ -+ assert.is_nil(err) -+ assert.is_not_nil(sth) -+ -+ success, err = sth:execute(nil) -+ -+ assert.is_true(success) -+ assert.is_nil(err) -+ -+ assert.is_equal(1, sth:affected()) -+ -+ -- -+ -- Grab it back, make sure it's all good -+ -- -+ -+ local id = dbh:last_id() -+ assert.is_not_nil(id) -+ sth:close() -+ -+ sth2, err = dbh:prepare(code('insert_select')) -+ -+ assert.is_nil(err) -+ assert.is_not_nil(sth) -+ -+ success, err = sth2:execute(id) -+ -+ assert.is_true(success) -+ assert.is_nil(err) -+ -+ local row = sth2:rows(false)() -+ assert.is_not_nil(row) -+ assert.are_equal(id, row[1]) -+ assert.is_nil(row[2]) -+ -+ sth:close() -+ sth2:close() -+ -+end - - local function test_insert_returning() - -@@ -494,6 +539,7 @@ describe("PostgreSQL #psql", function() - it( "Tests a simple select", test_select ) - it( "Tests multi-row selects", test_select_multi ) - it( "Tests inserts", test_insert_returning ) -+ it( "Tests inserts of NULL", test_insert_null ) - it( "Tests statement reuse", test_insert_multi ) - it( "Tests no insert_id", test_no_insert_id ) - it( "Tests affected rows", test_update ) -@@ -514,6 +560,7 @@ describe("SQLite3 #sqlite3", function() - it( "Tests simple selects", test_select ) - it( "Tests multi-row selects", test_select_multi ) - it( "Tests inserts", test_insert ) -+ it( "Tests inserts of NULL", test_insert_null ) - it( "Tests statement reuse", test_insert_multi ) - it( "Tests no rowcount", test_no_rowcount ) - it( "Tests affected rows", test_update ) -@@ -534,6 +581,7 @@ describe("MySQL #mysql", function() - it( "Tests simple selects", test_select ) - it( "Tests multi-row selects", test_select_multi ) - it( "Tests inserts", test_insert ) -+ it( "Tests inserts of NULL", test_insert_null ) - it( "Tests statement reuse", test_insert_multi ) - it( "Tests affected rows", test_update ) - it( "Tests closing dbh doesn't segfault", test_db_close_doesnt_segfault ) - -From 4555eb0a63945e829ffba635cac87b9e22155ffc Mon Sep 17 00:00:00 2001 -From: Matthew Wild <mwild1@gmail.com> -Date: Thu, 5 Sep 2019 14:35:52 +0100 -Subject: [PATCH 3/3] tests/schemas: allow null inserts for testing - ---- - tests/schemas/mysql.sql | 2 +- - tests/schemas/postgresql.sql | 2 +- - tests/schemas/sqlite3.sql | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/schemas/mysql.sql b/tests/schemas/mysql.sql -index 1134e64..2948075 100644 ---- a/tests/schemas/mysql.sql -+++ b/tests/schemas/mysql.sql -@@ -46,7 +46,7 @@ drop table if exists insert_tests; - create table insert_tests - ( - id int not null primary key auto_increment, -- val varchar(255) not null -+ val varchar(255) - ); - - grant insert, select on insert_tests to 'luadbi'@'%'; -diff --git a/tests/schemas/postgresql.sql b/tests/schemas/postgresql.sql -index f430516..efe23f3 100644 ---- a/tests/schemas/postgresql.sql -+++ b/tests/schemas/postgresql.sql -@@ -47,7 +47,7 @@ drop table if exists insert_tests cascade; - create table insert_tests - ( - id serial primary key, -- val varchar(255) not null -+ val varchar(255) - ); - - grant insert, select on insert_tests to luadbi; -diff --git a/tests/schemas/sqlite3.sql b/tests/schemas/sqlite3.sql -index d3ba4bc..3bf0eb0 100644 ---- a/tests/schemas/sqlite3.sql -+++ b/tests/schemas/sqlite3.sql -@@ -44,7 +44,7 @@ drop table if exists insert_tests; - create table insert_tests - ( - id integer primary key, -- val varchar(255) not null -+ val varchar(255) - ); - - drop table if exists update_tests; diff --git a/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type2.patch b/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type2.patch deleted file mode 100644 index 22a6e7c7e881..000000000000 --- a/dev-lua/luadbi/files/luadbi-0.7.2-incompatible-pointer-type2.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/dbd/mysql/statement.c -+++ b/dbd/mysql/statement.c -@@ -226,7 +226,7 @@ - *boolean = lua_toboolean(L, p); - - bind[i].buffer_type = MYSQL_TYPE_LONG; -- bind[i].is_null = (int*)0; -+ bind[i].is_null = false; - bind[i].buffer = (char *)boolean; - bind[i].length = 0; - break; -@@ -241,7 +241,7 @@ - *num = lua_tonumber(L, p); - - bind[i].buffer_type = MYSQL_TYPE_DOUBLE; -- bind[i].is_null = (int*)0; -+ bind[i].is_null = false; - bind[i].buffer = (char *)num; - bind[i].length = 0; - break; -@@ -252,7 +252,7 @@ - str = lua_tolstring(L, p, str_len); - - bind[i].buffer_type = MYSQL_TYPE_STRING; -- bind[i].is_null = (int*)0; -+ bind[i].is_null = false; - bind[i].buffer = (char *)str; - bind[i].length = str_len; - break; diff --git a/dev-lua/luadbi/files/luadbi-0.7.2-mysql-8.patch b/dev-lua/luadbi/files/luadbi-0.7.2-mysql-8.patch deleted file mode 100644 index ef463433357e..000000000000 --- a/dev-lua/luadbi/files/luadbi-0.7.2-mysql-8.patch +++ /dev/null @@ -1,55 +0,0 @@ -From b72503cad0654878841172451b2ea860a59e30c1 Mon Sep 17 00:00:00 2001 -From: Conrad Kostecki <conrad@kostecki.com> -Date: Tue, 13 Oct 2020 07:34:16 +0200 -Subject: [PATCH] dbd/mysql/statement.c: fix compilation with mysql-8 - -Signed-off-by: Conrad Kostecki <conrad@kostecki.com> ---- - dbd/mysql/dbd_mysql.h | 2 +- - dbd/mysql/statement.c | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/dbd/mysql/dbd_mysql.h b/dbd/mysql/dbd_mysql.h -index 233bc35..4777289 100644 ---- a/dbd/mysql/dbd_mysql.h -+++ b/dbd/mysql/dbd_mysql.h -@@ -3,7 +3,7 @@ - #endif - - --#include <mysql.h> -+#include <mysql/mysql.h> - #include <dbd/common.h> - - #define DBD_MYSQL_CONNECTION "DBD.MySQL.Connection" -diff --git a/dbd/mysql/statement.c b/dbd/mysql/statement.c -index aca865a..6af4c39 100644 ---- a/dbd/mysql/statement.c -+++ b/dbd/mysql/statement.c -@@ -424,7 +424,7 @@ static int statement_fetch_impl(lua_State *L, statement_t *statement, int named_ - - if (fields[i].type == MYSQL_TYPE_TIMESTAMP || fields[i].type == MYSQL_TYPE_DATETIME) { - char str[20]; -- struct st_mysql_time *t = bind[i].buffer; -+ MYSQL_TIME *t = bind[i].buffer; - - snprintf(str, 20, "%d-%02d-%02d %02d:%02d:%02d", t->year, t->month, t->day, t->hour, t->minute, t->second); - -@@ -435,7 +435,7 @@ static int statement_fetch_impl(lua_State *L, statement_t *statement, int named_ - } - } else if (fields[i].type == MYSQL_TYPE_TIME) { - char str[9]; -- struct st_mysql_time *t = bind[i].buffer; -+ MYSQL_TIME *t = bind[i].buffer; - - snprintf(str, 9, "%02d:%02d:%02d", t->hour, t->minute, t->second); - -@@ -446,7 +446,7 @@ static int statement_fetch_impl(lua_State *L, statement_t *statement, int named_ - } - } else if (fields[i].type == MYSQL_TYPE_DATE) { - char str[20]; -- struct st_mysql_time *t = bind[i].buffer; -+ MYSQL_TIME *t = bind[i].buffer; - - snprintf(str, 11, "%d-%02d-%02d", t->year, t->month, t->day); - diff --git a/dev-lua/luadbi/luadbi-0.7.2-r2.ebuild b/dev-lua/luadbi/luadbi-0.7.2-r2.ebuild deleted file mode 100644 index f6a6bb822552..000000000000 --- a/dev-lua/luadbi/luadbi-0.7.2-r2.ebuild +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -LUA_COMPAT=( lua5-{1..4} luajit ) - -inherit lua toolchain-funcs - -DESCRIPTION="A database interface library for Lua" -HOMEPAGE="https://github.com/mwild1/luadbi" -SRC_URI="https://github.com/mwild1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86" -IUSE="mysql postgres +sqlite test" -REQUIRED_USE=" - ${LUA_REQUIRED_USE} - || ( mysql postgres sqlite ) -" -RESTRICT="test" - -RDEPEND=" - ${LUA_DEPS} - mysql? ( dev-db/mysql-connector-c:0= ) - postgres? ( dev-db/postgresql:= ) - sqlite? ( dev-db/sqlite ) -" - -DEPEND="${RDEPEND}" - -BDEPEND=" - virtual/pkgconfig - test? ( - dev-lua/busted[${LUA_USEDEP}] - dev-lua/luarocks - ) -" - -PATCHES=( - "${FILESDIR}/${PN}-0.7.2-mysql-8.patch" - "${FILESDIR}/${PN}-0.7.2-incompatible-pointer-type.patch" - "${FILESDIR}/${PN}-0.7.2-incompatible-pointer-type2.patch" -) - -src_prepare() { - default - - # Respect users CFLAGS - sed -e 's/-g //' -e 's/-O2 //g' -i Makefile || die - - lua_copy_sources -} - -lua_src_compile() { - pushd "${BUILD_DIR}" || die - - tc-export AR CC - - local myemakeargs=( - "LUA_INC=$(lua_get_CFLAGS)" - ) - - use mysql && emake ${myemakeargs} MYSQL_INC="-I$(mariadb_config --libs)" mysql - use postgres && emake ${myemakeargs} PSQL_INC="-I$(pg_config --libdir)" psql - use sqlite emake ${myemakeargs} SQLITE3_INC="-I/usr/include" sqlite - - popd -} - -src_compile() { - lua_foreach_impl lua_src_compile -} - -lua_src_test() { - pushd "${BUILD_DIR}" || die - cd "${S}"/tests && ${ELUA} run_tests.lua || die - popd -} - -src_test() { - lua_foreach_impl lua_src_test -} - -lua_src_install() { - pushd "${BUILD_DIR}" || die - - local myemakeargs=( - DESTDIR="${ED}" - LUA_CDIR="$(lua_get_cmod_dir)" - LUA_INC="$(lua_get_CFLAGS)" - LUA_LDIR="$(lua_get_lmod_dir)" - ) - - use mysql && emake ${myemakeargs[@]} install_mysql - use postgres && emake ${myemakeargs[@]} install_psql - use sqlite && emake ${myemakeargs[@]} install_sqlite3 - - popd -} - -src_install() { - lua_foreach_impl lua_src_install - - einstalldocs -} diff --git a/dev-lua/luadbi/luadbi-0.7.3.ebuild b/dev-lua/luadbi/luadbi-0.7.3.ebuild index a018a850e8e3..ee5156418fea 100644 --- a/dev-lua/luadbi/luadbi-0.7.3.ebuild +++ b/dev-lua/luadbi/luadbi-0.7.3.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://github.com/mwild1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86" +KEYWORDS="amd64 arm arm64 ~hppa ~ppc ~ppc64 ~sparc x86" IUSE="mysql postgres +sqlite test" REQUIRED_USE=" ${LUA_REQUIRED_USE} |