From owner-freebsd-ports@FreeBSD.ORG Sun Apr 11 11:00:26 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 284C716A4D0 for ; Sun, 11 Apr 2004 11:00:26 -0700 (PDT) Received: from cnst.dyns.net (user92.net619.nc.sprint-hsd.net [65.41.40.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B63C43D2F for ; Sun, 11 Apr 2004 11:00:25 -0700 (PDT) (envelope-from cnst@rbcmail.ru) Received: from rbcmail.ru (Dell_Inspiron_8100 [192.168.0.1]) by cnst.dyns.net (8.12.8p1/8.12.8) with ESMTP id i3BI0ML7000207; Sun, 11 Apr 2004 14:00:23 -0400 (EDT) (envelope-from cnst@rbcmail.ru) Message-ID: <407987B1.6070407@rbcmail.ru> Date: Sun, 11 Apr 2004 14:00:17 -0400 From: Constantine User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.6) Gecko/20040113 X-Accept-Language: en-gb, ru, en-us, en MIME-Version: 1.0 To: Chuck Swiger References: <40778608.3040505@rbcmail.ru> <40795D17.20507@mac.com> In-Reply-To: <40795D17.20507@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD ports 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 18:00:26 -0000 On 2004-04-11 10:58, 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. > > [ Perhaps you ought to set "NO_PACKAGE", too. ] I was rather ambiguous in my question. The hard-coded paths will be in the compiled package only. If one is installing the application from ports via compilation, everything should work fine. I am working on the port with the original developer and he is willing to make his application as portable as possible --- is there a way to avoid hard-coding the /local/ path? I.e., could the port use relative parts like "../share/portname/messages/"? How is it possible to do so? We would rather like to have a package for the port too. Cheers, Constantine.