From: Jared Rhine <jared@wordzoo.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Finding GCC+GCJ greater than 3.4.2
Date: Sun, 24 Apr 2005 18:03:01 -0700 [thread overview]
Message-ID: <87oec3ekhm.wl@badger.wordzoo.com> (raw)
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
next reply other threads:[~2005-04-25 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-25 1:03 Jared Rhine [this message]
2005-04-25 2:15 ` [gentoo-dev] Finding GCC+GCJ greater than 3.4.2 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87oec3ekhm.wl@badger.wordzoo.com \
--to=jared@wordzoo.com \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox