GNOME Bugzilla – Bug 760765
build-tools/vala-m4 recipe prevents from using any libraries that ship .vapi files
Last modified: 2016-01-18 14:58:49 UTC
recipes/build-tools/vala-m4.recipe contains the following install routines: def install(self): shutil.copyfile(os.path.join(self.build_dir, 'vapigen', 'vapigen.m4'), os.path.join(self.config.install_dir, 'share', 'aclocal', 'vala.m4')) shutil.copy(os.path.join(self.build_dir, 'vapigen', 'Makefile.vapigen'), os.path.join(self.config.install_dir, 'share', 'vala')) the last line effectively prevents from using any libraries that ship .vapi files. I wanted to add a library that ships its .vapi during make install stage to standard directory: PREFIX/share/vala/vapi/libraryname.vapi It fails while using cerbero if vala-m4 recipe was resolved as a dependency because PREFIX/share/vala is not a directory (it's a file) so it fails to create PREFIX/share/vala/vapi/ subdirectory. I cannot understand rationale of copying Makefile.vapigen to PREFIX/share/vala (it looks like something really non-standard to me) so I can't suggest any resolution.
vala itself is also installing that Makefile there when doing "make install", it seems to be required by some stuff from the m4. commit 050588f5858a1fa87e2d829f38b009dfeb567970 Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon Jan 18 11:19:37 2016 +0200 vala-m4: Install Makefile.vapigen correctly Previously we were installing it as "vala", but it should be inside a subdirectory called "vala" with its original file name. https://bugzilla.gnome.org/show_bug.cgi?id=760765
This solution breaks the build, because the PREFIX/share/vala dir does not necessarily exist. The attached patch fixes the issue. [(49/78) vala-m4 -> fetch ] -----> Fetching tarball http://ftp.gnome.org/pub/GNOME/sources/vala/0.29/vala-0.29.3.tar.xz to /home/azureuser/cerbero/sources/local/vala-m4-0.29.3/vala-0.29.3.tar.xz [(49/78) vala-m4 -> extract ] -----> Extracting tarball to /home/azureuser/cerbero/sources/windows_x86/vala-0.29.3 Unpacking /home/azureuser/cerbero/sources/local/vala-m4-0.29.3/vala-0.29.3.tar.xz in /home/azureuser/cerbero/sources/windows_x86 [(49/78) vala-m4 -> configure ] [(49/78) vala-m4 -> compile ] [(49/78) vala-m4 -> install ] Recipe 'vala-m4' failed at the build step 'install' Traceback (most recent call last):
+ Trace 235907
stepfunc()
os.path.join(self.config.install_dir, 'share', 'vala', 'Makefile.vapigen'))
copyfile(src, dst)
with open(dst, 'wb') as fdst:
Created attachment 319275 [details] [review] Ensure that PREFIX/share/vala directory exist before copying Makefile.vapigen
Already merged similar changes commit 53f9a0da297cbeb402e76a4a7df2e587e73ab07f Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon Jan 18 16:54:51 2016 +0200 vala-m4: Make sure to create all subdirectories before installing into them commit 6fc60d071638a65ee4e504f705e372b2a4901c2e Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon Jan 18 15:50:40 2016 +0200 vala-m4: Make sure that the destination directory exists before copying