Use mariadb libraries as a mysql connector

main
Nikita Tokarchuk 3 years ago
parent ec960e14be
commit 14c429432c
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 34
      0001-build-use-mariadb-libraries-as-a-mysql-connector.patch
  2. 2
      csync2.spec

@ -0,0 +1,34 @@
From ff03ff7d31dc6ccddccad44abfa6e9e4b72c5b01 Mon Sep 17 00:00:00 2001
From: Nikita Tokarchuk <nikita@tokarch.uk>
Date: Wed, 6 Apr 2022 17:54:55 +0200
Subject: [PATCH] build: use mariadb libraries as a mysql connector
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index d71a4d7..64f94a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,7 @@ AC_ARG_ENABLE([postgres],
if test "$enable_mysql" == yes
then
# Check for mysql.
- CFLAGS="$CFLAGS `pkg-config --cflags mysqlclient`"
+ CFLAGS="$CFLAGS `pkg-config --cflags libmariadb`"
# Check MySQL development header
AC_CHECK_HEADERS([mysql.h], , [AC_MSG_ERROR([[mysql header not found; install mysql-devel and dependencies for MySQL Support]])])
@@ -137,7 +137,7 @@ then
AC_DEFINE([HAVE_MYSQL], 1, [Define if mysql support is wanted])
# [] quotes, or autofoo will strip the character class [] in sed, breaking the regex.
- [LIBMYSQLCLIENT_SO=$( readlink $(pkg-config --variable=libdir mysqlclient)/libmysqlclient.so | sed -e 's,^.*/,,;s/\(\.so\.[0-9]*\)\..*$/\1/')]
+ [LIBMYSQLCLIENT_SO=$( readlink $(pkg-config --variable=libdir libmariadb)/libmariadb.so | sed -e 's,^.*/,,;s/\(\.so\.[0-9]*\)\..*$/\1/')]
test -n "$LIBMYSQLCLIENT_SO" || AC_MSG_ERROR([Could not determine library name to be used in dlopen for mysql support])
fi
AC_DEFINE_UNQUOTED([LIBMYSQLCLIENT_SO], ["$LIBMYSQLCLIENT_SO"], [library name to be used in dlopen for mysql support])
--
2.35.1

@ -14,6 +14,7 @@ Version: 2.1
Release: 0rc1
URL: https://github.com/LINBIT/csync2#readme
Source0: %{name}-%{version}-%{release}.tar.gz
Patch1: 0001-build-use-mariadb-libraries-as-a-mysql-connector.patch
BuildRequires: autoconf
BuildRequires: automake
@ -49,6 +50,7 @@ It is expedient for HA-clusters, HPC-clusters, COWs and server farms.
%prep
%setup
%autopatch -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -I/usr/kerberos/include"

Loading…
Cancel
Save