DATADIR question

Tijl Coosemans tijl at ulyssis.org
Wed Oct 17 05:36:20 PDT 2007


On Monday 15 October 2007 18:30:24 Dmitry Marakasov wrote:
> I'm porting silvertree game (from creators of wesnoth), and I have
> some issues with it's DATADIR.
> 
> The problem is that port is named silvertree, but it installs data
> under ${PREFIX}/share/silvertree-rpg. What do I do with DATADIR in
> this case?
> 
> 1. Rename the port:
> Not a best solution, as I'll have to introduce additional variables
> like DISTNAME, which are overwise correct with their default values.
> Also, this -rpg suffix may change in future.
> 
> 2. Leave it as it is:
> * Will install data to ${PREFIX}/share/silvertree-rpg
> * Plist: share/silvertree-rpg/somefile
> * portlint complaints, DATADIR is not used at all
> 
> 3. Force configure to use DATADIR with adding --datadir to
> CONFIGURE_ARGS
> * Will install data to ${PREFIX}/share/silvertree/silvertree-rpg
> * Plist: %%DATADIR%%/silvertree-rpg/somefile
> 
> 4. Change DATADIR in port
> * Will install data to ${PREFIX}/share/silvertree-rpg
> * Plist: %%DATADIR%%/somefile
> * DATADIR=${PREFIX}/share/silvertree-rpg
> 
> I think the correct way is 3 or 4, but I didn't find enough data on
> DATADIR meaning: should it be user-changeable (i.e. user can install
> a port without touching PREFIX but changing DATADIR), or is more like
> a shortcut to sync port's Makefile and plist, so port could change it
> to actual value and plist should only use %%DATADIR%%?
> 
> Seems that DATADIR user-changeable is not the case, as it's not even
> passed to configure by default. So correct way is more like #4, am I
> right?

Actually I'd like to see this clarified as well, because none of the
port maintainers I've ever spoken to knows this. Is DATADIR supposed
to be user changeable or not? Does it need to be passed to configure
or not?


More information about the freebsd-ports mailing list