From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j3P131Ic020158 for ; Mon, 25 Apr 2005 01:03:01 GMT Received: from dragon.jaredrhinebiz.net ([66.180.237.10]) by smtp.gentoo.org with esmtp (Exim 4.43) id 1DPs06-000751-GX for gentoo-dev@lists.gentoo.org; Mon, 25 Apr 2005 01:03:02 +0000 Received: from badger.wordzoo.com (adsl-63-200-48-54.dsl.snfc21.pacbell.net [63.200.48.54]) by dragon.jaredrhinebiz.net (8.11.3/8.11.3/2001-03-09-JRR) with ESMTP id j3P13QJ37300; Sun, 24 Apr 2005 18:03:26 -0700 (PDT) Date: Sun, 24 Apr 2005 18:03:01 -0700 Message-ID: <87oec3ekhm.wl@badger.wordzoo.com> From: Jared Rhine To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Finding GCC+GCJ greater than 3.4.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII X-Archives-Salt: 8bb35c8a-4629-407a-af53-fb2bd04f118f X-Archives-Hash: 225659dffdb49ff817c27e9437112fc8 This question relates to ebuild development, and is being asked by a non-developer. Apologies if there's a better forum for the question (perhaps gentoo-toolchain?) I've developed an ebuild for a package which requires GCJ >= 3.4.2 (GCJ is specifically required for its ability to translate Java to C for embedding). I run a x86-stable desktop, so my profile's basic GCC is at 3.3.5 (which was built without a GCJ use flag). I've installed a 3.4.3 GCC with GCJ using slots. Are there any suggestions for how my ebuild might identify whether there is a GCC installed, in any slot, which matches both the version requirement (>3.4.2) and the "gcj" USE requirement? The ebuild has this: DEPEND="${RDEPEND} >=sys-devel/gcc-3.4.2" which succeeds since that is installed. I also have this block commented out in my ebuild: #pkg_setup() { # if [[ ! $(built_with_use gcc gcj) ]] ; then # eerror 'Chandler build requires that GCC be built with the "gcj" USE flag' # die "exiting because of GCJ dependency" # fi #} If I uncomment it, this block will fail because my 3.3.5 GCC isn't "built_with_use" gcj and I think "best_version" (which built_with_use uses) only looks at my 3.3.5 installation. Even if I 'gcc-config' the 3.4.3 version, best_version still looks at my 3.3.5. My goal is to make this ebuild find and use a working GCC if it is present, even in the presence of slots and mixed use flags. I'm not sure this is possible without some fairly serious scripting. Suggestions are welcome. One improvement might be to replace the built_with_use check with something like a `gcc-config -B`/gcj check, and check at runtime that it's version 3.4.2 or higher. That seems straightforward. I might also look at every profile returned by `gcc-config -l`, and try them one at a time until I found one that works. That's sort of what I want to encode, but may be more scripting than it is worth. Are there any other options, eclasses, or general approaches I should consider for this problem? Thanks for your time. -- jared@wordzoo.com "One cannot mark the point without marking the path." -- gentoo-dev@gentoo.org mailing list