File amarok_mariadb.patch of Package amarok

Add amarok_mariadb.patch (taken from Arch Linux) to make embedded MySQL server
work with our mariadb

Author: Wolfgang Bauer

diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
index 0bd7fdfd07..8973729f1f 100644
--- a/cmake/modules/FindMySQL.cmake
+++ b/cmake/modules/FindMySQL.cmake
@@ -38,14 +38,16 @@ if(MYSQLCONFIG_EXECUTABLE)
         OUTPUT_STRIP_TRAILING_WHITESPACE
     )
 
-    if(NOT MC_MYSQL_EMBEDDED_LIBRARIES OR NOT "${MC_return_embedded}" STREQUAL "0")
-        # At least on OpenSUSE and FreeBSD --libmysql-libs doesn't exist, so we just use
-        # MYSQL_LIBRARIES for that. We'll see if that's enough when testing
-        # below.
-        set(MYSQL_EMBEDDED_LIBRARIES ${MYSQL_LIBRARIES})
-    else()
-        set(MYSQL_EMBEDDED_LIBRARIES ${MC_MYSQL_EMBEDDED_LIBRARIES})
-    endif()
+    # mysql-config removed --libmysql-libs, but amarok need libmysqld other
+    # than libmysqlclient to run mysql embedded server.
+    find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld libmysqld
+        PATHS
+                $ENV{MYSQL_DIR}/libmysql_r/.libs
+                $ENV{MYSQL_DIR}/lib
+                $ENV{MYSQL_DIR}/lib/mysql
+        PATH_SUFFIXES
+                mysql
+    )
 endif()
 
 # Try searching manually via find_path/find_library,  possibly with hints