mirror of https://github.com/GNOME/gimp.git
Add script to install files in the dist tarball.
Add a check inside Meson to detect if we're building from a git clone or a dist tarball. (in thie later, don't generated INSTALL.in and git-version.h)
This commit is contained in:
parent
86c5720375
commit
9cd0584e90
27
meson.build
27
meson.build
|
@ -15,6 +15,11 @@ conf = configuration_data()
|
|||
|
||||
warnings = []
|
||||
|
||||
# git-version.h is already present and not generated if dist tarball
|
||||
is_dist_tarball = run_command('python', '-c',
|
||||
'import sys,os; sys.exit(0 if os.path.exists("git-version.h") else 1)'
|
||||
).returncode() == 0
|
||||
|
||||
################################################################################
|
||||
# Project info
|
||||
|
||||
|
@ -919,20 +924,20 @@ else
|
|||
|
||||
if (not python_found) and (not always_install)
|
||||
error('''
|
||||
Python @0@ or PyGObject was not found.
|
||||
Python >=@0@ or PyGObject was not found.
|
||||
Note that you may install the Python plug-ins even if you have no Python
|
||||
interpreter at build-time by passing the configure option -Dpython=always.
|
||||
Just make sure that a Python @0@ interpreter is available at run-time.
|
||||
'''.format(python3_required_version))
|
||||
Just make sure that a Python >=@0@ interpreter is available at run-time.
|
||||
'''.format(python3_minver))
|
||||
endif
|
||||
|
||||
if (not python_found) and (always_install)
|
||||
python_warning = '''
|
||||
Python @0@ or PyGObject was not found.
|
||||
Python >=@0@ or PyGObject was not found.
|
||||
Python plug-ins will be installed anyway but you should make sure that
|
||||
a compatible Python interpreter is available at installation, otherwise
|
||||
installed plug-ins won't be usable.
|
||||
'''.format(python3_required_version)
|
||||
'''.format(python3_minver)
|
||||
warning(python_warning)
|
||||
warnings += python_warning
|
||||
endif
|
||||
|
@ -1401,7 +1406,9 @@ endif
|
|||
##### #### # # # # #### # # ###### ###### ####
|
||||
|
||||
|
||||
|
||||
if is_dist_tarball
|
||||
gitversion_h = files('git-version.h')
|
||||
else
|
||||
gitversion_h1 = vcs_tag(
|
||||
input : 'app/git-version.h.in',
|
||||
output: 'git-version.h.in.1',
|
||||
|
@ -1423,7 +1430,7 @@ gitversion_h = vcs_tag(
|
|||
replace_string: '@GIMP_GIT_LAST_COMMIT_YEAR@',
|
||||
fallback: '',
|
||||
)
|
||||
|
||||
endif
|
||||
|
||||
install_conf = configuration_data()
|
||||
install_conf.set('GIMP_APP_VERSION', gimp_app_version)
|
||||
|
@ -1460,11 +1467,13 @@ install_conf.set('WEBP_REQUIRED_VERSION', webp_minver)
|
|||
install_conf.set('WMF_REQUIRED_VERSION', wmf_minver)
|
||||
install_conf.set('XGETTEXT_REQUIRED_VERSION', '0.19')
|
||||
|
||||
configure_file(
|
||||
if not is_dist_tarball
|
||||
INSTALL = configure_file(
|
||||
input : 'INSTALL.in',
|
||||
output: 'INSTALL',
|
||||
configuration: install_conf
|
||||
)
|
||||
endif
|
||||
|
||||
|
||||
configure_file(
|
||||
|
@ -1547,6 +1556,8 @@ custom_target('Changelog',
|
|||
build_by_default: false,
|
||||
)
|
||||
|
||||
meson.add_dist_script('meson_dist_script.sh')
|
||||
|
||||
|
||||
################################################################################
|
||||
# Subdirs
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cp -f 'INSTALL' "${MESON_DIST_ROOT}"
|
||||
# rm -f "${MESON_DIST_ROOT}/INSTALL.in"
|
||||
|
||||
cp 'git-version.h' "${MESON_DIST_ROOT}"
|
Loading…
Reference in New Issue