> Zac Medico (zmed...
>> I was working on writing documentation for the HDEPEND patch when I
>> realized that it seems simpler for ebuild developers if we divide the
>> dependencies as follows :
> Thanks much for adding this support:) This will definitely make life
> much easier for folks who need to cross-compile. But I have one
> quick question.
> Why would TDEPEND be simpler? I suspect that target build dependencies
> (header files and static libraries) are more common than host build
> dependencies (build tools). Most packages have no host build dependencies
> other than the toolchain which is implicit. So for most packages,
> you wouldn't need to do anything to support cross-compiling for the
> HDEPEND case. For the TDEPEND case, you'd have to modify a lot of
> packages. Especially, considering the fact that DEPEND=RDEPEND is the
> common case.
> The other nice property of HDEPEND is that DEPEND and RDEPEND are target
> and HDEPEND in host. With TDEPEND, DEPEND would be host while RDEPEND
> would be target. So HDEPEND seems more intuitive. But that might be
> more intuitive to me cuz I mostly cross-compile. Perhaps not more
> intuitive for someone who doesn't.
>> In EAPI 4 or later, DEPEND has been divided into two parts:
>> DEPEND for build-time host dependencies, and TDEPEND for
>> build-time target dependencies. This division is designed
>> specifically to minimize difficulty in the process of
>> adapting ebuilds that were written for earlier EAPIs,
>> and therefore it also minimizes the adjustments that
>> ebuild developers will have to make to the thought
>> processes involved when writing ebuilds from scratch. In
>> an environment that does not involve cross-compilation,
>> TDEPEND behaves the same as DEPEND. When an ebuild is
>> converted from EAPI 3 or earlier to EAPI 4 or later,
>> in order to support cross-compilation environments, some
>> dependencies may need to be migrated to TDEPEND.
>> For ebuilds that have EAPI 4 or later, the emerge
>> --root-deps option has no effect since it is made obsolete
>> by division between DEPEND and TDEPEND. If EAPI 3 or
>> earlier ebuilds are used in combination with EAPI 4 or
>> later ebuilds, the --root-deps behavior will still be
>> applied to the EAPI 3 or earlier ebuilds (there is no
>> behavior change for ebuilds having older EAPIs).
>> The attached patch applies to the master branch of portage (apply on
>> top of commit cc03d96314dc108964c9c1b0431a0466f20ad147 if it doesn't
>> apply to HEAD). You can test this patch by creating ebuilds with
>> EAPI=4_pre0_tdepend (this is a temporary EAPI, intended just for
>> testing purposes). I've also attached this patch to bug #317337: