GNOME Bugzilla – Bug 751557
Allow custom vapigen location to be specified
Last modified: 2019-01-15 03:57:01 UTC
We would like to see this patch from Fedora introduced: http://pkgs.fedoraproject.org/cgit/geary.git/plain/geary-0.5.3-vapigen.patch That allows us to set VAPIGEN variable to different values like, for example, vapigen-0.28 or the vala version we are running In gentoo we are carrying a similar patch for the same purposes: --- geary-0.5.1.tar.xz/src/CMakeLists.txt +++ geary-0.5.1.tar.xz/src/CMakeLists.txt @@ -399,12 +399,7 @@ include(ValaPrecompile) # Vapigen -find_program(VAPIGEN vapigen) -if (VAPIGEN STREQUAL "VAPIGEN-NOTFOUND") - message(FATAL_ERROR "vapigen must be installed to build Geary.") -else () - message(STATUS "Found vapigen: " ${VAPIGEN}) -endif () +set(VAPIGEN $ENV{VAPIGEN}) # Packages if (LIBMESSAGINGMENU_FOUND) @@ -615,7 +610,7 @@ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bindings/metadata COMMAND - vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --metadatadir=. --metadatadir=${WEBKITGTK_METADATA_DIR} --library=webkitgtk-3.0 --directory=${CMAKE_BINARY_DIR}/src ${WEBKITGTK_CUSTOM_VALA} `pkg-config --variable=girdir gobject-introspection-1.0`/WebKit-3.0.gir + $ENV{VAPIGEN} --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --metadatadir=. --metadatadir=${WEBKITGTK_METADATA_DIR} --library=webkitgtk-3.0 --directory=${CMAKE_BINARY_DIR}/src ${WEBKITGTK_CUSTOM_VALA} `pkg-config --variable=girdir gobject-introspection-1.0`/WebKit-3.0.gir ) # Geary client app Thanks
We're not going to require people to set an environmental variable before compiling Geary. I'd be happy with a patch the checked the environment before running find_program, though.
Above Fedora patch is no more visible. However it seems that Fedora now uses a smarter approach to choose the vapigen version: https://src.fedoraproject.org/rpms/geary/blob/master/f/geary.spec#_63 And in case you want to use a different version from default, you can use update-alternatives. This is my current setup on Fedora 27: $ ls -l /usr/bin/vapigen lrwxrwxrwx 1 root root 25 16 nov 09.27 /usr/bin/vapigen -> /etc/alternatives/vapigen $ ls -l /etc/alternatives/vapigen lrwxrwxrwx 1 root root 21 16 nov 09.27 /etc/alternatives/vapigen -> /usr/bin/vapigen-0.38
*** Bug 722386 has been marked as a duplicate of this bug. ***
This probably won't happen until we port to Meson, so depending on bug 777044.
I'd occasionally find this handy, but it's a low priority. If someone wants to update the meson build along the lines of Roboter's suggestion I'd be willing to take it.
Hi all, thanks for your interest in this feature. This is a low priority for the Geary developers, and hence an implementation of it would need to come from the community. If you are interested developing an implementation, please jump in an lodge a merge request over at https://gitlab.gnome.org/GNOME/geary