Date: Tue, 4 Sep 2007 15:56:26 +0200 From: Markus Hitter <mah@jump-ing.de> To: pav@FreeBSD.org Cc: freebsd-ports@freebsd.org, portmgr@FreeBSD.org Subject: Re: ports/116078: bsd.port.mk - Handling of PREFIX doesn't work as documented Message-ID: <3BE3C14A-F8C2-4D28-AAAE-818D09A11D9D@jump-ing.de> In-Reply-To: <1188911831.28297.184.camel@pav.hide.vol.cz> References: <200709041215.l84CFqnl073364@freefall.freebsd.org> <FC4717A9-B30A-41BE-8EC4-CE0FF8AE37DA@jump-ing.de> <1188911831.28297.184.camel@pav.hide.vol.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
Pav, I took the freedom to put this onto the list for a broader participation. Gentlemen, it looks like the ports mechanism is incapable of building it's dependencies in some situations, especially if PREFIX is set. I've already filed a bug about this topic at <http://www.freebsd.org/ cgi/query-pr.cgi?pr=116078> After setting up a fresh (virtual) FreeBSD installation, I attempted to build some ports in a non-standard location for later inclusion into a tinybsd build script. The experience is, if you build ports with PREFIX set, as described in the handbook, section 4.5.2.1, many builds fail because a port can't build it's own dependencies. More precisely, it builds all needed dependencies, but in the wrong place. Jeremy Messenger, the libinconv maintainer confirmed this odd behavior and sees room for improvement as well. While there are a few workarounds, like setting LOCALBASE as well or doing a "make depends" without PREFIX first, I sat down, investigated the issue and fixed it. The patch is two lines only and works like a charme. The port it's self goes into $PREFIX, dependencies go into $LOCALBASE. Obviously, the maintainers are unhappy with such an enhancement and strongly recommend to use one of the undocumented workarounds. Please read on yourself, I'm eager to read your opinions: Am 04.09.2007 um 15:17 schrieb Pav Lucistnik: > The system works as designed Then the design is needlessly limited. > - when installing port with dependencies, > you are supposed to define LOCALBASE to point to the place where > dependencies are. Does not matter if they are currently installed or > not. So why is the mechanism building a dependency at all in this situation? Clearly, it only makes sense to build a dependency in a place where the port would find it later. This is why I set "make PREFIX=${LOCALBASE} ..." for building dependencies. This small patch makes ports work as described in the makefile, removes the need for some extra actions and extra thoughts and I can't think of a situation where this leads to misbehavior. You still can set LOCALBASE to whatever you want getting the documented and expected results. Another possible fix would be to disable dependency building at all in the case of PREFIX != LOCALBASE. Then, Dependencies exist already or the installation fails a lot earlier. Building useless dependencies is just a waste of resources. Cheers, Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BE3C14A-F8C2-4D28-AAAE-818D09A11D9D>