Commit 738dab0f authored by Jehan's avatar Jehan

meson: fix relocatable-bundle feature and mypaint-brushes dependency.

It must not be a boolean but a `feature` option, with `auto` by default.
`auto` value mean enabled for macOS and Win32, and disabled for other
cases. This default logics disappeared in the meson build.

Also the mypaint-brushes package is a mandatory dependency, which must
always be checked. Absence is fatale.
Finally properly set the MYPAINT_BRUSHES_DIR macro depending on the
proper relocatable case.
parent 2b67a54b
......@@ -7,7 +7,7 @@ manconf.set('gimplocaledir', prefix / localedir)
manconf.set('gimpplugindir', prefix / gimpplugindir)
manconf.set('manpage_gimpdir', '$XDG_CONFIG_HOME/' + gimpdir / gimp_app_version)
manconf.set('gimpsysconfdir', prefix / gimpsysconfdir)
manconf.set('mypaint_brushes_dir', libmypaint_brushes_dir)
manconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
man_files = [
......
etcconf = configuration_data()
etcconf.set('mypaint_brushes_dir', libmypaint_brushes_dir)
etcconf.set('mypaint_brushes_dir', mypaint_brushes_dir)
install_data(
......
......@@ -287,7 +287,20 @@ no_dep = dependency('', required: false)
################################################################################
# Mandatory Dependencies
relocatable_bundle = get_option('relocatable-bundle')
if get_option('relocatable-bundle').enabled()
relocatable_bundle = true
elif get_option('relocatable-bundle').disabled()
relocatable_bundle = false
else # .auto()
# By default, assume building for Windows or macOS everything to be on
# the same prefix and can be relocated.
# On other platforms, build-time paths are meaningful.
if platform_windows or platform_osx
relocatable_bundle = true
else
relocatable_bundle = false
endif
endif
conf.set('ENABLE_RELOCATABLE_RESOURCES', relocatable_bundle)
......@@ -335,15 +348,15 @@ lcms = dependency('lcms2', version: '>=2.8')
libmypaint = dependency('libmypaint', version: '>=1.3.0')
libmypaint_brushes= relocatable_bundle ? no_dep : \
dependency('mypaint-brushes-1.0', version: '>=1.3.0', required: false)
mypaint_brushes = dependency('mypaint-brushes-1.0', version: '>=1.3.0')
libmypaint_brushes_dir = libmypaint_brushes.get_pkgconfig_variable(
'brushesdir',
default: '${gimp_installation_dir}'/'share'/'mypaint-data'/'1.0'/'brushes',
)
if relocatable_bundle
mypaint_brushes_dir = '${gimp_installation_dir}'/'share'/'mypaint-data'/'1.0'/'brushes'
else
mypaint_brushes_dir = mypaint_brushes.get_pkgconfig_variable('brushesdir')
endif
conf.set_quoted('MYPAINT_BRUSHES_DIR', libmypaint_brushes_dir)
conf.set_quoted('MYPAINT_BRUSHES_DIR', mypaint_brushes_dir)
pangocairo = dependency('pangocairo', version: '>=1.29.4')
pangoft2 = dependency('pangoft2', version: '>=1.29.4')
......
# Build properties
option('ansi', type: 'boolean', value: false,description: 'Turn on strict ansi')
option('enable-console-bin',type: 'boolean', value: true, description: 'Build a console-only binary which does not link GTK+')
option('win32-debug-console',type:'boolean', value: true, description: 'Open a console when starting the program')
option('enable-default-bin',type: 'boolean', value: true, description: 'Build default Gtk+ binary')
option('enable-multiproc', type: 'boolean', value: true, description: 'Support for multiple processors')
option('profiling', type: 'boolean', value: false,description: 'Enable profiling')
option('windows-installer', type: 'boolean', value: false,description: 'Generate files needed for the Windows installer')
option('relocatable-bundle',type: 'boolean', value: false,description: 'build with resources considered bundled under the same prefix')
option('shmem-type', type: 'combo', value: 'auto', description: 'Shared memory transport type', choices: [ 'none', 'sysv', 'posix', 'win32', 'auto' ])
option('ansi', type: 'boolean', value: false, description: 'Turn on strict ansi')
option('enable-console-bin',type: 'boolean', value: true, description: 'Build a console-only binary which does not link GTK+')
option('win32-debug-console',type:'boolean', value: true, description: 'Open a console when starting the program')
option('enable-default-bin',type: 'boolean', value: true, description: 'Build default Gtk+ binary')
option('enable-multiproc', type: 'boolean', value: true, description: 'Support for multiple processors')
option('profiling', type: 'boolean', value: false, description: 'Enable profiling')
option('windows-installer', type: 'boolean', value: false, description: 'Generate files needed for the Windows installer')
option('relocatable-bundle',type: 'feature', value: 'auto', description: 'build with resources considered bundled under the same prefix')
option('shmem-type', type: 'combo', value: 'auto', description: 'Shared memory transport type',
choices: [ 'none', 'sysv', 'posix', 'win32', 'auto' ])
option('bug-report-url', type: 'string', value: '', description: 'URL used by the debug dialog to report bugs')
option('gimpdir', type: 'string', value: '', description: 'Change default gimpdir from ~/.config/GIMP/2.9 to ~/.config/DIR/2.9 (if relative), or to DIR (if absolute)')
option('icc-directory', type: 'string', value: '', description: 'Path to default color profiles for this system')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment