Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2007 20:30:24 +0400
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        freebsd-ports@freebsd.org
Subject:   DATADIR question
Message-ID:  <20071015163024.GA55552@hades.panopticon>

next in thread | raw e-mail | index | archive | help
Hi!

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?

-- 
Dmitry A. Marakasov    | jabber: amdmi3@jabber.ru
amdmi3@amdmi3.ru       | http://www.amdmi3.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071015163024.GA55552>