Date: Sun, 11 Apr 2004 14:00:17 -0400 From: Constantine <cnst@rbcmail.ru> To: Chuck Swiger <cswiger@mac.com> Cc: FreeBSD ports <ports@FreeBSD.org> Subject: Re: hard-coded paths Message-ID: <407987B1.6070407@rbcmail.ru> In-Reply-To: <40795D17.20507@mac.com> References: <40778608.3040505@rbcmail.ru> <40795D17.20507@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?407987B1.6070407>