GNOME Goal: Port modules to use Meson build system

As the meson webpage says:

Meson is an open source build system meant to be both extremely fast, and, even more importantly, as user friendly as possible.

The main design point of Meson is that every moment a developer spends writing or debugging build definitions is a second wasted. So is every second spent waiting for the build system to actually start compiling code.

This GNOMEGoal is to coordinate efforts and avoid duplicating work

Guidelines

Meson documentation is quite complete, take a look to these links:

Things to check while porting

  • If your project has configuration options for the Autotools build make sure to port them all to the Meson one, following these style guidelines
    • 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

    • Similarly, you should drop with from --with-bar options

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

    • Try to avoid automatic feature detection; this makes it harder for distributors and continuous integration systems to identify the dependencies needed to build your project.

      • Note that this is not a Meson requirement, but is important for consistent behaviour across GNOME modules

      • Auto features are now OK to use in GNOME due to the addition of the -Dauto_features=enabled functionality in meson 0.47, which allows auto feature detection to be disabled.

    • Do not add "enable debug" options to inject pre-processor symbols into the build, or control the presence of debugging messages; you should use Meson's own buildtype option

      • If you have a ENABLE_DEBUG symbol, you should set it for debug and/or debugoptimized build types

      • For release build types you probably want to add -DG_DISABLE_CAST_CHECKS to your project's arguments

      • It's not recommended to add -DG_DISABLE_CHECKS in any kind of build; for specialized builds (such as embedded environments, or other resource-constrained environments), you should use the plain build type in Meson, and inject your own CFLAGS

    • Do not add "enable -Werror" options to make warnings fail the build; you should use Meson's own --werror build option

    • Typical options mapping for GNOME modules
      • --enable-gtk-doc = gtk_doc

      • --enable-man = man

      • --enable-introspection = introspection

Things to check after the porting:

  • If you port a library:
    • Make sure the list of exported symbols is the same between Autotools and Meson builds (may want gnu_symbol_visibility: 'hidden')

    • Make sure you maintain compatible sonames (use version and soversion when building a library() target)

    • Make sure you install all the needed headers, if applicable
    • Make sure you install all the pkg-config files
  • Ensure that consumers of your project can use it as a sub-project in their own Meson builds
    • Never use the source_root() and build_root() of the meson object to create paths

    • Make sure that any internal dependency object created using declare_dependency() depends on the generated headers and introspection files

  • If you release a tarball using Autotools, remember to include the Meson files on it
    • Use the EXTRA_DIST Automake target to include the meson.build, meson_options.txt, and ancillary scripts you may use

  • Update jhbuild, gnome-build-meta and gnome-continuous to use Meson

    • Beware that Continuous will automatically choose Meson over Autotools if not specified, so you should add { "force-autotools": true } before landing the meson branch (or make sure you change the configuration asap to minimize the breakage)
    • Make sure you do this before removing the Autotools build!

  • Use meld to diff install directories of the projects

  • If you rely on symbol visibility — e.g. using libtool or using pre-processor macros — use nm to check that you're still exporting the same ABI, also abidiff from abigail can be your good friend

Comments before approval

{i} Add your comments to this goal proposal here

Status of this goal

{i} Tip: If you choose to work on a module, create the bug report on the GNOME bugzilla for the relevant module, and make it block bug 782980. This way people will know someone already works on it, and won't duplicate the work you're doing.

State

Markup

todo

<: #ff8080> todo

patch

<: #ffcc50> [[GnomeBug:xxxxx|patch]]

done

<: #80ff80> [[GnomeBug:xxxxx|done]]

not wanted

<: #dddddd> not wanted

Above are the states and corresponding markup to update the modules state table below.

Tarball

Status

core

at-spi2-core

done

at-spi2-atk

done

dconf

done

evolution-data-server

not wanted

glib-networking

done

gnome-bluetooth

done

gnome-online-accounts

done

gnome-control-center

done

gnome-desktop

done

adwaita-icon-theme

to do

gnome-initial-setup

done

gnome-keyring

to do

gnome-menus

to do

gnome-packagekit

done

gnome-session

done

gnome-settings-daemon

