Broken texture path after meson build
The option "with-system-data-files" is broken in meson build system. In "configure" we have this code:
# Check whether --with-system-data-files was given.
if test ${with_system_data_files+y}
then :
withval=$with_system_data_files; use_system_data=yes
fi
if test "x$use_system_data" = xyes; then
demos_data_dir="${datadir}/${PACKAGE}/"
else
demos_data_dir="../data/"
fi
resulting "demos_data_dir" as "/usr/share/mesa-demos/" (for Linux).
But in "meson.build" something goes wrong:
demos_data_dir = '../data/'
if get_option('with-system-data-files')
demos_data_dir = get_option('datadir') / 'mesa-demos'
endif
resulting "demos_data_dir" as broken "share/mesa-demos" path because "datadir" option not including "prefix" and no any "/" at the end of string:
$ /usr/bin/tunnel
Tunnel V1.5
Written by David Bucciarelli (tech.hmw@plus.it)
share/mesa-demostile.rgb: No such file or directory
File not found
Error reading a texture.
I can suggest the following fix for "meson.build":
demos_data_dir = '../data/'
if get_option('with-system-data-files')
demos_data_dir = get_option('prefix') / get_option('datadir') / 'mesa-demos' / ''
endif
It works for me and seems to be right.
Edited by Natrio