Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/bind/files/, net-dns/bind/
Date: Fri, 14 Feb 2020 16:02:03
Message-Id: 1581696101.a1391e36805f38ef6a18fd2077095ad3f6c63261.whissi@gentoo
commit:     a1391e36805f38ef6a18fd2077095ad3f6c63261
Author:     Jouni Kosonen <jouni.kosonen <AT> tukesoft <DOT> com>
AuthorDate: Sun Feb  2 05:48:52 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Feb 14 16:01:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1391e36

net-dns/bind: fix building against >=dev-db/mysql-connector-c-8.x

Closes: https://bugs.gentoo.org/692834
Signed-off-by: Jouni Kosonen <jouni.kosonen <AT> tukesoft.com>
Closes: https://github.com/gentoo/gentoo/pull/14529
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 net-dns/bind/bind-9.14.8.ebuild                  |  4 ++++
 net-dns/bind/bind-9.14.9.ebuild                  |  4 ++++
 net-dns/bind/bind-9.15.6.ebuild                  |  4 ++++
 net-dns/bind/files/bind-9.14.8-mysql8-bool.patch | 15 +++++++++++++++
 4 files changed, 27 insertions(+)

diff --git a/net-dns/bind/bind-9.14.8.ebuild b/net-dns/bind/bind-9.14.8.ebuild
index 18d9dbd9cc7..71849d180ed 100644
--- a/net-dns/bind/bind-9.14.8.ebuild
+++ b/net-dns/bind/bind-9.14.8.ebuild
@@ -85,6 +85,10 @@ S="${WORKDIR}/${MY_P}"
 # bug 479092, requires networking
 RESTRICT="test"
 
+PATCHES=(
+	"${FILESDIR}"/bind-9.14.8-mysql8-bool.patch
+)
+
 pkg_setup() {
 	ebegin "Creating named group and user"
 	enewgroup named 40

diff --git a/net-dns/bind/bind-9.14.9.ebuild b/net-dns/bind/bind-9.14.9.ebuild
index 817b8fb0b91..1a057167b9e 100644
--- a/net-dns/bind/bind-9.14.9.ebuild
+++ b/net-dns/bind/bind-9.14.9.ebuild
@@ -85,6 +85,10 @@ S="${WORKDIR}/${MY_P}"
 # bug 479092, requires networking
 RESTRICT="test"
 
+PATCHES=(
+	"${FILESDIR}"/bind-9.14.8-mysql8-bool.patch
+)
+
 pkg_setup() {
 	ebegin "Creating named group and user"
 	enewgroup named 40

diff --git a/net-dns/bind/bind-9.15.6.ebuild b/net-dns/bind/bind-9.15.6.ebuild
index b23f8ad912a..1bbaa64bb03 100644
--- a/net-dns/bind/bind-9.15.6.ebuild
+++ b/net-dns/bind/bind-9.15.6.ebuild
@@ -83,6 +83,10 @@ S="${WORKDIR}/${MY_P}"
 # bug 479092, requires networking
 RESTRICT="test"
 
+PATCHES=(
+	"${FILESDIR}"/bind-9.14.8-mysql8-bool.patch
+)
+
 pkg_setup() {
 	ebegin "Creating named group and user"
 	enewgroup named 40

diff --git a/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch b/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch
new file mode 100644
index 00000000000..8546edc1521
--- /dev/null
+++ b/net-dns/bind/files/bind-9.14.8-mysql8-bool.patch
@@ -0,0 +1,15 @@
+--- a/contrib/dlz/drivers/dlz_mysql_driver.c
++++ b/contrib/dlz/drivers/dlz_mysql_driver.c
+@@ -789,8 +789,11 @@ mysql_create(const char *dlzname, unsigned int argc, char *argv[],
+ 	char *endp;
+ 	int j;
+ 	unsigned int flags = 0;
++#if MYSQL_VERSION_ID >= 80000
++	typedef bool my_bool;  // Workaround to make library work with MySQL client 8.0 as well as earlier versions
++#endif
+ #if MYSQL_VERSION_ID >= 50000
+-        my_bool auto_reconnect = 1;
++	my_bool auto_reconnect = 1;
+ #endif
+ 
+ 	UNUSED(driverarg);