From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8D7E9138010 for ; Sun, 26 Aug 2012 07:01:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 915A8E056C; Sun, 26 Aug 2012 07:00:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 82589E049A for ; Sun, 26 Aug 2012 06:59:48 +0000 (UTC) Received: from [192.168.1.43] (unknown [96.231.195.182]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: tetromino) by smtp.gentoo.org (Postfix) with ESMTPSA id BAB7633D78B for ; Sun, 26 Aug 2012 06:59:47 +0000 (UTC) Message-ID: <1345964385.9829.80.camel@rook> Subject: Re: [gentoo-dev] [RFC] new vala.eclass From: Alexandre Rostovtsev To: gentoo-dev@lists.gentoo.org Date: Sun, 26 Aug 2012 02:59:45 -0400 In-Reply-To: <20537.18304.877062.568911@a1i15.kph.uni-mainz.de> References: <1345910966.9829.9.camel@rook> <1345928676.9829.13.camel@rook> <20537.18304.877062.568911@a1i15.kph.uni-mainz.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Archives-Salt: 91dd5da8-ff49-4070-b858-6b2944b59d2f X-Archives-Hash: 4b6228f0132c5d68498643ea87e2f2b6 On Sat, 2012-08-25 at 23:45 +0200, Ulrich Mueller wrote: > >>>>> On Sat, 25 Aug 2012, Alexandre Rostovtsev wrote: > > > export VALAC=$(type -P valac-${VALA_API_VERSION}) > > export VALA=$(type -P vala-${VALA_API_VERSION}) > > export VALA_GEN_INTROSPECT=$(type -P vala-gen-introspect-${VALA_API_VERSION}) > > export VAPIGEN="$(type -P vapigen-${VALA_API_VERSION})" > > Is it guaranteed that these commands are present at pkg_setup time? I am assuming that the ebuild writer has added the correct vala dependency to DEPEND. Maybe something like this: VALA_API_VERSION=0.16 DEPEND="vala? ( >=dev-lang/vala-0.16.1:${VALA_API_VERSION}[vapigen] )" In which case, the vala commands that are pulled in via DEPEND will be (unless I am completely wrong about how pkg_config works) available during pkg_config. Commands that are not pulled in via DEPEND of course might not be available, in which case VALAC or VAPIGEN etc. would be set to the empty string by vala_pkg_config. For all vala-using build systems that I have seen, this should not break anything. However, for a cleaner and safer environment, I could do the following: local path path=$(type -P valac-${VALA_API_VERSION}) [[ -n "${path}" ]] && VALAC="${path}" path=$(type -P vala-${VALA_API_VERSION}) [[ -n "${path}" ]] && VALA="${path}" path=$(type -P vala-gen-introspect-${VALA_API_VERSION}) [[ -n "${path}" ]] && VALA_GEN_INTROSPECT="${path}" path=$(type -P vapigen-${VALA_API_VERSION}) [[ -n "${path}" ]] && VAPIGEN="${path}"