Gentoo Archives: gentoo-dev

From: Alexandre Rostovtsev <tetromino@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] new vala.eclass
Date: Sun, 26 Aug 2012 07:01:10
Message-Id: 1345964385.9829.80.camel@rook
In Reply to: Re: [gentoo-dev] [RFC] new vala.eclass by Ulrich Mueller
1 On Sat, 2012-08-25 at 23:45 +0200, Ulrich Mueller wrote:
2 > >>>>> On Sat, 25 Aug 2012, Alexandre Rostovtsev wrote:
3 >
4 > > export VALAC=$(type -P valac-${VALA_API_VERSION})
5 > > export VALA=$(type -P vala-${VALA_API_VERSION})
6 > > export VALA_GEN_INTROSPECT=$(type -P vala-gen-introspect-${VALA_API_VERSION})
7 > > export VAPIGEN="$(type -P vapigen-${VALA_API_VERSION})"
8 >
9 > Is it guaranteed that these commands are present at pkg_setup time?
10
11 I am assuming that the ebuild writer has added the correct vala
12 dependency to DEPEND. Maybe something like this:
13
14 VALA_API_VERSION=0.16
15 DEPEND="vala? ( >=dev-lang/vala-0.16.1:${VALA_API_VERSION}[vapigen] )"
16
17 In which case, the vala commands that are pulled in via DEPEND will be
18 (unless I am completely wrong about how pkg_config works) available
19 during pkg_config.
20
21 Commands that are not pulled in via DEPEND of course might not be
22 available, in which case VALAC or VAPIGEN etc. would be set to the empty
23 string by vala_pkg_config.
24
25 For all vala-using build systems that I have seen, this should not break
26 anything.
27
28 However, for a cleaner and safer environment, I could do the following:
29
30 local path
31
32 path=$(type -P valac-${VALA_API_VERSION})
33 [[ -n "${path}" ]] && VALAC="${path}"
34
35 path=$(type -P vala-${VALA_API_VERSION})
36 [[ -n "${path}" ]] && VALA="${path}"
37
38 path=$(type -P vala-gen-introspect-${VALA_API_VERSION})
39 [[ -n "${path}" ]] && VALA_GEN_INTROSPECT="${path}"
40
41 path=$(type -P vapigen-${VALA_API_VERSION})
42 [[ -n "${path}" ]] && VAPIGEN="${path}"

Replies

Subject Author
Re: [gentoo-dev] [RFC] new vala.eclass Alexandre Rostovtsev <tetromino@g.o>
Re: [gentoo-dev] [RFC] new vala.eclass Alexandre Rostovtsev <tetromino@g.o>
Re: [gentoo-dev] [RFC] new vala.eclass Zac Medico <zmedico@g.o>