[RFC] Support --datarootdir
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
Describe the bug
Meson does not support --datarootdir.
Meson only support --datadir and not --datarootdir, while often these are redundant, there are relatively common cases where this is important.
For example the emulator snes9x uses --datadir to install the desktop file, icons and locales, on Slackware these must be installed to /usr/share/applications, /usr/share/icons and /usr/share/locale respectively. However they also install some data in the /usr/share/snes9x directory which would be preferable to install to /usr/share/games/snes9x instead.
Before when snes9x used autotools I could leave --datarootdir to the default of /usr/share and set --datadir=/usr/share/games to get the intended behavior. Now snes9x has worked around this by adding their own appdatadir option where I set -Dappdatadir=share/games/snes9x. Suffice to say this is less than ideal and it should not have to be added to every applicable project one by one.
https://github.com/snes9xgit/snes9x
Expected behavior
Meson should support --datarootdir and not force projects to reinvent the wheel every time its applicable.
system parameters
OS: Slackware64-current
python: 3.8.1
meson: 0.55.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by tracing Meson's existing --datadir command-line handling and how installation data paths are derived; done means --datarootdir works without project-specific appdatadir workarounds while preserving current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100