From owner-freebsd-ports@FreeBSD.ORG Sun Apr 11 09:01:41 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B81F16A4CE for ; Sun, 11 Apr 2004 09:01:41 -0700 (PDT) Received: from mail.metawire.org (metawire.org [24.73.230.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id 553EE43D4C for ; Sun, 11 Apr 2004 09:01:41 -0700 (PDT) (envelope-from wek48@metawire.org) Received: by mail.metawire.org (Postfix, from userid 3078) id 7207A3BBF78; Sun, 11 Apr 2004 11:01:51 -0500 (EST) Date: Sun, 11 Apr 2004 11:01:51 -0500 From: William Kirkland To: freebsd-ports@freebsd.org Message-ID: <20040411160151.GA15516@openwire> References: <40778608.3040505@rbcmail.ru> <40795D17.20507@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40795D17.20507@mac.com> User-Agent: Mutt/1.5.4i Subject: Re: hard-coded paths X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 16:01:41 -0000 It would be a kludge, but if you were to hard code the path to the current directory, an alias or wrapper script could eaisly ensure consistant results upon execution. PATH="./lib/configfile" alias application="cd /usr/local/application-home; ./application" On Sun, Apr 11, 2004 at 10:58:31AM -0400, Chuck Swiger wrote: > Constantine wrote: > >I am porting an application that has hard-coded paths for the message > >files. They are defined in the Makefile, but still they are hardcoded in > >the programme. Is there a way to go around this problem? As it is, the > >port will not work on systems with installations different from the one > >of compile time. > > Pre-built packages effectively have hard-coded paths in them regardless, so > you may be making more of this issue than you need to. > > If the Makefile is generated via the common ./configure process, the ports > Makefile ought to pass in an appropriate installation prefix if the user > has changed it from the default of /usr/local. If the program does > something different, use REINPLACE_CMD to update the hardcoded paths in > place to whatever $LOCALBASE is set to. > Constantine wrote: