Commit Graph

2818 Commits

Author SHA1 Message Date
Nirbheek Chauhan 186eed2dc6 find_library: Add a cache for library searching
Otherwise we can end up searching for the same library tens of times,
because pkg-config does not de-duplicate -lfoo args before returning
them.

We use -Wl,--start-group/end-group, so we do not need to worry about
ordering issues in static libraries.
2018-06-07 12:57:56 +00:00
Nirbheek Chauhan 6b7dba7f06 backends: Don't hardcode system library paths
Lookup the library paths using the available compilers instead.

This makes the code work on non-Linux platforms too.
2018-06-07 12:57:56 +00:00
Jon Turney e9462ce206 Install shared_module implibs
On Windows, if we are going to link with a shared module, we need the
implib.

Use case: The Xorg server builds some X protocol extensions as modules.  The
implibs for these modules need to be shipped as part of the SDK, to enable
building of 3rd party extensions which reference symbols in (and hence on
Windows, need to be linked with) these modules.
2018-06-07 12:57:39 +00:00
Jon Turney 1f5c6d62bf More clearly explain portability issues with linking to a module
Refine #3277

According to what I read on the internet, on OSX, both MH_BUNDLE (module)
and MH_DYLIB (shared library) can be dynamically loaded using dlopen(), but
it is not possible to link against MH_BUNDLE as if they were shared
libraries.

Metion this as an issue in the documentation.

Emitting a warning, and then going on to fail during the build with
mysterious errors in symbolextractor isn't very helpful, so make attempting
this an error on OSX.

Add a test for that.

See also:
https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm
https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
2018-06-07 12:57:39 +00:00
Matthew Waters a7fc3fe356 dependencies/qt: fix debugoptimized builds with qt
debugoptimized builds building against Qt would ultimately link against
both the debug and non-debug msvcrt, ntdll, etc libraries which causes
crashes in weird places and is very much not recommended by Microsoft.

This changes the selected Qt library(ies) correctly to not uses the
debug variants for debugoptimized builds.

https://github.com/mesonbuild/meson/pull/3680
2018-06-07 12:56:49 +00:00
Xavier Claessens 2d3bfa0778 Interpreter: Fix subdir_done() to exit from inside if/foreach blocks
Closes: #3700.
2018-06-07 12:56:27 +00:00
Philip Chimento d9efee01d0 gettext: Install .mo files atomically
Without this, building a module in a Flatpak app manifest that is a
newer version of a module already present in the Flatpak runtime will
fail. (The Flatpak file system is a bunch of hard links to readonly
files, which can be replaced but not written to.)

This instead creates a temporary file in the same directory as the
destination (to avoid cross-device renaming errors) and atomically
renames the temporary file to the destination, replacing it instead of
rewriting it as shutil.copyfile() would do.
2018-06-07 00:18:21 +03:00
Xavier Claessens 9b791881ed compilers: Use RUSTFLAGS from the env as default rust_args value 2018-06-06 20:02:37 +00:00
Xavier Claessens 7fbe10ac8d mesonmain: Take only 2 optional directories
If only 1 dir is provided, the 2nd defaults to '.' and if none is
provided they default to '.' and '..'. It should be builddir first,
followed by sourcedir, but validate_core_dirs() will still swap them if
builddir contains a meson.build file.
2018-06-06 20:02:37 +00:00
Xavier Claessens 9350b9aa7b mconf: Take only one optional builddir arg that defaults to '.' 2018-06-06 20:02:37 +00:00
Xavier Claessens 6ed7a31402 environment: copy self.cmd_line_options to not modify original options
That dict gets modified when adding default_options, but mesonmain will
need to keep the original values.
2018-06-06 20:02:37 +00:00
Xavier Claessens a2ebbc7ec4 wraptool: Convert to argparse 2018-06-06 20:02:37 +00:00
Xavier Claessens 7c4736d27f Convert args.projectoptions into a dict
This simplifies a lot of code, and centralize "key=value" parsing in a
single place.

Unknown command line options becomes an hard error instead of
merely printing warning message. It has been warning it would become an
hard error for a while now. This has exceptions though, any
unknown option starting with "<lang>_" or "b_" are ignored because they
depend on which languages gets added and which compiler gets selected.
Also any option for unknown subproject are ignored because they depend
on which subproject actually gets built.

Also write more command line parsing tests. "19 bad command line
options" is removed because bad cmd line option became hard error and
it's covered with new tests in "30 command line".
2018-06-06 20:02:37 +00:00
Xavier Claessens f4d60acaa9 Remove had_argument_for() it is not used anymore
This also means we don't need to keep original command line arguments
anymore.
2018-06-06 20:02:37 +00:00
Xavier Claessens 75e501ceb8 coredata: Stop setting default option values as argparse attribute
All options are now the projectoptions list, regardless of how they got
defined in the command line.

This also delays setting builtin option values until the main project()
default options are parsed to simplify the code. This is possible
because we already delayed setting the backend after parsing main
project() in a previous commit.
2018-06-06 20:02:37 +00:00
Xavier Claessens 8afbfe227b mconf: Special case UserUmaskOption to print value in octal notation 2018-06-06 20:02:37 +00:00
Xavier Claessens af66656117 UserUmaskOption: Add 'preserve' in choices and use octal notation 2018-06-06 20:02:37 +00:00
Xavier Claessens 531722229b UserUmaskOption: Implement validate_value instead of set_value
set_value() is implemented by the base class, subclasses only need to
override validate_value().
2018-06-06 20:02:37 +00:00
Xavier Claessens 75cce9e157 mconf: Reduce code duplication and avoid missing builtin options
This ensure all option groups are printed the same way. Also ensure that
we cannot miss some builtin options by taking the list of all builtin
options and excluding only directories/testing options.
2018-06-06 20:02:37 +00:00
Xavier Claessens 04c5c53e3c mconf: Fix print when choices is a string instead of list 2018-06-06 20:02:37 +00:00
Xavier Claessens da29e48d13 mconf: Set prefix first because other options depends on it 2018-06-06 20:02:37 +00:00
Xavier Claessens 00414a326a dependencies: Take options from coredata instead of cmd line
These are the last remaining places where attributes set by argparse for
"--builtin-option" are used.
2018-06-06 20:02:37 +00:00
Xavier Claessens d503b1423e mconf: Report all unknown cmd line options instead of aborting on first
This is also more consistent with the error message returned by
optinterpreter when it finds unknown command line options.
2018-06-06 20:02:37 +00:00
Xavier Claessens 8fb72510c3 Move to coredata some methods handling options
Those methods only use coredata object, so better just move them as a
coredata method.
2018-06-06 20:02:37 +00:00
Xavier Claessens 3e6dc8fb71 mconf: Small tweaks when printing configuration 2018-06-06 20:02:37 +00:00
Xavier Claessens 5af98d16b9 Delay backend creation until project() is parsed
The project() function could have a different value for the backend
option in its default_options kwargs.

Also set backend options, passing them in command line had no effect
previously.
2018-06-06 20:02:37 +00:00
Xavier Claessens 218ed2de89 optinterpreter: Remove duplicated list of languages
It is important to keep the list of languages up to date in
optinterpreter, otherwise we could have conflicting options when adding
new languages.
2018-06-06 20:02:37 +00:00
Xavier Claessens aa879b7f0c Fix issues found by flake8 2018-06-06 20:02:37 +00:00
Xavier Claessens b7d442150d Move <lang>_args to coredata.compiler_options 2018-06-06 20:02:37 +00:00
Xavier Claessens 58a9555ddf UserArrayOption: Small cleanup in value parsing
It is nicer to early raise exception if the value from meson_options.txt
is not a string in "[]" format than duplicating the parser code for both
cases.

Also it was checking for duplicated items only in the user_input case,
but we should also check for dups in the default value from
meson_options.txt.
2018-06-06 20:02:37 +00:00
Xavier Claessens 64bfc6cf7b UserArrayOption: Add support for splitting on space instead of coma 2018-06-06 20:02:37 +00:00
Xavier Claessens fa72cd7173 Move get_args_from_envvars() from environment to compilers 2018-06-06 20:02:37 +00:00
Xavier Claessens 6eeea9dd54 Compilers: Chain-up to parent class in get_options()
Parent class could have common options for all compilers, and we'll soon
add some.
2018-06-06 20:02:37 +00:00
Chun-wei Fan 3c4c8bf775 environment.py: Properly check platform on MSVC 2008
The 'Platform' envvar may not be set on Visual Studio 2008, at least
when using the SDK 7.0 compilers, so check the 'BUILD_PLAT' envvar so
that we do not mis-detect x64 build environments as x86.
2018-06-06 18:37:29 +00:00
Nirbheek Chauhan f9f3a51243 Revert "really switch to qmake automatically if pkg-config fails"
This reverts commit 0045d95a16.

<jeandet> nirbheek, it seems 0045d95a16 is
really wrong, I've tested on Ubuntu.  While writing this line I was
thinking that you can't have Qt without a working qmake in the path. On
Ubuntu you have that qtchooser stuff which is misleading.
2018-06-06 18:35:59 +00:00
Nirbheek Chauhan 56a7d8b2b3 Warn when Apple bitcode support is enabled and in-use
We have to disable some options, so tell the user about them and point
to the documentation so they can read more about it.
2018-06-06 07:53:10 +00:00
Nirbheek Chauhan 3e1a610702 Add a new option for building with Apple bitcode support
Normally, people would just pass -fembed-bitcode in CFLAGS, but this
conflicts with -Wl,-dead_strip_dylibs and -bundle, so we need it as
an option so that those can be quietly disabled.
2018-06-06 07:53:10 +00:00
Nirbheek Chauhan 68001193d3 meson introspect: Fix --installed argument
Traceback (most recent call last):
  File "meson.py", line 29, in <module>
    sys.exit(mesonmain.main())
  File "mesonbuild/mesonmain.py", line 411, in main
    return run(sys.argv[1:], launcher)
  File "mesonbuild/mesonmain.py", line 320, in run
    return mintro.run(remaining_args)
  File "mesonbuild/mintro.py", line 234, in run
    list_installed(installdata)
  File "mesonbuild/mintro.py", line 72, in list_installed
    for path, installdir, aliases, unknown1, unknown2 in installdata.targets:
ValueError: too many values to unpack (expected 5)
2018-06-06 06:59:06 +00:00
Jon Turney f31679dedd Fix non-list used with FeatureNewKwargs
The type of this argument needs checking, or single strings need handling correctly.
2018-06-05 15:57:57 +00:00
Nirbheek Chauhan 48d49afe31 FeatureNew: Add decorators for new install_mode kwargs 2018-06-05 15:57:57 +00:00
Nirbheek Chauhan 9b314c9c24 FeatureNew: add two features that were just merged 2018-06-05 15:57:57 +00:00
Nirbheek Chauhan dff1d8eccf FeatureNew: Print WARNING instead of ERROR
ERROR is reserved for non-zero exit codes. People will probably get
confused.
2018-06-05 15:57:57 +00:00
Nirbheek Chauhan ad0121d259 Add prog/lib dirs from the mingw cross-compiler to PATH
These directories contain DLLs that the executable may need, such as
libstdc++-6.dll, libwinpthread, etc.
2018-06-05 10:50:22 +00:00
Nirbheek Chauhan eb383ef4a2 Automatically add cross-mingw root and sysroot bindir to WINEPATH
This ensures that all the system DLLs required by executables such as
libstdc++-6.dll can be found out of the box and tests can run
2018-06-05 10:50:22 +00:00
Nirbheek Chauhan efa9b75d5d Set WINEPATH when running serialized executables
When the exe runner is `wine` or `wine32` or `wine64`, etc.
This allows people to run tests with wine.

Note that you also have to set WINEPATH to point to your custom
prefix(es) if your tests use external dependencies.

Closes https://github.com/mesonbuild/meson/issues/3620
2018-06-05 10:50:22 +00:00
Niklas Claesson 7fbab2c6e9 Update environment.py
Fix typo in environment.py
2018-06-04 23:46:14 +03:00
Aleksey Filippov 9e10628a69 Use mesonlib.version_compare_many() first value only as an indicator of match 2018-06-03 21:10:56 +00:00
mikolajp 2d1d6c3056 Fix meson multiple version contraint error 2018-06-03 21:10:56 +00:00
Jon Turney 7a15214a69 Have the windows.resource_compiler() preprocesor write a depfile
When using binutils's windres, we can instruct it to invoke the preprocessor
in such a way that it writes a depfile, so that dependencies on #included
files are automatically tracked.

Not implemented for MSVC tools, so skip testing it in that case.
2018-06-03 21:06:23 +00:00
Jon Turney 7e08e958c0 Allow substitutions in custom_target() depfile:
Allow substitutions in custom_target() depfile: as well as in command:
2018-06-03 21:06:23 +00:00
Jon Turney d78fa6ffe3 Install implib where expected if default install_dir: is explicitly given
Install the implib into the default import lib directory if an explicit
install_dir: is given, but the value happens to be the same as the default.
2018-06-03 20:57:03 +00:00
Nirbheek Chauhan 8e8d3231ad Link to our Getting-meson page instead of python.org [skip ci] 2018-06-03 18:59:24 +00:00
Nirbheek Chauhan 107e061506 Error out when someone tries to use msys/python to run Meson
This mistake seems to be a very common hiccup for people trying to use
Meson with MSYS2 on Windows from git or with pip.

msys/python uses POSIX paths with '/' as the root instead of a drive
like `C:/`, and also does not identify the platform as Windows.

This means that configure checks will be wrong, and many build tools
will be unable to parse the paths that are returned by functions in
Python such as shutil.which.

Closes https://github.com/mesonbuild/meson/issues/3653
2018-06-03 18:59:24 +00:00
Marvin Scholz d777ffc040 Fix #mesondefine token error message formatting 2018-06-03 21:28:47 +03:00
Mathieu Duponchelle b3feff3032 test extra paths: add extra paths for all build targets 2018-06-02 11:42:48 +00:00
Mathieu Duponchelle 35ab34d6cd test serialisation: determine windows extra paths ..
..  for executable arguments too.

This makes it possible to pass an executable to a test, which
can then run it in an appropriate environment.
2018-06-02 11:42:48 +00:00
Filipe Brandenburger df2f6a71e7 Make windows_proof_rmtree resilient to read-only files
Start the process by traversing the tree and adding the S_IWRITE and
S_IREAD bits to the file's mode (which are also preserved on Windows.)

This fixes windows_proof_rmtree's inability to remove read-only files,
which was uncovered in testing the new `install_mode` feature.

Tested: ./run_tests.py passes on Linux, appveyor CI on Windows passes.
2018-06-02 04:50:32 +00:00
Filipe Brandenburger 05c43cdcd1 Add 'install_mode' to all installable targets
This makes it possible to customize permissions of all installable
targets, such as executable(), libraries, man pages, header files and
custom or generated targets.

This is useful, for instance, to install setuid/setgid binaries, which
was hard to accomplish without access to this attribute.
2018-06-02 04:50:32 +00:00
Jon Turney aa27f7cec9 Add a depend_files: keyword to windows.compile_resources()
Expose depend_files: from the custom_target this creates.

This is the change suggested in #2815, with tests and documentation added.

Fixes #2789 (duplicate #2830)
2018-06-01 20:21:09 +00:00
Jussi Pakkanen bf2e21ec0e
Merge pull request #3486 from Salamandar/salamandar/meson_version_introspection
Add FeatureNew and FeatureDeprecated, to alert the user of bad meson_version
2018-06-01 22:53:06 +03:00
Nirbheek Chauhan 0a035dea6d Set the meson command to use when we know what it is
Instead of using fragile guessing to figure out how to invoke meson,
set the value when meson is run. Also rework how we pass of
meson_script_launcher to regenchecker.py -- it wasn't even being used

With this change, we only need to guess the meson path when running
the tests, and in that case:

1. If MESON_EXE is set in the env, we know how to run meson
   for project tests.
2. MESON_EXE is not set, which means we run the configure in-process
   for project tests and need to guess what meson to run, so either
   - meson.py is found next to run_tests.py, or
   - meson, meson.py, or meson.exe is in PATH

Otherwise, you can invoke meson in the following ways:

1. meson is installed, and mesonbuild is available in PYTHONPATH:
   - meson, meson.py, meson.exe from PATH
   - python3 -m mesonbuild.mesonmain
   - python3 /path/to/meson.py
   - meson is a shell wrapper to meson.real
2. meson is not installed, and is run from git:
   - Absolute path to meson.py
   - Relative path to meson.py
   - Symlink to meson.py

All these are tested in test_meson_commands.py, except meson.exe since
that involves building the meson msi and installing it.
2018-06-01 19:20:04 +00:00
Mathieu Duponchelle 14750b50ea configure_file: Add output_format kwarg (#3636)
* configure_file: Add output_format kwarg

* docs: Reference-manual.md output_format was added in 0.47 [skip ci]
2018-06-01 17:53:07 +00:00
Salamandar c5e85e59cc Add 0.47.0 features 2018-06-01 14:23:24 +02:00
Salamandar 2fb6018763 Add 0.46.0 features 2018-06-01 14:23:24 +02:00
Salamandar 364b8a37b9 Add 0.45.0 features 2018-06-01 14:23:24 +02:00
Salamandar c90885de6d Add 0.44.0 features 2018-06-01 14:23:24 +02:00
Salamandar 2056172595 Add 0.43.0 features 2018-06-01 14:23:24 +02:00
Salamandar 4741f1e243 Add 0.42.0 features 2018-06-01 14:23:24 +02:00
Salamandar d5207e1c4f Add 0.41.0 features 2018-06-01 14:23:24 +02:00
Salamandar fa6550b277 Add 0.40.0 features 2018-06-01 14:23:24 +02:00
Salamandar a1a53e8de1 Add 0.38.0 features 2018-06-01 14:23:24 +02:00
Salamandar accea4889b Add 0.37.0 features 2018-06-01 14:23:24 +02:00
Salamandar 69230ce4ef print features reports after run 2018-06-01 14:23:24 +02:00
Salamandar 00c4cf7d45 Add Feature{New,Deprecated}Kwargs decorators 2018-06-01 14:23:24 +02:00
Salamandar dd91f96867 Move target_version from coredata to mesonlib 2018-06-01 14:23:24 +02:00
Salamandar b9c37e4fd2 Add set instead of list for used features lits 2018-06-01 14:23:24 +02:00
Salamandar 4978dc0124 Cleanup : have more common code between FeatureNew and FeatureDeprecated 2018-06-01 14:23:24 +02:00
Salamandar 806ab181f2 Split function wrapper from a use() method 2018-06-01 14:23:24 +02:00
Salamandar ae19fec952 Add version_compare_condition_with_{min,max} for specific comparison utils.
Split FeatureNew and FeatureDeprecated
Implement features report to be printed in some 'dev mode'
2018-06-01 14:23:24 +02:00
Salamandar ee2f8a0416 Add basic code for feature version detection:
* store target version
* Add empty method decorator
2018-06-01 14:23:24 +02:00
Filipe Brandenburger 4e0a417763 Revert "commandrunner: make run handle python options"
This reverts commit ab599b5733.
2018-06-01 07:22:41 +00:00
Nirbheek Chauhan f56b402a5b Revert "mesonlib: handle meson exe wrappers"
This reverts commit 0627e9d616.

Breaks installation: https://github.com/mesonbuild/meson/issues/3647

Will be restored once that can be fixed.
2018-05-31 15:40:10 +05:30
Jussi Pakkanen 05f8b1bd78
Merge pull request #3643 from mesonbuild/nirbheek/check_header
New compiler method: check_header
2018-05-30 23:32:31 +03:00
Nirbheek Chauhan 00654aeb11 Don't accept an empty string for name_suffix:
This is never going to be useful, and the error message now points
people to what they might be expecting: use the default value for this
platform.
2018-05-30 23:10:43 +03:00
Martin Kelly 0627e9d616 mesonlib: handle meson exe wrappers
There are cases when it is useful to wrap the main meson executable with
a script that sets up environment variables, passes --cross-file, etc.
For example, in a Yocto SDK, we need to point to the right meson.cross
so that everything "just works", and we need to alter CC, CXX, etc. In
such cases, it can happen that the "meson" found in the path is actually
a wrapper script that invokes the real meson, which may be in another
location (e.g. "meson.real" or similar).

Currently, in such a situation, meson gets confused because it tries to
invoke itself using the "meson" executable (which points to the wrapper
script) instead of the actual meson (which may be called "meson.real" or
similar). In fact, the wrapper script is not necessarily even Python, so
the whole thing fails.

Fix this by using Python imports to directly find mesonmain.py instead
of trying to detect it heuristically. In addition to fixing the wrapper
issue, this should make the detection logic much more robust.
2018-05-30 18:29:16 +00:00
Martin Kelly ab599b5733 commandrunner: make run handle python options
Currently, commandrunner breaks when we give options to python because
it assumes python commands are in the form "python script.py", rather
than "python -u script.py" or "python -u -m module script.py". Extend it
to be more resilient and correctly parse python options.
2018-05-30 18:29:16 +00:00
Martin Kelly 0f86df4d23 make ExternalProgram get_path() a bit smarter
Currently, ExternalProgram get_path() assumes the last component in the
path is always the actual command path. However, this is not always
right. For example, in the command "python -u", we should return
"python" and not "-u". However, in other cases, like "python script.py",
then the last component is the right one.

The heuristic that seems to capture this is to use the last argument
that is still a file. This means options get ignored, but "python
script.py" still works. Let's use this heuristic, at least for now.
2018-05-30 18:29:16 +00:00
Nirbheek Chauhan ff07314a86 New compiler method: check_header
This checks not only for existence, but also for usability of the
header, which means it does a full compilation and not just
pre-processing or __has_include.

Fixes https://github.com/mesonbuild/meson/issues/2246
2018-05-30 15:25:39 +05:30
Christoph Reiter a87496addd Don't raise StopIteration in generators, no longer allowed with Python 3.7. Fixes #3622
Raising StopIteration from a generator has been deprecated with Python 3.5 and is now
an error with Python 3.7: https://docs.python.org/3.8/library/exceptions.html#StopIteration

Just use return instead.
2018-05-29 21:58:49 +03:00
George Koehler 64906b0755 Don't call getpgid() when killing a test.
OpenBSD's getpgid(2) fails with EPERM (PermissionError) because the
test is in a different session: https://man.openbsd.org/getpgid

Use p.pid as the process group ID, because setsid() created a process
group with the same ID as the process.  See setsid(2) manuals:

 - FreeBSD: https://www.freebsd.org/cgi/man.cgi?query=setsid
 - illumos: https://illumos.org/man/setsid
 - Linux: http://man7.org/linux/man-pages/man2/setsid.2.html

This change fixes 'manual tests/8 timeout' on OpenBSD.  To verify this
change, one must run the manual test.  For example,

    $ cd 'manual tests/8 timeout'
    $ meson build
    $ ninja -C build test

It should report that the test timed out, and not show
PermissionError.

Fixes https://github.com/mesonbuild/meson/issues/3569
2018-05-29 02:14:52 +02:00
Jussi Pakkanen cc3e0bc469
Merge pull request #3491 from jeandet/qt_private_headers
Qt private headers
2018-05-27 23:50:30 +03:00
Jussi Pakkanen 320a5865d9 Mark even empty confs used appropriately. 2018-05-25 17:43:06 +03:00
Jussi Pakkanen c8256a30a0
Merge pull request #3578 from MathieuDuponchelle/mkenums_gen_templates
gnome/mkenums: allow passing generated files as templates
2018-05-24 22:30:06 +03:00
Jussi Pakkanen 41ab5166e4
Merge pull request #3476 from filbranden/intbase1
Add support for octal and binary int literals
2018-05-24 22:21:40 +03:00
Jussi Pakkanen 160da30732 Typos are fun. [skip ci] 2018-05-24 22:19:49 +03:00
Nirbheek Chauhan 1ffbddc31a backends: Also accept dylibs while finding RPATHs 2018-05-24 14:38:28 +00:00
Nirbheek Chauhan fecd580687 backends: Simplify loop getting rpaths for bundled libs
No functionality changes
2018-05-24 14:38:28 +00:00
Nirbheek Chauhan 165da6fb65 backends: Use a set while gathering RPATHs 2018-05-24 14:38:28 +00:00
Nirbheek Chauhan 9f616e98bf depfixer: Run install_name_tool only once while deleting rpaths 2018-05-24 14:38:28 +00:00
Nirbheek Chauhan a6c9f98c57 depfixer: We no longer run this as a script 2018-05-24 14:38:28 +00:00
Mathieu Duponchelle 6dd896d001 gnome/mkenums: allow passing generated files as templates 2018-05-23 23:23:08 +02:00
Filipe Brandenburger 86d2f57e86 Add support for octal and binary int literals.
Simplify support for alternate bases using int(..., base=0) which
auto-detects it using the standard Python syntax for numbers.

Octal numbers are useful to specify permission bits and umasks.

Binary numbers are not super useful... But considering we get them for
free, let's allow them here too.

v2: Tweak the regex so it doesn't accept a decimal number with a leading
zero, which is invalid for int(..., base=0) and would raise a ValueError
if passed around.
2018-05-23 14:07:38 -07:00
Tim-Philipp Müller 8d040fad6e Print project version 2018-05-23 22:46:29 +03:00
Tim-Philipp Müller d4ee534155 interpreter: fix configure_file() message on empty configuration_data() [skip ci]
The 'copy' kwarg will appear in the upcoming 0.47 release, not 0.46.
2018-05-23 15:02:27 +00:00
Jussi Pakkanen 55a0831bc3
Merge pull request #3383 from mesonbuild/nirbheek/configure-file-nodata
configure_file: Add a new action 'copy'
2018-05-22 21:09:19 +03:00
Jussi Pakkanen 9ecd92c6fe
Merge pull request #3490 from MathieuDuponchelle/dict_builtin
Add new built-in type, dict
2018-05-22 20:46:26 +03:00
Andrei Alexeyev d72f9a3e0f
Add 'check' kwarg for run_command
Closes #3516
2018-05-22 04:45:31 +03:00
Nirbheek Chauhan f5af0f9b5a configure_file: Don't use reserved keyword 'format'
Might lead to weird bugs
2018-05-22 02:37:07 +05:30
Nirbheek Chauhan a00433fdbc configure_file: Add a new action 'copy'
This will copy the file to the build directory without trying to read
it or substitute values into it.

Also do this optimization if the configuration_data() object passed to
the `configuration:` kwarg is empty, and print a warning about it.

See also: https://github.com/mesonbuild/meson/issues/1542
2018-05-22 02:36:55 +05:30
Xavier Claessens b3f74b9c3a Windows: Fix exception when windres is not found
If rescomp is not found its command is None and that make meson print
backtrace instead of displaying the error message.
2018-05-21 23:29:06 +03:00
Matthew Krupcale 45cc001a40 Add support for finding libraries in Fortran projects
* mesonbuild/compilers/c.py: Make the `find_library` method more generic by allowing the user to supply the `code` for compiling and linking.
 * mesonbuild/compilers/fortran.py: Use the methods inherited from `Compiler` base class where appropriate. Also reuse `CComiler` methods where applicable. This should be sufficient to get various compiler/linker arguments as well as to compile and link Fortran programs. This was tested with `gfortran` compiler, and while the other compilers ought to work for simple cases, their methods are primarily inherited from the base `FortranCompiler` class.
 * test cases/fortran/10 find library/gzip.f90: Fortran module with some basic Fortran wrapper interfaces to `gzopen`, `gzwrite`, and `gzclose` C `zlib` functions.
 * test cases/fortran/10 find library/main.f90: Fortran program using the `gzip` Fortran interface module to write some data to a gzip file.
 * test cases/fortran/10 find library/meson.build: Meson build file for this test case. This demonstrates the ability to link the Fortran program against an external library.
2018-05-21 23:17:02 +03:00
Nirbheek Chauhan cf5fe1d440 for_darwin: Also accept system='ios' in cross files 2018-05-21 23:19:38 +05:30
Mathieu Duponchelle 10e7566ed8 dict: fix CI issues 2018-05-21 00:19:31 +02:00
Jussi Pakkanen e3be7f7021 Write coredata transactionally. Closes #3511. 2018-05-21 00:48:25 +03:00
Mathieu Duponchelle 195c356f91 dict: address review comments 2018-05-20 22:36:18 +02:00
Kyrylo Shpytsya 09dc48d941 Add methods to the dict builtin
Adds "has_key" and "get".

Adapted and updated by Mathieu Duponchelle <mathieu@centricular.com>
2018-05-20 21:19:44 +02:00
Mathieu Duponchelle ecb8838082 Add new built-in type, dict
For now dicts are immutable, and do not expose any methods,
they however support "native" syntax such as [] lookup,
and foreach iterating, and can be printed.
2018-05-20 21:19:44 +02:00
Ryan Gonzalez 7e8c099387 Print message when using polkit 2018-05-18 17:12:24 +03:00
Ryan Gonzalez 60352521d1 Fix #3579: Wait for a permissions failure before trying to run pkexec 2018-05-18 17:12:24 +03:00
Jon Turney 13e92223be Generalize message about fallback failure
The fallback might be not used not only because it couldn't be found, but
also because something went wrong trying to use it.

Also, update a test which relies on the specific text
2018-05-17 00:26:58 +03:00
Jon Turney 0e898def93 Improve reporting about falling back to a subproject for a dependency 2018-05-17 00:26:58 +03:00
Jussi Pakkanen 4d7ff40460
Merge pull request #3577 from noverby/wip/rib/java-codegen
Include target build directory while compiling Java, for generated code dependencies (Polished)
2018-05-17 00:23:43 +03:00
Ryan Gonzalez 559286a0da Support installation via polkit 2018-05-17 00:23:18 +03:00
Robert Bragg ec7b834b6e ninja: add build dir to javac -sourcepath
To allow the javac -implicit:class behaviour to know where to find
generated .java files then the build directory for the target is also
added to the -sourcefile path.
2018-05-16 14:53:30 +02:00
Robert Bragg 61dd46811b ninja: avoid needing include_directory('.') with jar()
Although only one file is passed to javac at a time, if your code has
any inter-file dependencies javac still needs to know how to find other
source files for its -implicit:class feature to work whereby it will
automatically also compile files that the given file depends on.

-implicit:class is the default, practical, behaviour of javac since
otherwise it would be necessary to declare the class dependencies
for parallel java builds to be feasible.

Passing "include_directory: include_directory('.')" to jar() causes
-souredir <path/to/top/of/java/src> to be passed to javac which then
enables your source code to have inter-file class dependencies -
assuming none of your source code is generated.

This ensures that '.' is included by default.
2018-05-16 14:53:30 +02:00
Robert Bragg 65b730bd59 ninja: pass separated paths to javac -sourcepath
The -sourcepath option can't be passed multiple times to javac, since it
simply overrides prior arguments. Instead -sourcepath takes a colon (or
semi-colon on windows) separated list of paths.
2018-05-16 14:53:30 +02:00
Nirbheek Chauhan 8a9f7cf133 vala: Fix shared_module linking with export_dynamic executable
Need to generate a vapi and a header, and then use that in the shared
module. Needed for GNOME games.

Closes https://github.com/mesonbuild/meson/issues/3538
2018-05-10 12:31:04 +02:00
Nirbheek Chauhan 9565293f16 test setups: Inherit env when using a test setup
Closes https://github.com/mesonbuild/meson/issues/3525
2018-05-10 12:30:47 +02:00
Jussi Pakkanen 05e4298dc5
Merge pull request #3539 from mesonbuild/nirbheek/fix-gtkdoc-content-files-File
gnome: some gtk-doc and gdbus-codegen issues
2018-05-09 23:11:57 +02:00
Nirbheek Chauhan ed701b5cb0 Revert "Add macOS linker versioning information"
This reverts commit fa6ca16054.

Closes https://github.com/mesonbuild/meson/issues/3550
2018-05-09 23:11:15 +02:00
Mathieu Duponchelle dc91aad420 args flattening: preserve configuration_data.set behaviour
It seems that some projects relied on the previously buggy
behaviour of accepting a 2-element list as the single argument
to configuration_data.set().

Special-case this behaviour, and emit a deprecation message.
2018-05-09 18:00:36 +02:00
Nirbheek Chauhan 86cc4f2707 gdbus_codegen: Guess the output list for docbook generation
We were setting it to a file list that would always be wrong, and
always out of date since it would never exist.

However, the output list is not predictable. It usually has a 1-1
relationship with the input XML files, but it may not.

This must be fixed later with API for users to provide the output
names.

See: https://github.com/mesonbuild/meson/pull/3539
2018-05-09 21:04:55 +05:30
Nirbheek Chauhan 7ca2b8caca gtkdoc: Fix typo that made xml_files an array of arrays 2018-05-09 21:04:19 +05:30
Nirbheek Chauhan 6485f04c16 introspect: Fix listing target files that are File objects 2018-05-09 21:01:00 +05:30
Nirbheek Chauhan c1f275bfa6 gnome.gtkdoc: Allow passing file objects as xml_files
If we pass a source files() object, we will look for it in the build
directory, which is wrong. If we pass a build files() object (from
configure_file()), we will find it in the build directory, and then
try to copy it on top of itself in gtkdochelper.py getting a
SameFileError.

Add a test for it, and also properly iterate custom target outputs
when adding to content files.
2018-05-06 20:25:16 +05:30
Nirbheek Chauhan c5865c50c4 gnome: Use the header basename for #include in mkenums_simple
Otherwise, when you use a File target, the value will be the full path
to the header from the build root, which is not what anyone wants.
2018-05-05 17:33:29 +02:00
Nirbheek Chauhan 45aa57f660 gnome: Update minimum glib version for gdbus-codegen
The fix has landed upstream, and will be in the next glib stable
release. I have verified that it fixes the problem described in #3488
and that the 'frameworks/7 gnome' test passes now.
2018-05-05 11:36:46 +03:00
Jasper Lievisse Adriaanse 3729e127ff add linker flag to handle $ORIGIN on OpenBSD 2018-05-04 23:42:04 +00:00
Nirbheek Chauhan 2e0485bb9b gnome: Disable usage of new --body and --header args
The new --body and --header args are broken because they do not allow
the use of --output-directory to set the correct `#include "foo.h"`
line in `foo.c`. The changes in the gdbus test case show this.

Disabled till this can be fixed in glib.

Closes https://github.com/mesonbuild/meson/issues/3488
2018-05-04 23:00:23 +03:00
Mathieu Duponchelle f1c92d7c9c Interpreter: don't flatten the arguments of various methods
this fixes eg set_variable('foo', ['bar', 'baz']), which
was previously erroring out complaining about the number
of arguments.

Closes #1481
2018-05-04 15:24:21 +00:00
Jussi Pakkanen 8b9fe0efff No longer require duplicate gtest header install. 2018-05-04 11:46:22 +00:00
Mathieu Duponchelle 8bda86faab python module: make it work with pypy
pypy installations don't usuallyy ship with pkg-config files,
we thus need to replicate what their version of distutils does.

In addition, we also try our best to build against other
pythons that do not have pkg-config files.
2018-05-03 18:50:40 +05:30
Jussi Pakkanen a2fdaa9ea0 Can use C++ and FORTRAN in a single target. Closes #2685. 2018-05-02 22:58:07 +03:00
Jussi Pakkanen 1918c0d231 Can combine D and C++ in a single target. Closes #3125. 2018-05-02 22:50:15 +03:00
Nirbheek Chauhan badbfa125c pkgconfig: Don't expose internal libraries in .pc files
Libraries that have been linked with link_whole: are internal
implementation details and should never be exposed to the outside
world in either Libs: or Libs.private:

Closes https://github.com/mesonbuild/meson/issues/3509
2018-05-02 11:46:47 +00:00
Jussi Pakkanen 2b5766980b Keep separator spaces in pkg-config declarations. Closes #3479. 2018-05-02 11:46:47 +00:00
David Seifert d28e6c6153 Allow `required : false` for OpenMP dependency
* Currently `required : true` is implicitly assumed, making
  optional use of OpenMP not possible.
2018-05-02 11:44:53 +00:00
Isabella Muerte 91c1cc6f9e Add VT100 ANSI escape sequences for Windows 10.
This change still relies on the older 'ANSICON' environment check as a
fallback, in the event we're on "not Windows 10". (Calling
`SetConsoleMode` with unsupported values results in a 0 being returned)
2018-05-01 20:17:14 +03:00
Jussi Pakkanen d3ff7d44ab Made depfixer more robust on OSX. Closes #3493. 2018-05-01 12:10:25 +00:00
Xavier Claessens 24f1b96dde Fix setting c_args and friends from command line
When passing more than one -Dc_args it should override the value
instead of appending. This is how all other options works.

