Bug 1030543 - vala-tools package ships vapigen.m4 but not Makefile.vapigen
Summary: vala-tools package ships vapigen.m4 but not Makefile.vapigen
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vala
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 16:26 UTC by Allison Karlitskaya
Modified: 2014-02-20 20:44 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-20 20:44:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Allison Karlitskaya 2013-11-14 16:26:36 UTC
Vala 0.16 introduced autogen support for projects to be able to conveniently generate and install their own .vapi files.  This came in the form of a .m4 file and associated Makefile:

 - /usr/share/aclocal/vapigen.m4
 - /usr/share/vala/Makefile.vapigen

The vala-tools package in F20 ships vapigen.m4 but not Makefile.vapigen.  This leads to the following confusing error message when attempting to build a project that uses these macros (such as libgusb in this case):

Makefile:1337: /usr/share/vala/Makefile.vapigen: No such file or directory



Since vapigen.m4 is useless without Makefile.vapigen, they should both be in the same package.

Comment 1 Kalev Lember 2013-11-14 20:02:17 UTC
Might be easier to just ship vapigen and vapicheck in the -devel subpackage instead of having the -devel and -tools split. From my experience, almost all packages need both -devel and -tools installed to build, so the split doesn't really save much.

Comment 2 Evan Nemerson 2013-11-14 20:35:08 UTC
It's safe, though maybe not very useful, to have vapigen.m4 in a different package--vapigen.m4 is *usually* (but not always) copied to each package so that it's safe to just use the VAPIGEN_CHECK macro.  If vapigen.m4 isn't present then anything which doesn't include a local copy should just assume vapigen isn't available.

The VAPIGEN_CHECK macro from vapigen.m4 will check for the vapigen pkg-config module and, if found, will assume both the vapigen executable and Makefile.vapigen exist.  So what you really need is the vapigen executable and Makefile.vapigen both present whenever vapigen.pc is.

I think the tools and devel split makes sense.  Lots of packages will only need vala and/or vala-tools, but the only packages that should really be requiring vala-devel to build are those which need to parse Vala code (like valadoc and IDE plug-ins).

Comment 3 Allison Karlitskaya 2013-11-14 20:44:44 UTC
I think that it's probably completely backwards then.  If anything, the Makefile should be in -tools since it is required to build any project that uses the .m4.

That said, building out of git is common enough, and even if the .m4 ends up in the tarball, that doesn't mean it will be in git checkouts.

In any case, it should be absolutely impossible to have the .m4 file on your system without also having the Makefile.  I think it's probably best to just have them both in -tools.

Comment 4 Evan Nemerson 2013-11-14 21:05:22 UTC
I agree with Ryan.  Makefile.vapigen should be in -tools, along with vapigen.m4, vapigen, and vapigen.pc/vapigen-0.22.pc.

Not sure what you mean by it being backwards...  the only thing in that list which is in -devel instead of -tools is Makefile.vapigen.

Comment 5 Kalev Lember 2014-02-20 20:44:17 UTC
I've now moved Makefile.vapigen to -tools in http://pkgs.fedoraproject.org/cgit/vala.git/commit/?id=0f85bad3bfef647aea75ce748b195b446495e122


Note You need to log in before you can comment on or make changes to this bug.