Fix symbol export with MSVC when features are disabled,
such as GLib. We need to generate the list of exported
symbols on the fly to make sure we only export symbols
that are actually available.
Needs some minor modifications to the gen-def.py script:
- accept header list also via command line args; we can't
pass things to a configure_file() command via the environment
in Meson.
- strip any leading 'src/' from library filename. This might
be there because in Meson the script might be called from
the top-level directory and not the current source directory.
Remove .def files again which had been checked in for earlier
versions of the Meson port.
When one is not using the msys2 python, the header files that are passed in as environment
variable cannot be found.
https://ci.appveyor.com/project/fonttools/ttfautohint-py/build/1.0.65/job/rkremny4jjid9nl2#L803
This is because msys2 shell and make use POSIX paths (e.g. /c/Users/clupo/...)
whereas non-msys2 python.exe uses native Windows paths (e.g. C:\Users\clupo\...).
Msys2 will automatically convert command line arguments (but not environment variables) from
POSIX to Windows paths when calling a native win32 executable, so we pass the header paths
as arguments instead of environment variables.
This way the gen-def.py script can support both mingw python running in an MSYS2 shell, and
native win32 python.