Source: amarok
Version: 3.0.1-3.1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

amarok fails to cross build from source, because it fails to detect
mariadb. It actually has two methods for detecting mariadb. It first
tries mariadb_config and then also tries pkgconf. The former method is
unfixably broken for cross compilation, because mariadb_config is an ELF
executable and it either cannot be run or reports results for the wrong
architecture. The native build successfully uses mariadb_config. For
cross compilation, the only reasonable way is using pkgconf. While the
package is correctly detected, the fallback mechanism is subtly broken
as it expects a cmake variable MYSQL_LIBRARIES to be set, but that
variable (unlike MYSQL_INCLUDE_DIR and MySQL_VERSION_STRING) is only set
by the mariadb_config and considered required producing the failure. I'm
attaching a patch that also initialized MYSQL_LIBRARIES from pkgconf
when available. After applying it, cross building amarok works. I
suggest forwarding the patch upstream as it will also help other
distributions such as Yocto or PtxDist but have not done so myself.

Helmut
--- amarok-3.0.1.orig/cmake/modules/FindMariaDB.cmake
+++ amarok-3.0.1/cmake/modules/FindMariaDB.cmake
@@ -35,6 +35,10 @@ endif()
 find_package(PkgConfig)
 pkg_check_modules(PC_MARIADB libmariadb)
 
+if(PC_MARIADB_LIBRARIES)
+    set(MYSQL_LIBRARIES ${PC_MARIADB_LIBRARIES})
+endif()
+
 find_path(MYSQL_INCLUDE_DIR mysql.h
     PATHS
         $ENV{MYSQL_INCLUDE_DIR}
_______________________________________________
pkg-kde-extras mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-kde-extras

Reply via email to