hard-coded paths
Constantine
cnst at rbcmail.ru
Sun Apr 11 11:00:26 PDT 2004
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.
More information about the freebsd-ports
mailing list