Open albfan opened 5 years ago
Looks great overall. The only missing thing is the Travis CI configuration.
Since we're running Xenial, Meson and Ninja are already in the official package repositories, so it should not be too difficult to setup.
Travis CI integration fixed. There's a problem with gir generation, so I disable it:
[16/17] Generating Yaml-1.0.0.gir with a custom command.
g-ir-scanner: link: gcc -pthread -o /home/alberto/projects/vala/libyaml-glib/build/tmp-introspectb7mq26_6/Yaml-1.0.0 /home/alberto/projects/vala/libyaml-glib/build/tmp-introspectb7mq26_6/Yaml-1.0.0.o -L. -Wl,-rpath,. -Wl,--no-as-needed -L/home/alberto/projects/vala/libyaml-glib/build/src -Wl,-rpath,/home/alberto/projects/vala/libyaml-glib/build/src -lyaml-glib-1 -lgirepository-1.0 -lgobject-2.0 -lglib-2.0 -lyaml -lgmodule-2.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0 -lglib-2.0
<unknown>:: Error: Yaml: Namespace is empty; likely causes are:
* Not including .h files to be scanned
* Broken --identifier-prefix
[17/17] Generating Yaml-1.0.0.typelib with a custom command.
Is the .gir build broken only on travis? Do we need the gir file for vala binding or python binding, or is the typelib alone sufficient? I do not quite remember -- it has been a while I last touched g-ir.
It 's failing for me on Arch Linux.
We need it for bindings yes.
@albfan You still need to address the version numbers suffixes on the files.
For headers, you need to have an include subdir with the major-minor
suffix. Something like include/yaml-glib-1.0/yaml-glib.h
.
For pkg-config, GIR, typelib and VAPI, a major-minor
suffix on files.
For the shared library, a lib version suffice, but you can also add the major-minor
suffix as well.
One convenient thing is to introduce an api_version
variable that is bumped only with API/ABI breakage occurs and do that independently of the project version.
There's a header in build dir
$ ls -1 build/src/*.h
build/src/yaml-glib-1.h
but not sure how to add to command:
https://mesonbuild.com/Gnome-module.html#gnomegenerate_gir
Looking into gitg we don't use generate_gir, but a custom command, maybe is because of that, not sure.
https://gitlab.gnome.org/GNOME/gitg/blob/master/libgitg/meson.build#L173
To ease usage, remove autotools and migrate to meson.
Test suite is added too.