After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751557 - Allow custom vapigen location to be specified
Allow custom vapigen location to be specified
Status: RESOLVED WONTFIX
Product: geary
Classification: Other
Component: build
unspecified
Other Linux
: Low enhancement
: ---
Assigned To: Geary Maintainers
Geary Maintainers
: 722386 (view as bug list)
Depends on: 777044
Blocks:
 
 
Reported: 2015-06-26 18:09 UTC by Pacho Ramos
Modified: 2019-01-15 03:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2015-06-26 18:09:03 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
Comment 1 Robert Schroll 2015-06-27 21:30:15 UTC
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.
Comment 2 Federico Bruni 2017-12-06 05:41:17 UTC
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
Comment 3 Michael Gratton 2017-12-08 00:42:21 UTC
*** Bug 722386 has been marked as a duplicate of this bug. ***
Comment 4 Michael Gratton 2017-12-08 00:43:37 UTC
This probably won't happen until we port to Meson, so depending on bug 777044.
Comment 5 Michael Gratton 2018-06-13 12:54:54 UTC
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.
Comment 6 Michael Gratton 2019-01-15 03:57:01 UTC
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