Commit Graph

11 Commits

Author SHA1 Message Date
Marc-André Lureau
adddbb3976 meson: bump meson req to 0.56
It's from Oct 2020, and widely available on various distro or backports.

Fix related meson warnings.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2023-01-23 12:05:06 +04:00
Victor Toso
3fa9c072be Remove PulseAudio backend
GStreamer is a hard requirement since ac0e50f or v0.36 wich is the
same release that PulseAudio backend was deprecated:

    9a4b3bc "build-sys: deprecate the pulseaudio backend" in 2019-01-14

Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-03-17 18:25:38 +01:00
Frediano Ziglio
922fa9ba07 build: Exclude spicy files from reference
The files are not in src so not included anyway.

Acked-by: Francesco Giudici <fgiudici@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-02-19 09:52:39 +01:00
Frediano Ziglio
946cfc831d build: Remove reference to not existing file
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-02-06 16:45:09 +00:00
Frediano Ziglio
ecd4a776b3 build: Replace "join_paths" with "/" operator
Supported by Meson 0.49 (required by Spice-GTK).
New syntax is shorter and is recommended in
https://mesonbuild.com/Release-notes-for-0-49-0.html
("Joining paths with /").

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
2019-08-21 12:08:12 +01:00
Marc-André Lureau
9a6ffbac5f meson: use gtk-doc --rebuild-types
Since gtk-doc 1.8, no need to maintain a types file!

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2019-07-09 11:05:34 +01:00
Marc-André Lureau
a73b59b327 meson: improve gtk-doc build
- Fix the following warnings:
./spice-gtk-sections.txt:467: warning: No declaration found for SPICE_GTK_CHECK_VERSION.
./spice-gtk-sections.txt:468: warning: No declaration found for SPICE_GTK_MAJOR_VERSION.
./spice-gtk-sections.txt:469: warning: No declaration found for SPICE_GTK_MICRO_VERSION.
./spice-gtk-sections.txt:470: warning: No declaration found for SPICE_GTK_MINOR_VERSION.

- fixxref for glib and gtk (thus requires gtk+ to build doc)

- And other minor simplifications.

After autotools is removed, we should try to use --rebuild-types. For
now I prefer not to touch it :)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2019-05-29 11:43:51 +01:00
Marc-André Lureau
5b3207701b meson: remove some meson-spice-gtk-doc warnings
../src/./spice-audio.h:22:2: warning: #warning "Only <spice-client.h> can be included directly" [-Wcpp]
 #warning "Only <spice-client.h> can be included directly"
  ^~~~~~~
...

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Christophe Fergeau <cfergeau@redhat.com>
2019-01-08 12:06:40 +04:00
Eduardo Lima (Etrunko)
66f73a7c3c meson: Drop calls to declare_dependency() where appropriate
No need to use it when we can actually specify the parameters in the
actual gnome.generate_gir() function calls. We still keep it in the case
of gnome.gtkdoc(), as there is no way to specify the libraries to link
with.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-09-04 21:42:55 +01:00
Eduardo Lima (Etrunko)
d1cef504de meson: Remove unecessary spice_gtk_link_args variable
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2018-09-04 21:42:55 +01:00
Eduardo Lima (Etrunko)
7a87356bd2 Add support for building with meson/ninja
In a comparison with current autotools build system, meson/ninja
provides a huge improvement in build speed, while keeping the same
functionalities currently available and being considered more user
friendly.

The new system coexists within the same repository with the current one,
so we can do more extensive testing of its functionality before deciding
if the old system can be removed, or for some reason, has to stay for
good.

- Meson: https://mesonbuild.com

  This is the equivalent of autogen/configure step in autotools. It
  generates the files that will be used by ninja to actually build the
  source code.

  The project has received lots of traction recently, with many GNOME
  projects willing to move to this new build system. The following wiki
  page has more details of the status of the many projects being ported:

    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

  Meson has a python-like syntax, easy to read, and the documentation
  on the project is very complete, with a dedicated page on how to port
  from autotools, explaining how most common use cases can be
  implemented using meson.

    http://mesonbuild.com/Porting-from-autotools.html

  Other important sources of information:

    http://mesonbuild.com/howtox.html
    http://mesonbuild.com/Syntax.html
    http://mesonbuild.com/Reference-manual.html

- Ninja: https://ninja-build.org

  Ninja is the equivalent of make in an autotools setup, which actually
  builds the source code. It has being used by large and complex
  projects such as Google Chrome, Android and LLVM. There is not much to
  say about ninja (other than it is much faster than make) because we
  won't interact directly with it as much, as meson does the middle man
  job here. The reasoning for creating ninja in the first place is
  explained on the following post:

    http://neugierig.org/software/chromium/notes/2011/02/ninja.html

  Also its manual provides more in-depth information about the design
  principles:

    https://ninja-build.org/manual.html

- Basic workflow:

  Meson package is available for most if not all distros, so, taking
  Fedora as an example, we only need to run:

    # dnf -y install meson ninja-build.

  With Meson, building in-tree is not possible at all, so we need to
  pass a directory as argument to meson where we want the build to be
  done. This has the advantage of creating builds with different options
  under the same parent directory, e.g.:

    $ meson ./build --prefix=/usr
    $ meson ./build-extra -Dextra-checks=true -Dalignment-checks=true

  After configuration is done, we call ninja to actually do the build.

    $ ninja -C ./build
    $ ninja -C ./build install

  Ninja defaults to parallel builds, and this can be changed with the -j
  flag.

    $ ninja -j 10 -C ./build

- Hacking:

  * meson.build: Mandatory for the project root and usually found under
                 each directory you want something to be built.

  * meson_options.txt: Options that can interfere with the result of the
                       build.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2018-08-30 11:13:00 -03:00