DATADIR question

Dmitry Marakasov amdmi3 at
Mon Oct 15 09:28:56 PDT 2007


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
* 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

Dmitry A. Marakasov    | jabber: amdmi3 at
amdmi3 at       |

More information about the freebsd-ports mailing list