done

gnome-shell

done

gnome-themes-extra

patch

gsettings-desktop-schemas

done

gvfs

done

mousetweaks

patch

mutter

done

network-manager-applet

done

telepathy-mission-control

to do

core-utilities

baobab

done

bijiben

done

empathy

to do

eog

done

epiphany

done

evince

done

gnome-calculator

done

gnome-calendar

done

gnome-characters

done

gnome-contacts

done

gnome-dictionary

done

gnome-disk-utility

done

gnome-font-viewer

done

gnome-logs

done

gnome-screenshot

done

gnome-system-log

to do

gnome-system-monitor

done

gnome-terminal

blocked

gucharmap

to do

nautilus

done

sushi

to do

yelp

to do

core-extras

gnome-backgrounds

done

gnome-user-share

in progress

vino

in progress

gnome-user-docs

blocked

core-os-services

accountsservice

in progress

avahi

to do

bluez

to do

cups

to do

dbus

to do

gdm

in progress

NetworkManager

in progress

PackageKit

to do

polkit

in progress

upower

to do

udisks

to do

core-deps

atk

done

atkmm

to do

cantarell-fonts

done

caribou

to do

clutter

done

clutter-gtk

done

clutter-gst

in progress

cogl

to do

desktop-file-utils

to do

folks

done

gnome-js-common

to do

gspell

in progress

gtksourceview

in progress

gdk-pixbuf

done

gjs

blocked

glib

merged

glibmm

to do

gnome-video-effects

patch

gobject-introspection

done

gst-plugins-base

done

gst-plugins-good

done

gst-plugins-farsight

to do

gstreamer

done

gtk+3

not wanted for now

gtk+4

done

gtk-doc

done

gtkmm

to do

gudev

in progress

hicolor-icon-theme

to do

iso-codes

to do

itstool

to do

json-glib

done

libcanberra

to do

libchamplain

done

libcroco

to do

libgee

in progress

libgepub

done

libgdata

to do

libgsf

to do

libgtop

to do

libgweather

done

libmediaart

done

libmusicbrainz

to do

libnice

done

libnotify

done

libpeas

in progress

librest

in progress

librsvg

to do

libsecret

done

libsigc++2

to do

libsoup

done

libxml2

to do

mm-common

to do

p11-kit

to do

pango

done

pangomm

to do

poppler

to do

pygobject

done

shared-mime-info

to do

sound-theme-freedesktop

to do

telepathy-glib

to do

telepathy-logger

to do

telepathy-farsight

to do

totem-pl-parser

done

tracker

done

vala

in progress

vte

done

webkit

to do

yelp-tools

in progress

yelp-xsl

in progress

zenity

to do

colord

to do

apps

accerciser

to do

aislerot

to do

anjuta

to do

brasero

to do

cheese

in progress

devhelp

done

evolution

not wanted

file-roller

to do

five-or-more

done

four-in-a-row

done

frogr

done

gbrainy

in progress

gedit

done

ghex

done

glade

done

gnome-boxes

done

gnome-clocks

done

gnome-color-manager

to do

gnome-devel-docs

blocked

gnome-documents

done

gnome-maps

done

gnome-music

done

gnome-software

done

gnome-sound-recorder

done

gnome-todo

done

gnome-usage

done

gnome-weather

done

gnome-chess

done

gnome-klotski

done

gnome-mahjongg

done

gnome-mines

done

gnome-nibbles

done

gnome-robots

done

gnome-sudoku

done

gnome-tetravex

done

gnome-tweak-tool

done

iagno

done

lightsoff

done

quadrapassel

done

swell-foop

done

tali

done

gnome-nettool

done

nautilus-sendto

done

nemiver

to do

orca

to do

polari

done

rhythmbox

in progress

rygel

doing?

seahorse

done

shotwell

done

simple-scan

done

totem

done

vinagre

in progress

other

cairo

in progress

pixman

done

fontconfig

in progress

freetype2

in progress

harfbuzz

in progress

fribidi

done

Initiatives/GnomeGoals/MesonPorting (last edited 2019-05-11 09:08:04 by NielsDeGraef)