Value should be split on spaces using shlex just like it does with
CFLAGS environment variable.

Fixes #3473.
2018-05-01 12:09:45 +00:00
Niklas Claesson 4f4cdee687 Allow custom_target do depend on indexed output of custom_target
Fixes: #3494
2018-05-01 11:51:55 +00:00
Xavier Claessens 8c381e1786 has_multi_link_arguments: Some compilers needs -Wl,--fatal-warnings
ld does not treat wrong -z options as fatal by default.
2018-04-30 16:06:24 +00:00
Alexis Jeandet f3a8efc11b Added Added Qt's private header support with pkg-config
Just use the same approach than qmake to generate private headers path

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-04-30 11:43:54 +02:00
Jussi Pakkanen d52f892de9
Merge pull request #3485 from xclaesse/warnlevel
--warnlevel got renamed to --warning-level
2018-04-29 20:27:43 +03:00
Alexis Jeandet f784ee62ea Fixed private headers on OSX with framework stuff
Removed Qt4 private headers test since it's hard to get Qt4 private
headers installed on CI.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-04-28 23:36:05 +02:00
Alexis Jeandet 0045d95a16 really switch to qmake automatically if pkg-config fails
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-04-28 18:23:26 +02:00
Alexis Jeandet 2fc0a11062 [Qt module] Privates headers: Implemented private_headers option
This commit adds private_headers option in dependency method which tells
QtDependency to add private headers include path to build flags.
Since there is no easy way to do this with pkg-config only qmake method
supports this, so with private_headers set qmake will always be used.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-04-28 17:14:31 +02:00
Jussi Pakkanen ccaf5711cd Install generated gdbus header with old glib version too. 2018-04-28 00:19:29 +03:00
Nirbheek Chauhan 900c23f98a New argument: --profile-self for profiling performance
Outputs two profile logs: one for the interpreter run and another for
the backend-specific build file generation. Both are stored in
meson-private in the build directory.
2018-04-27 23:14:16 +03:00
Xavier Claessens 6de68e5201 Passing --default-library=both should override project value
Looks like this has always been broken, had_argument_for() was checking
if we have --default_library instead of --default-library.
2018-04-27 11:19:12 -04:00
Xavier Claessens 570c108635 Fix --warnlevel being renamed to --warning-level in latest release 2018-04-27 11:09:14 -04:00
Xavier Claessens cb5ad2f211 Remove duplicated definition of -D cmdline arg 2018-04-26 22:46:40 -04:00
Martin Hostettler 3ad45ef94e CCompiler: Cache result of get_library_dirs().
It is repeatedly used by e.g. guess_external_link_dependencies.
2018-04-27 02:10:21 +00:00
Martin Hostettler ab17476355 guess_external_link_dependencies: deduplicate search dirs and libraries.
Reduce speed impact of duplicated libs and pathes in the link command
line. (fixes #3465)
2018-04-27 02:10:21 +00:00
Jussi Pakkanen 9b0453d3e9
Merge pull request #3225 from filbranden/fixperms3
Introduce install_umask to determine permissions of files in install tree. Default it to 022
2018-04-26 23:14:00 +03:00
Jussi Pakkanen 9c073620aa
Merge pull request #3372 from NickeZ/vs-sol-folders
Use visual studio solution directories
2018-04-26 00:47:11 +03:00
Filipe Brandenburger 170776d626 Add install_umask to list of options of `meson configure`
Tested:

  $ ./meson.py configure --help
  [...]
    --install-umask INSTALL_UMASK
                          Default umask to apply on permissions of installed
                          files (default: 022).
2018-04-25 14:11:06 -07:00
Xavier Claessens 10a9bdad96 interpreter: Verify permitted kwargs on all methods 2018-04-26 00:01:48 +03:00
Jussi Pakkanen d2f8f7e312 Bump version number for new development. [skip ci] 2018-04-23 23:11:34 +03:00
Jussi Pakkanen ade59f987f Updated version number for new release. 2018-04-23 03:24:26 +03:00
Jussi Pakkanen 04952fe220
Merge pull request #3446 from MathieuDuponchelle/python_module_with_doc
modules/python: add some more options around path and config_vars
2018-04-22 18:55:30 +03:00
Niklas Claesson cb0960a91e Remove escaping for triple-quoted strings
Fixes #3429
2018-04-21 22:57:19 +03:00
Havard Graff 14db3861d8 modules/python: add some more options around path and config_vars
What is actually defined here varies wildly on different python-versions
for different platforms.
On my python2.7 on Windows len(sysconfig.get_config_vars()) returns 17,
whereas in my Ubuntu that number is 517!

Hence it is useful to be able to check which keys are available, as
well as allowing specifying a default option.
2018-04-21 19:50:53 +02:00
Nirbheek Chauhan 74404db469 gnome: If pkg-config is not found, assume glib is 2.54 (#3443)
* gnome: If pkg-config is not found, assume glib is 2.0

Checking the pkg-config file to confirm tool versions is a hack, and
should eventually be replaced with checking the actual versions of the
tools.

* gnome: Actually assume glib version is 2.54 if not found

It is actually not possible to build most projects with the GNOME
module if your glib is older, particularly genmarshal and
gdbus-codegen generate unusable output without newer arguments that
were added for Meson.
2018-04-21 17:05:31 +03:00
Nirbheek Chauhan a015804049 ninja backend: Fix shared library symbols path
The entire subdirectory was getting duplicated, which was exceeding the
max path limit in Python on Windows and causing build failures.

Example:

subprojects/gst-plugins-bad/gst-libs/gst/uridownloader/subprojects@gst-plugins-bad@gst-libs@gst@uridownloader@@gsturidownloader-1.0@sha/subprojects/gst-plugins-bad/gst-libs/gst/uridownloader/gsturidownloader-1.0-0.dll.symbols

This path is too long and opening it will cause a FileNotFoundError on
Windows.
2018-04-21 16:59:33 +03:00
Elliott Sales de Andrade 78495b21e7 Fix Fortran dep hack when cross-compiling. 2018-04-21 16:58:01 +03:00
Nirbheek Chauhan fc5e8dfcda Don't fail on not-required not-found deps in forcefallback mode
This involves the creation of a new dummy NotFoundDependency.
2018-04-21 16:10:03 +03:00
Nirbheek Chauhan b5c919ebfe gnome: gdbus-codegen add a `sources:` kwarg
It accepts multiple XML files, not just one. For example, glib uses
it that way.
2018-04-20 18:24:18 +00:00
Martin Hostettler 247b1a598a regression: pkgconfig module: Fix Fix regression in Requires.private generation.
The fix for Requires generation in #3406 missed a second code path with the same
problem.

Passing a pkgconfig dependency to requires would produce Q, t, 5, C, o,r, e'
instead of 'Qt5Core'.

This was introduced in 8efd940.
2018-04-20 00:59:06 +03:00
Jussi Pakkanen 2b3562cc3a
Merge pull request #3404 from xclaesse/extract-recursive
extract_all_objects(): Recursively extract objects
2018-04-20 00:58:08 +03:00
Bruce Richardson 11ebe0bfee cache the generated headers for each target
Once we calculate the generated headers for a target we can cache them to
speed up future calls for that target.
2018-04-19 11:41:14 +00:00
Xavier Claessens 2b93852a2e CCompiler: Do not call to_native() twice
compile() method already does it so links() and compiles() shouldn't do
it too. This fix regression introduced in 3d91a08b.

Closes #3431
2018-04-19 11:37:35 +00:00
Xavier Claessens 9a82b0136a extract_all_objects: Add 'recursive' keyword argument
To maintain backward compatibility we cannot add recursive objects by
default. Print a warning when there are recursive objects to be pulled
and the argument is not set. After a while we'll do pull recursive
objects by default.
2018-04-18 14:54:52 -04:00
Xavier Claessens 60aaee55d4 extract_all_objects(): Recursively extract objects
Fixes #3401
2018-04-18 14:54:52 -04:00
Xavier Claessens b0e4d4047b Fix using object extracted from a unity build
- determine_ext_objs: What matters is if extobj.target is a unity build,
  not if the target using those objects is a unity build.
- determine_ext_objs: Return one object file per compiler, taking into
  account generated sources.
- object_filename_from_source: No need to special-case unity build, it
  does the same thing in both code paths.
- check_unity_compatible: For each compiler we must extract either none
  or all its sources, taking into account generated sources.
2018-04-18 14:49:52 -04:00
Filipe Brandenburger b0382733d8 Update default of install-umask to 022
And, with that, update the test cases that checked that preserving the
original permissions worked to set install_umask=preserve explicitly in
those projects' default_options.

Tested: ./run_tests.py
2018-04-18 11:44:54 -07:00
Filipe Brandenburger 8651d55c6a Add new builtin option --install-umask
This option controls the permissions of installed files (except for
those specified explicitly using install_mode option, e.g. in
install_data rules.)

An install-umask of 022 will install all binaries, directories and
executable files with mode rwxr-xr-x, while all data and non-executable
files will be installed with mode rw-r--r--.

Setting install-umask to the string 'preserve' will disable this
feature, keeping the permissions of installed files same as the files in
the build tree (or source tree for install_data and install_subdir.)
Note that, in this case, the umask used when building and that used when
checking out the source tree will leak into the install tree.

Keep the default as 'preserve', to show that no behavior is changed and
all tests keep passing unchanged.

Tested: ./run_tests.py
2018-04-18 11:44:54 -07:00
Iñigo Martínez a52543cd1e gdbus_codegen: Fix install_dir parameter
The `install` parameter that is present in the `permittedKwargs`
annotation is wrong. The correct parameter name, which is also
consistent with the rest of functions in the `gnome` module, is
`install_dir`.
2018-04-18 21:15:52 +03:00
Niklas Claesson c6e03b9535 Use visual studio solution directories
This implements support for visual studio solution directories.
Projects will by default be put into directories that map their sub-directory
name in the source folder. No directories are created if `--layout=flat` is used.

Fixes: #2524
2018-04-17 23:41:03 +02:00
Niklas Claesson e50a5c1311 Fix vs flat layout bug 2018-04-17 23:41:03 +02:00
Jussi Pakkanen 628f910760
Merge pull request #3314 from sarum9in/test_depends
Add test(depends) keyword parameter
2018-04-18 00:40:52 +03:00
Jussi Pakkanen 9790f2d500 Made Python module match the new init interface. 2018-04-18 00:20:52 +03:00
Dylan Baker 92487ea33d Add partial_dependency method to dependencies
This adds a new method, partial_dependency to all dependencies. These
sub dependencies are copies of the original dependency, but with one or
more of the attributes replaced with an empty list. This allows creating
a sub dependency that has only cflags or drops link_arguments, for
example.
2018-04-17 23:33:31 +03:00
Jussi Pakkanen 1952ef5ae1
Merge pull request #3243 from dcbaker/accept-d-setup
Accept -D for meson level options durring initial configuration
2018-04-17 23:29:15 +03:00
Jussi Pakkanen 8ee1e49ae6
Merge pull request #3353 from xclaesse/has-link-argument
Add has_link_argument() and friends
2018-04-17 23:26:53 +03:00
Jussi Pakkanen 3fc1ca8687
Merge pull request #3240 from MathieuDuponchelle/python_module
Implement a generic python module
2018-04-17 23:17:43 +03:00
Jussi Pakkanen 88ca3805e7
Merge pull request #1852 from QuLogic/openmp
Add an OpenMP dependency.
2018-04-17 21:39:13 +03:00
Dylan Baker 1c48cc08e0 mconf: accept -- options like `meson` does
I'm not really happy about this to be honest, I don't like having both
-- and -D options, I think it's stupid to have two ways to do exactly
the same thing, especially since we then have to validate that someone
hasn't passed the argument both ways.

However, other people want this, so here it is.

Fixes #969
2018-04-17 11:32:26 -07:00
Dylan Baker 8120ff9cf7 Move builtin_argument_registration to coredata
We're going to want to use these functions in meson configure as well to
make the command line options the same between `meson` and `meson
configure`.
2018-04-17 11:32:26 -07:00
Dylan Baker 78e37c4953 Accept builtin options with -D when making initial meson call
Currently meson only accepts `-Dopt=value` for builtin options when
calling `meson configure` and `--opt=value` for builtin options when
calling `meson` initially. This is a confusing behavior, and users only
get a small warning at the top of a potentially long configuration
summary to catch this.

This has confused end users and developers alike, there are at least 5
duplicates of the bug this fixes, and I have personally been asked about
this more times than I can count. The help documentation doesn't make
it clear that -D cannot be used to set options like prefix and bindir.

This adds support for -D options to the initial meson call, but not --
options to the meson configure call. I think it's better to have one way
to do things, and -- options are kinda one off while -D is used
everywhere else, so lets stick with that.

Related #969
2018-04-17 11:32:26 -07:00