Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640636 - dev-lang/php: replace EPREFIX in econf args with EROOT
Summary: dev-lang/php: replace EPREFIX in econf args with EROOT
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-10 21:58 UTC by Michael Orlitzky
Modified: 2017-12-21 15:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2017-12-10 21:58:56 UTC
A user asked this on IRC,

  Hello, the PHP ebuild uses EPREFIX for econf. I have ROOT set to something 
  other than /, but EPREFIX is empty so it configures against my real root. How 
  should I get EPREFIX set to the proper ROOT ? 

The reason we're using EPREFIX is because the PHP build system looks for things in exactly the location that you specify through, for example, --with-foo=${EPREFIX}/usr/foo. However, if the user has $ROOT set to something non-standard, I believe EROOT is more appropriate than EPREFIX, since (as the devmanual says), EROOT is shorthand for ${ROOT%/}${EPREFIX}/.
Comment 1 Mike Gilbert gentoo-dev 2017-12-10 22:37:18 UTC
ROOT and EROOT have undefined values in src_* functions. They should be used in pkg_* functions only.
Comment 2 Michael Orlitzky gentoo-dev 2017-12-10 23:26:28 UTC
(In reply to Mike Gilbert from comment #1)
> ROOT and EROOT have undefined values in src_* functions. They should be used
> in pkg_* functions only.

So much for that idea then.

The user left IRC before I could respond, but I guess he's using ROOT to try to install a separate system in some other directory. Setting ROOT specifies where the built packages get installed, and I presume he wants to build PHP against the things in his new ROOT, and not against the things in "/".

Is there a better way to do that (so that I can tell people what to do in the future)? Or something else we should be doing in the ebuild?
Comment 3 Michael Orlitzky gentoo-dev 2017-12-21 14:51:17 UTC
I'd still like to know if there's a good solution for what he was trying to do, but I'm going to close this as (now) obviously not the right way.
Comment 4 Mike Gilbert gentoo-dev 2017-12-21 15:18:04 UTC
(In reply to Michael Orlitzky from comment #3)
> I'd still like to know if there's a good solution for what he was trying to
> do, but I'm going to close this as (now) obviously not the right way.

I don't think there is a "good" solution, but I have seen the "SYSROOT" variable used in cross-compile chroot environments. I think this is a candidate for some future EAPI as well.

See bug 317337.