installing into alternate directory?

Adam Weinberger adamw at adamw.org
Fri Oct 13 22:50:58 UTC 2017


> On 13 Oct, 2017, at 16:41, Steve Kargl <sgk at troutmask.apl.washington.edu> wrote:
> 
> On Fri, Oct 13, 2017 at 04:29:39PM -0600, Adam Weinberger wrote:
>>> On 13 Oct, 2017, at 16:08, Steve Kargl <sgk at troutmask.apl.washington.edu> wrote:
>>> 
>>> I suspect that this is documented someplace.
>>> In the old days, one coudl install ports in
>>> an directory hierarchy other than /usr/local
>>> by setting DESTDIR.  This is/was handy in 
>>> testing a new port, or in particular, an upgrade
>>> of an abandoned port.
>>> 
>>> % cd /usr/ports/math/octave42
>>> % make
>>> % setenv DESTDIR /usr/local/octave42
>>> % make install
>>> ===>  Creating some important subdirectories
>>> ===> /tmp subdirectory has been successfully created
>>> ===> /dev subdirectory has been successfully created
>>> ===>  Starting chrooted make in /usr/local/octave42...
>>> chroot: /bin/sh: No such file or directory
>>> ===>  Chrooted make in /usr/local/octave42 failed
>>> ===>  Cleaning up...
>>> *** Error code 1
>>> 
>>> What?
>> 
>> PREFIX
>> 
> 
> Does not work.  'make install' will then look for dependencies
> under PREFIX.  It won't find the dependencies, and then dutifully
> populate PREFIX with those dependencies.  I want 'make install' to
> install only the files that will be installed from the math/octave42
> port.  No dependencies.  The dependencies are available iin /usr/local.
> 
> -- 
> Steve

Ah. I just actually read the error message you printed, which is from octave42, not the ports system. DESTDIR is set very intentionally by the ports system, and is essential for staging. It is not meant to be overridden.

Given that the error comes from the port's build and not bsd.port.mk, and given that there is no math/octave42 in the ports tree, all I can tell you is that PREFIX is how you specify where things get installed. Don't set it in the environment, pass it directly to make as an argument or in make.conf. If things are being searched for in PREFIX instead of LOCALBASE, that sounds to me like a bug.

# Adam


-- 
Adam Weinberger
adamw at adamw.org
https://www.adamw.org





More information about the freebsd-ports mailing list