From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7F5DC138359 for ; Sun, 11 Oct 2020 23:36:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B45C4E08F0; Sun, 11 Oct 2020 23:36:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 04181E0869 for ; Sun, 11 Oct 2020 23:36:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 39D98335D0A for ; Sun, 11 Oct 2020 23:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AEB22332 for ; Sun, 11 Oct 2020 23:36:34 +0000 (UTC) From: "Conrad Kostecki" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Conrad Kostecki" Message-ID: <1602459187.af72c733c6f6687dde699b73c9197c20ab5cf97d.conikost@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lua/luadbi/files/, dev-lua/luadbi/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lua/luadbi/files/luadbi-0.5-mysql-8.patch dev-lua/luadbi/luadbi-0.5-r5.ebuild dev-lua/luadbi/luadbi-0.5-r6.ebuild X-VCS-Directories: dev-lua/luadbi/files/ dev-lua/luadbi/ X-VCS-Committer: conikost X-VCS-Committer-Name: Conrad Kostecki X-VCS-Revision: af72c733c6f6687dde699b73c9197c20ab5cf97d X-VCS-Branch: master Date: Sun, 11 Oct 2020 23:36:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 72b02466-3404-43e9-8e3e-571354d4000e X-Archives-Hash: 2cecbc89c2538e135995020aafcc7a9d commit: af72c733c6f6687dde699b73c9197c20ab5cf97d Author: Conrad Kostecki gentoo org> AuthorDate: Sun Oct 11 23:33:07 2020 +0000 Commit: Conrad Kostecki gentoo org> CommitDate: Sun Oct 11 23:33:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af72c733 dev-lua/luadbi: fix compilation with mysql-8 Closes: https://bugs.gentoo.org/695378 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Conrad Kostecki gentoo.org> dev-lua/luadbi/files/luadbi-0.5-mysql-8.patch | 78 +++++++++++++++++++++++++++ dev-lua/luadbi/luadbi-0.5-r5.ebuild | 1 + dev-lua/luadbi/luadbi-0.5-r6.ebuild | 5 +- 3 files changed, 83 insertions(+), 1 deletion(-) diff --git a/dev-lua/luadbi/files/luadbi-0.5-mysql-8.patch b/dev-lua/luadbi/files/luadbi-0.5-mysql-8.patch new file mode 100644 index 00000000000..a75c9d46d07 --- /dev/null +++ b/dev-lua/luadbi/files/luadbi-0.5-mysql-8.patch @@ -0,0 +1,78 @@ +--- a/dbd/mysql/statement.c 2020-03-09 15:55:43.212010825 +0100 ++++ b/dbd/mysql/statement.c 2020-03-09 15:57:37.703464570 +0100 +@@ -200,7 +200,10 @@ + switch(type) { + case LUA_TNIL: + bind[i].buffer_type = MYSQL_TYPE_NULL; ++#if MYSQL_VERSION_ID >= 80000 ++#else + bind[i].is_null = (my_bool*)1; ++#endif + break; + + case LUA_TBOOLEAN: +@@ -209,7 +213,11 @@ + *boolean = lua_toboolean(L, p); + + bind[i].buffer_type = MYSQL_TYPE_LONG; +- bind[i].is_null = (my_bool*)0; ++#if MYSQL_VERSION_ID >= 80000 ++ bind[i].is_null = (bool*) 0; ++#else ++ bind[i].is_null = (my_bool*)0; ++#endif + bind[i].buffer = (char *)boolean; + bind[i].length = 0; + break; +@@ -224,7 +232,11 @@ + *num = lua_tonumber(L, p); + + bind[i].buffer_type = MYSQL_TYPE_DOUBLE; +- bind[i].is_null = (my_bool*)0; ++#if MYSQL_VERSION_ID >= 80000 ++ bind[i].is_null = (bool*) 0; ++#else ++ bind[i].is_null = (my_bool*)0; ++#endif + bind[i].buffer = (char *)num; + bind[i].length = 0; + break; +@@ -235,7 +247,11 @@ + str = lua_tolstring(L, p, str_len); + + bind[i].buffer_type = MYSQL_TYPE_STRING; +- bind[i].is_null = (my_bool*)0; ++#if MYSQL_VERSION_ID >= 80000 ++ bind[i].is_null = (bool*) 0; ++#else ++ bind[i].is_null = (my_bool*)0; ++#endif + bind[i].buffer = (char *)str; + bind[i].length = str_len; + break; +@@ -385,7 +385,7 @@ + + 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); + +@@ -396,7 +396,7 @@ + } + } 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); + +@@ -407,7 +407,7 @@ + } + } 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.5-r5.ebuild b/dev-lua/luadbi/luadbi-0.5-r5.ebuild index e46445c3b8f..a2d657fb7d5 100644 --- a/dev-lua/luadbi/luadbi-0.5-r5.ebuild +++ b/dev-lua/luadbi/luadbi-0.5-r5.ebuild @@ -26,6 +26,7 @@ S="${WORKDIR}" src_prepare() { epatch "${FILESDIR}"/${PV}-r2-Makefile.patch + epatch "${FILESDIR}"/${P}-mysql-8.patch sed -i -e "s#^INSTALL_DIR_LUA=.*#INSTALL_DIR_LUA=$(pkg-config --variable INSTALL_LMOD lua)#" \ -e "s#^INSTALL_DIR_BIN=.*#INSTALL_DIR_BIN=$(pkg-config --variable INSTALL_CMOD lua)#" \ -e "s#^LUA_INC_DIR=.*#LUA_INC_DIR=$(pkg-config --variable INSTALL_INC lua)#" \ diff --git a/dev-lua/luadbi/luadbi-0.5-r6.ebuild b/dev-lua/luadbi/luadbi-0.5-r6.ebuild index 2a24cb49017..44ae7c129ca 100644 --- a/dev-lua/luadbi/luadbi-0.5-r6.ebuild +++ b/dev-lua/luadbi/luadbi-0.5-r6.ebuild @@ -24,7 +24,10 @@ DEPEND="${RDEPEND} S="${WORKDIR}" -PATCHES=( "${FILESDIR}"/${PV}-r2-Makefile.patch ) +PATCHES=( + "${FILESDIR}"/${PV}-r2-Makefile.patch + "${FILESDIR}"/${P}-mysql-8.patch +) src_prepare() { default