Source: ayatana-ido
Version: 0.10.4-1.1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
ayatana-ido fails to cross build from source because the CMake
instructions hard code the build architecture vapigen. While vapigen
looks architecture-independent on the surface, it uses pkg-config and
thus uses architecture-dependent paths. Hence it fails finding GLib-2.0.
I'm attaching a patch that looks up the correct vapigen via (the
correctly detected) pkg-config. Please consider applying it. Note that
the package already contains a similar change for gir.
Helmut
--- ayatana-ido-0.10.4.orig/cmake/FindVala.cmake
+++ ayatana-ido-0.10.4/cmake/FindVala.cmake
@@ -32,6 +32,14 @@
# OF SUCH DAMAGE.
#=============================================================================
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(_pc_vapigen vapigen)
+ if(_pc_vapigen_FOUND)
+ pkg_get_variable(_pc_vapigen_executable vapigen vapigen)
+ endif()
+endif()
+
find_program (VALA_COMPILER "valac")
if (VALA_COMPILER)
@@ -40,7 +48,11 @@
string (REGEX MATCH "[.0-9]+" VALA_VERSION "${VALA_VERSION}")
endif (VALA_COMPILER)
-find_program (VAPI_GEN "vapigen")
+if(_pc_vapigen_executable)
+ set(VAPI_GEN "${_pc_vapigen_executable}")
+else()
+ find_program (VAPI_GEN "vapigen")
+endif()
if (VAPI_GEN)
execute_process (COMMAND ${VAPI_GEN} --version