#655 meson buildsystem guidelines
Closed: accepted 2 years ago Opened 2 years ago by ignatenkobrain.

For quite some time[0] there is Meson buildsystem -- http://mesonbuild.com/.

Basically it's like automake for make, but meson for ninja-build.

I've added[1] couple or RPM macro into ninja-build package (like verbose output and %{?_smp_mflags}) as we will need that to use from %meson_install/test/whatsoever.

There is also PR[2] to upstream to add macro which I'm planning to use in next meson version.

I'm planning to come up with draft for next mtg. Basically it will be something like:
{{{
...
BuildRequires: meson
...
%build
%meson
%meson_build
...
%install
%meson_install
...
%check
%meson_test
...
}}}
I want to write a page linked in official guidelines that maintainers will not need to struggle and search how to package stuff properly (note that in the future GStreamer will be built using meson).

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1184381
[1] http://pkgs.fedoraproject.org/cgit/rpms/ninja-build.git/commit/?id=5604780f551039bf414e3f51b08d522d0a696064
[2] https://github.com/mesonbuild/meson/pull/875


Certainly seems like a good idea. It's not immediately obvious why you'd need a separate %meson call but I'm guessing you're following the %configure/%make_build pattern. It's probably not technically necessary to do that but also probably not worth saving one line in the cases where you don't have to pass options to %meson.

Replying to [comment:1 tibbs]:

Certainly seems like a good idea. It's not immediately obvious why you'd need a separate %meson call but I'm guessing you're following the %configure/%make_build pattern. It's probably not technically necessary to do that but also probably not worth saving one line in the cases where you don't have to pass options to %meson.
basically %meson is like %cmake/%configure. Then we could use %ninja_build / %ninja_install / %ninja_test, but I'm not certainly sure if we want that. I'm open to suggestions.

I added couple of simple pages about ninja and meson.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2016-10-13/fpc.2016-10-13-16.00.txt):

[PATCH] [redhat-rpm-config] add VPATH macro
0001-add-VPATH-macro.patch

Unfortunately discussion on packaging@ didn't help at all and was completely forgotten couple of months back, so I just went ahead and tried to do all my best.

1st patch is for redhat-rpm-config, 2nd is for meson.

I also updated draft: https://fedoraproject.org/w/index.php?title=PackagingDrafts%2FMeson&diff=482339&oldid=476910

Hopefully we can finally proceed, because today I had to fix packages which use meson and are not aware about proper syntax (CFLAGS, LDFLAGS, directories and etc. were completely ignored):
https://src.fedoraproject.org/cgit/rpms/gstreamer1-plugin-mpg123.git/commit/?id=53a8772a6de289321349e767c7f7522c83b31f50
https://src.fedoraproject.org/cgit/rpms/gst-transcoder.git/commit/?id=6e96ae4e85f5d5629857d3b4057f639b1043ed7d
* https://src.fedoraproject.org/cgit/rpms/pitivi.git/commit/?id=9252c9b41cf3f1f227a58d40a0de065e3eed2391

Right now many of GNOME developers (https://github.com/ebassi/graphene/commit/fea8dcc326abfc127753bce402ccb1297cc44797), wayland developers (https://lists.freedesktop.org/archives/wayland-devel/2016-November/031984.html) and others are switching to meson and soon-ish that software will be released and due to missing guidelines we will have mess.

Providing best experience is my target, however I don't have that much time so please help me to finally push this.

Current status:

Sorry, late:

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2016-12-15/fpc.2016-12-15-17.00.txt):

Replying to [comment:6 tibbs]:

An update has been created for the el7 branch epel-rpm-macros with the vpath macros: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-1861e967a3 I'm not sure what will happen with meson.

Meson currently is not in EPEL (only in my personal COPR), but at some point I will get it into EPEL7.

Metadata Update from @ignatenkobrain:
- Issue assigned to tibbs

2 years ago

@tibbs could you please also link the meson guidelines page on the main one? People have been asking me couple of time on IRC about this. Thanks.

Metadata Update from @ignatenkobrain:
- Issue close_status updated to: None

2 years ago

Metadata Update from @tibbs:
- Issue tagged with: writeup

2 years ago

Metadata Update from @tibbs:
- Issue untagged with: writeup
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

2 years ago

Login to comment on this ticket.

Metadata