Date: Wednesday, January 16, 2019 @ 16:24:38
  Author: eworm
Revision: 423656

fix for mariadb 10.3

Added:
  monitoring-plugins/trunk/0001-mariadb.patch
Modified:
  monitoring-plugins/trunk/PKGBUILD

--------------------+
 0001-mariadb.patch |   26 ++++++++++++++++++++++++++
 PKGBUILD           |   12 ++++++++++--
 2 files changed, 36 insertions(+), 2 deletions(-)

Added: 0001-mariadb.patch
===================================================================
--- 0001-mariadb.patch                          (rev 0)
+++ 0001-mariadb.patch  2019-01-16 16:24:38 UTC (rev 423656)
@@ -0,0 +1,26 @@
+From 399cc141526ee77e1befce469f1fab40645f299d Mon Sep 17 00:00:00 2001
+From: Bernard Spil <s...@users.noreply.github.com>
+Date: Mon, 6 Nov 2017 17:31:44 +0100
+Subject: [PATCH] Fix build issue with MariaDB 10.2
+
+As of 10.2 MariaDB no longer defines MYSQL_PORT.
+---
+ plugins/common.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/plugins/common.h b/plugins/common.h
+index 8719b502..6bf4fca4 100644
+--- a/plugins/common.h
++++ b/plugins/common.h
+@@ -174,6 +174,11 @@
+  *
+  */
+ 
++/* MariaDB 10.2 client does not set MYSQL_PORT */
++#ifndef MYSQL_PORT
++#  define MYSQL_PORT 3306
++#endif
++
+ enum {
+       OK = 0,
+       ERROR = -1

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-01-16 16:24:19 UTC (rev 423655)
+++ PKGBUILD    2019-01-16 16:24:38 UTC (rev 423656)
@@ -19,9 +19,17 @@
 provides=('nagios-plugins')
 conflicts=('nagios-plugins')
 replaces=('nagios-plugins')
-source=(https://www.monitoring-plugins.org/download/$pkgname-$pkgver.tar.gz)
-md5sums=('549e243ba1fb5c5b3be3a86961de40a7')
+source=("https://www.monitoring-plugins.org/download/$pkgname-$pkgver.tar.gz";
+        '0001-mariadb.patch')
+sha256sums=('296a538f00a9cbef7f528ff2d43af357a44b384dc98a32389a675b62a6dd3665'
+            '2e478c220563c194f61d68860cfbb56cf9ce1179b2590343c679a1609a5fba6d')
 
+prepare() {
+  cd $pkgname-$pkgver
+
+  patch -Np1 < ../0001-mariadb.patch
+}
+
 build() {
   cd $pkgname-$pkgver
 

Reply via email to