hughsie/colord

Meson style guidelines

Closed this issue · 9 comments

Would you consider following the style guidelines here: https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

It would help to have more consistency with other projects. Thanks.

What specifically are we doing differently?

Only ones I noticed are from these guidelines:

  1. Drop the enable from --enable-foo boolean options; Meson has boolean values, so -Denable-foo=true would read as redundant, and -Denable-foo=false would read as contradictory. Use -Dfoo=true or -Dfoo=false instead

There are 12 options with enable-foo.

  1. Similarly, you should drop with from --with-bar options

There are 2 options with-foo.

  1. Use a consistent separator character for multi-word options, preferably the underscore _, like cert_file or cups_print_backend

There is 8 multi-word options using '-'. Everything else looks fine otherwise.

Could you have a go at a PR please? It should be a simple case of search&replace.

Sure, is there any simple docs to guide me. I'm new to this.

Ok, so I've been working on it and it seems to mostly work except meson doesn't like when I change the enable-vala to just vala. It gives me this error when configuring colord:

meson_options.txt:9:0: ERROR: Option name vala is reserved.

If I change all the others and leave the vala one as enable-vala, I can configure and build fine.

Ok, so I just looked at another project, NetworkManager, to see how they handle vala bindings. They call it 'vapi', so that's what I changed it to. Everything seems to work fine now. I also updated the Readme to give instructions for compiling with meson on Linux. The Windows one probably needs to be updated, but I don't know what they are.

Can you squash the commits down into one please, and then force push the branch to update the PR. Then it looks good to merge, thanks!

Ok, I hope I did it right.

Looks great, thanks! Merged.