Opened 6 years ago

Last modified 6 years ago

#58426 new enhancement

Portfile instructions: unclear about global variable ${portbuildpath}

Reported by: frankliuao (Ao Liu (frankliuao)) Owned by:
Priority: Normal Milestone:
Component: guide Version:
Keywords: Cc:
Port:

Description

It directly affects the variable ${workpath} and ${destroot}, but it wasn't clearly given in guide.macports.org what the value is.

Any one can add that on the website?

Change History (5)

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Component: portsguide

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

It doesn't really matter to a portfile author what the value of portbuildpath is. This is not a variable a portfile author will use. What matters is that it is a temporary directory created for the port to use while a build is happening.

You can of course see what the value is on your system by looking at the path that the "work" symlink in the port's directory resolves to. It will resolve to a path inside ${prefix}/var/macports/build.

comment:3 Changed 6 years ago by jmroot (Joshua Root)

It's one of those variables like prefix that is handed down from above. Its value is not based on anything that a Portfile can control and it doesn't have a fixed default. The way it is constructed is also difficult to explain concisely. Have a look at the macports::getportbuildpath procedure if you're interested.

comment:4 in reply to:  3 Changed 6 years ago by frankliuao (Ao Liu (frankliuao))

I kinda agree, but variables like ${destroot} and ${workpath} depends on the build path, and will be useful for the developers if they are clearly explained.

After some tracking I realized that it's in /opt/local/var/macports/build/_your_ports_source_/portname/

where _your_ports_source_ reflects what you specified in the sources.conf

It would be nice if the maintainers could add some information in the guide. If not I hope this can be found by Google with keywords Portfile destroot, macports workpath, macports portbuildpath

Replying to jmroot:

It's one of those variables like prefix that is handed down from above. Its value is not based on anything that a Portfile can control and it doesn't have a fixed default. The way it is constructed is also difficult to explain concisely. Have a look at the macports::getportbuildpath procedure if you're interested.

comment:5 Changed 6 years ago by jmroot (Joshua Root)

It would be easy enough to vaguely explain it as "a unique path under ${portdbpath}/build" or something I guess.

Note: See TracTickets for help on using tickets.