From owner-freebsd-questions Thu Aug 29 8:13:15 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1E1237B400 for ; Thu, 29 Aug 2002 08:13:10 -0700 (PDT) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 988C943E3B for ; Thu, 29 Aug 2002 08:13:09 -0700 (PDT) (envelope-from fbsd-q@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.5/8.12.5) with ESMTP id g7TFDuGL083619; Thu, 29 Aug 2002 17:13:56 +0200 (CEST) (envelope-from stable@ei.bzerk.org) Received: (from stable@localhost) by ei.bzerk.org (8.12.5/8.12.5/Submit) id g7TFDuAZ083618; Thu, 29 Aug 2002 17:13:56 +0200 (CEST) Date: Thu, 29 Aug 2002 17:13:56 +0200 From: Ruben de Groot To: Doug Poland Cc: simond@irrelevant.org, questions@FreeBSD.ORG Subject: Re: Modifying a port for local use Message-ID: <20020829151356.GA83454@ei.bzerk.org> References: <20020828163410.A1930@polands.org> <20020829061358.GA797@irrelevant.org> <24097.63.104.35.130.1030631043.squirrel@babylon.polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <24097.63.104.35.130.1030631043.squirrel@babylon.polands.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Aug 29, 2002 at 09:24:03AM -0500, Doug Poland typed: > > Simon Dick said: > > On Wed, Aug 28, 2002 at 04:34:10PM -0500, Doug Poland wrote: > >> Hello, > >> > >> I want to modify a port ( squirrelmail-1.2.7 ) for use on my system. > >> The issue is where the port is installed. The Makefile lets the ports > >> system install into /usr/local. However, I want it installed into > >> /data/www. > >> > > > > The normal way to do it doesn't even require altering the makefile, just > > try this: > > cd /usr/ports/mail/squirrelmail > > make PREFIX=/data/www > > make PREFIX=/data/www install > > > > and that should be recorded into the pkg db once it's installed. > > (it works, I create ports using that method so ask more if you still > > have problems :) > > > Hi Simon, > > I tried your suggestion and it did install my port in the location > specified by PREFIX. However, it still creates the following directories > in PREFIX { bin etc include info lib libdata libexec man sbin share} and > pkg_delete is trying to delete files from /usr/local instead of PREFIX. > > Is the port system not designed to install outside /usr/local no matter > how one slices it? I was having similar problems trying to build the www/analog port with PREFIX=/opt/analog. Turns out the dependencies (e.g. libtool, gmake) all get installed under the same prefix, which is good, but the build doesn't find them if you don't put /opt/analog/bin in your PATH. After manually altering my PATH, the build continues, only to stop a little further because it cant find the right include files (it's looking in /usr/local/include and /usr/local/include/gd but it should be looking in /opt/analog/include.. After some searching I found this in files/patch-aa: +CFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/include/gd +LIBS+= -L${LOCALBASE}/lib -lgd -lpng -ljpeg -lz Adding PREFIX to CFLAGS and LIBS finally made it possible to compile the port. I think the ports system *is* designed to install outside /usr/local, but there's a lot of undocumented (and untested) stuff out there. > > Many thanks for your help. > > -- > Regards, > Doug > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message