From: Michael Orlitzky <mjo@gentoo.org>
To: gentoo-devhelp@lists.gentoo.org
Subject: Re: [gentoo-devhelp] Building project twice in the same ebuild
Date: Tue, 17 Feb 2015 12:48:31 -0500 [thread overview]
Message-ID: <54E37EEF.7060402@gentoo.org> (raw)
In-Reply-To: <mbrks8$acp$1@ger.gmane.org>
On 02/15/2015 09:32 PM, Nikos Chantziaras wrote:
> I need to build a project (which uses cmake) twice and install it twice.
> Each time with a different configuration. The files it generates in each
> configuration do not conflict with each other (except for share/doc/).
>
> Which configs are built depends on USE flags. Either qt4, qt5 or both.
>
> How would I go on about this? The project's build system *can not* build
> both sets in the same build. When building normally, outside of portage,
> this is built with:
>
> mkdir build && cd build
> cmake -DQT_VERSION=4 ../
> make && make install
> rm -r *
> cmake -DQT_VERSION=5 ../
> make && make install
>
> I'm not sure I can do something like that in an ebuild.
>
I would set S="${WORKDIR}" and then in src_prepare(), make a copy of the
entire package directory. The configure, compile, etc. phases would look
something like,
src_compile() {
for qt in 4 5; do # Make this list from the user's USE flags
cd "${WORKDIR}/${P}-qt${qt}" || die
cmake -DQT_VERSION=${qt} || die
emake
done
}
prev parent reply other threads:[~2015-02-17 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 2:32 [gentoo-devhelp] Building project twice in the same ebuild Nikos Chantziaras
2015-02-17 17:48 ` Michael Orlitzky [this message]
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=54E37EEF.7060402@gentoo.org \
--to=mjo@gentoo.org \
--cc=gentoo-devhelp@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