From 8b58fc41f8b20a73de22e14feaa3f13e22b27d57 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sat, 3 Oct 2020 17:32:09 -0300
Subject: [PATCH 02/11] Use pkgconfig in order to find mysql configuration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

call pkgconfig in order to be able to cross build qtbase with MySql.
Qt's build system calls mysql_config... which won't work in a cross build
environment like Debian's, as it will throw an exec format error.

In order to solve this call pkgconfig and use mysqlclient.pc.
Author: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971604
Forwarded: not-needed
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 src/plugins/sqldrivers/configure.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
index 28ccbeadcde..23f7b2c13aa 100644
--- a/src/plugins/sqldrivers/configure.json
+++ b/src/plugins/sqldrivers/configure.json
@@ -67,6 +67,7 @@
             },
             "headers": "mysql.h",
             "sources": [
+                { "type": "pkgConfig", "args": "mysqlclient" },
                 { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": true },
                 { "type": "mysqlConfig", "query": "--libs", "cleanlibs": true },
                 { "type": "mysqlConfig", "query": "--libs_r", "cleanlibs": false },
-- 
2.45.1

