Source: ayatana-indicator-messages
Version: 24.5.2-3
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

ayatana-indicator-messages fails to cross build from source, because it
uses the build architecture vapigen. This tool actually is
architecture-dependent, because the library search path being used is
architecture-dependent. Therefore, a host architecture vapigen must be
used. It is best discovered from the corresponding vapigen.pc pkg-config
file. I'm attaching a patch for this problem.

Once fixing it, ayatana-indicator-messages continues to fail cross
building. The next problem is the gtk-doc scanner. The typical solution
here is separating the documentation to an Arch:all package and skipping
gtk-doc in arch-only builds. However, I consider this out of scope for
this bug report. Please close it once addressing the vapigen matter
only.

Helmut
--- ayatana-indicator-messages-24.5.2.orig/cmake/FindVala.cmake
+++ ayatana-indicator-messages-24.5.2/cmake/FindVala.cmake
@@ -40,7 +40,15 @@ if (VALA_COMPILER)
 	string (REGEX MATCH "[.0-9]+" VALA_VERSION "${VALA_VERSION}")
 endif (VALA_COMPILER)
 
-find_program (VAPI_GEN "vapigen")
+pkg_check_modules(_pc_vapigen vapigen)
+if (_pc_vapigen_FOUND)
+	pkg_get_variable(_pc_vapigen_executable vapigen vapigen)
+endif (_pc_vapigen_FOUND)
+if (_pc_vapigen_executable)
+	set(VAPI_GEN "${_pc_vapigen_executable}")
+else (_pc_vapigen_executable)
+	find_program (VAPI_GEN "vapigen")
+endif (_pc_vapigen_executable)
 
 if (VAPI_GEN)
 	execute_process (COMMAND ${VAPI_GEN} --version

Reply via email to