From nobody@FreeBSD.org  Tue Sep  4 11:26:29 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 057AB16A421
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Sep 2007 11:26:29 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E7D9713C46A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Sep 2007 11:26:28 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l84BQS7m037243
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Sep 2007 11:26:28 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l84BQSdC037242;
	Tue, 4 Sep 2007 11:26:28 GMT
	(envelope-from nobody)
Message-Id: <200709041126.l84BQSdC037242@www.freebsd.org>
Date: Tue, 4 Sep 2007 11:26:28 GMT
From: Markus Hitter <mah@jump-ing.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: PREFIX is documented, but not the more important LOCALBASE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116080
>Category:       docs
>Synopsis:       PREFIX is documented, but not the more important LOCALBASE
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       porthandbook
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 04 11:30:02 GMT 2007
>Closed-Date:    Sat Dec 21 17:40:39 UTC 2013
>Last-Modified:  Sat Dec 21 17:40:39 UTC 2013
>Originator:     Markus Hitter
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD testBSD.jump-ing.de 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007 root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
The Ports system features the PREFIX variable to let one install a port into a different location than /usr/local. /usr/ports/Mk/bsd.port.mk says:

  # PREFIX                - Where *this* port installs its files.

The handbook documents this feature:

<http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html>
(Section 4.5.2.1)

Missing in this section is, PREFIX isn't inheriting (or shouldn't inherit, see PR #116078) to dependencies. Using PREFIX, dependencies are put into the default location.

If one wants all build results in a different directory - which is the case in many scenarios, one has to build with LOCALBASE instead:

  make LOCALBASE=/usr install


N.B.: Currently, using PREFIX fails if dependencies are needed: PR #116078


>How-To-Repeat:
n.a.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->tabthorpe 
Responsible-Changed-By: tabthorpe 
Responsible-Changed-When: Fri Feb 6 17:54:41 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 

From: Thomas Abthorpe <tabthorpe@freebsd.org>
To: bug-followup@freebsd.org, mah@jump-ing.de
Cc:  
Subject: Re: docs/116080: PREFIX is documented, but not the more important LOCALBAS
Date: Fri, 6 Feb 2009 15:05:45 -0500

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Hi Markus
 
 I will look at this PR, do you have some content you would like to contribute?
 
 
 Thomas
 
 - -- 
 Thomas Abthorpe		| FreeBSD Committer
 tabthorpe@FreeBSD.org	| http://people.freebsd.org/~tabthorpe
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.10 (FreeBSD)
 
 iEYEARECAAYFAkmMmCEACgkQ5Gm/jNBp8qBAOQCfS1i6/fPWjQRr7tyQPf+s0pvO
 LagAn3aC4eAqA26CIAOi+q8jhlVekpPs
 =K8WO
 -----END PGP SIGNATURE-----

From: Markus Hitter <mah@jump-ing.de>
To: Thomas Abthorpe <tabthorpe@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: docs/116080: PREFIX is documented, but not the more important LOCALBAS
Date: Sat, 7 Feb 2009 11:47:24 +0100

 Am 06.02.2009 um 21:05 schrieb Thomas Abthorpe:
 
 > I will look at this PR, do you have some content you would like to  
 > contribute?
 
 Hello Thomas,
 
 it's exactly the right time you come up with this. Recently I had a  
 similar issue when trying to install a port into a non-standard  
 location and came to about the opposite conclusion:
 
 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/130899
 
 The real issue probably is, there is currently no common sense about  
 how to handle installation of ports in non-standard locations. Many  
 FreeBSD developers consider /usr/local to be the only valid place to  
 install ports to. Some ports even have this path hardcoded (using  
 neither PREFIX nor LOCALBASE). Nevertheless, ports has the feature to  
 install elsewhere and supports this to about 90%.
 
 Can we move this discussion to one of the mailing lists? I'd  
 subscribe there, then.
 
 The questions unclear to me are:
 
 - why does LOCALBASE exist if PREFIX is already there? Why isn't a  
 single variable sufficient?
 
 - is it sensible to check prerequisites by looking for files in a  
 fixed location like
 
 if [ -e ${PREFIX}/bin/apr ]; then
    echo "apr is installed"
 fi
 
 rarther than querying the ports database to find out wether and where  
 a port is installed?
 
 
 Markus
 
 
Responsible-Changed-From-To: tabthorpe->freebsd-doc 
Responsible-Changed-By: tabthorpe 
Responsible-Changed-When: Sat Apr 10 04:46:18 UTC 2010 
Responsible-Changed-Why:  
Back to the heap, I have made no positive progress on this, maybe 
somebody else can do it justice 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 
State-Changed-From-To: open->closed 
State-Changed-By: gjb 
State-Changed-When: Wed Sep 7 02:24:08 UTC 2011 
State-Changed-Why:  
PR 159551, though a duplicate of this PR, provides a patch. 

Close this one for favor of the latter. 



Responsible-Changed-From-To: freebsd-doc->gjb 
Responsible-Changed-By: gjb 
Responsible-Changed-When: Wed Sep 7 02:24:08 UTC 2011 
Responsible-Changed-Why:  
Over to me, since I'm closing this. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 
State-Changed-From-To: closed->open 
State-Changed-By: gjb 
State-Changed-When: Wed Sep 7 02:28:03 UTC 2011 
State-Changed-Why:  
Oops, time to get the reading glasses checked.  This PR is for 
the Ports chapter in the handbook, not ports(7) manual. 

Reopen, sorry for the noise. 



Responsible-Changed-From-To: gjb->freebsd-doc 
Responsible-Changed-By: gjb 
Responsible-Changed-When: Wed Sep 7 02:28:03 UTC 2011 
Responsible-Changed-Why:  
Oops, time to get the reading glasses checked.  This PR is for 
the Ports chapter in the handbook, not ports(7) manual. 

Reopen, sorry for the noise. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 
Responsible-Changed-From-To: freebsd-doc->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sat Dec 21 17:25:53 UTC 2013 
Responsible-Changed-Why:  
Let's get this one fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sat Dec 21 17:40:38 UTC 2013 
State-Changed-Why:  
After reading the section in question, I'm certain that the difference 
is adequately explained with the following extract: "For instance, if 
your port requires a macro PAGER to have the full pathname of less, do 
not use a literal path of /usr/local/bin/less. Instead, use 
${LOCALBASE}".  If you disagree, please say so! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116080 
>Unformatted:
