port to package amd64 to i386

Polytropon freebsd at edvax.de
Mon Mar 5 16:55:59 UTC 2012

On Mon, 05 Mar 2012 17:42:58 +0100, Bernt Hansson wrote:
> Thank you for the pointer. I do find it a bit overkill to setup jails 
> and such, just to build a few ports.

The "problem" here is that a specific build environment
is required.

> I was thinking more along the line of;
> cd /usr/ports/"random port"
> make "it for i386 even if we are building it on amd64, ooh by the way 
> build it as a package, and all dependencies as packages as well"

Again, a "problem" is that packages can only be generated
if the port has been installed, which is the "make package"
task typically following "make install", resulting in the
desired package in the /usr/ports/packages/ subtree. See
"man ports" regarding the "package" target. I think that
_could_ be overridden by specifying a different, "temporary"
$PREFIX to install to, but I haven't tested this approach.

For the dependencies, I think there was a setting to be
included in /etc/make.conf... MAKE_DEPENDS=PACKAGE? Something
like this will cause all dependencies to be built and
archived as a package.

> Oh man, man ports. But I do not find the flag 
> -build-for-another-system-cpu-whatever

Some settings can be transferred to the make environment,
usually /etc/make.conf is used.

> Can the ports system be (ab)used in that way?

I don't think it is that easy. :-(

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list