@@ -13,27 +13,28 @@ License: ISC, see [COPYING](./COPYING) for details.
1313
1414* All configurations and builds:
1515 - [ json-c] ( https://github.com/json-c/json-c/wiki ) (>= 0.11)
16- - C compiler, ` make ` etc.
17- * Most configurations (all except ` --disable-introspection --without-glib ` ):
16+ - C compiler, Meson, ninja, ` pkg-config ` etc.
17+ - Alternately, Autotools can be used instead of Meson but they are considered deprecated.
18+ * Most configurations (all except ` -Dintrospection=disabled -Dglib=disabled ` ):
1819 - [ GObject-Introspection] ( https://live.gnome.org/GObjectIntrospection )
1920 - [ GLib] ( https://wiki.gnome.org/Projects/GLib )
2021* When building from ` git ` (developer package names vary by distribution):
2122 - [ Python] ( http://python.org/ )
22- - [ autotools ] ( https://en.wikipedia.org/wiki/GNU_Build_System )
23- - [ intltool ] ( https://freedesktop. org/wiki/Software/intltool/ )
23+ - [ Meson ] ( https://en.wikipedia.org/wiki/Meson_(software) )
24+ - [ ninja ] ( https://en.wikipedia. org/wiki/Ninja_(build_system) )
2425 - [ gettext] ( https://www.gnu.org/software/gettext/gettext.html )
25- * For ` --enable-gegl ` (GIMP * does not* require this):
26+ * For ` -Dgegl=enabled ` (GIMP * does not* require this):
2627 - [ GEGL + BABL] ( http://gegl.org/ )
2728
2829### Install dependencies (Debian and derivatives)
2930
3031On recent Debian-like systems, you can type the following
3132to get started with a standard configuration:
3233
33- # apt install -y build-essential
34+ # apt install -y build-essential meson
3435 # apt install -y libjson-c-dev libgirepository1.0-dev libglib2.0-dev
3536
36- When building from git :
37+ Additionally, when using the deprecated Autotools build system :
3738
3839 # apt install -y python autotools-dev intltool gettext libtool
3940
@@ -44,11 +45,11 @@ You might also try using your package manager:
4445
4546### Install dependencies (Red Hat and derivatives)
4647
47- The following works on a minimal CentOS 7 installation:
48+ The following should works on a minimal CentOS 7 installation:
4849
49- # yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel
50+ # yum install -y gcc meson gobject-introspection-devel json-c-devel glib2-devel
5051
51- When building from git, you'll want to add :
52+ Additionally, when using the deprecated Autotools build system :
5253
5354 # yum install -y git python autoconf intltool gettext libtool
5455
@@ -60,9 +61,9 @@ You might also try your package manager:
6061
6162Works with a fresh OpenSUSE Tumbleweed Docker image:
6263
63- # zypper install gcc13 gobject-introspection-devel libjson-c-devel glib2-devel
64+ # zypper install gcc13 meson gobject-introspection-devel libjson-c-devel glib2-devel
6465
65- When building from git :
66+ Additionally, when using the deprecated Autotools build system :
6667
6768 # zypper install git python311 autoconf intltool gettext-tools libtool
6869
@@ -72,61 +73,53 @@ Package manager:
7273
7374## Build and install
7475
76+ You can use [ Meson] ( https://mesonbuild.com/ ) build system.
77+
78+ $ meson setup _build --prefix=/usr
79+ $ meson compile -C _build
80+ # meson install -C _build
81+ # ldconfig
82+
7583MyPaint and libmypaint benefit dramatically from autovectorization and other compiler optimizations.
76- You may want to set your CFLAGS before compiling (for gcc):
84+ You may want to set your CFLAGS before compiling (for gcc) by passing something like the following as an argument to ` meson setup ` :
7785
78- $ export CFLAGS ='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'
86+ -Dc_args ='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'
7987
80- The traditional setup works just fine.
88+ Alternately, you can use the traditional Autotools build system for now (it is deprecated and will be eventually removed):
8189
82- $ ./autogen.sh # Only needed when building from git.
90+ $ ./autogen.sh
8391 $ ./configure
8492 # make install
8593 # ldconfig
8694
87- ### Maintainer mode
88-
89- We don't ship a ` configure ` script in our git repository. If you're
90- building from git, you have to kickstart the build environment with:
91-
92- $ git clone https://github.com/mypaint/libmypaint.git
93- $ cd libmypaint
94- $ ./autogen.sh
95-
96- This script generates ` configure ` from ` configure.ac ` , after running a
97- few checks to make sure your build environment is broadly OK. It also
98- regenerates certain important generated headers if they need it.
99-
100- Folks building from a release tarball don't need to do this: they will
101- have a ` configure ` script from the start.
102-
10395### Configure
10496
105- $ ./configure
106- $ ./configure --prefix=/tmp/junk/example
97+ Meson requires out-of-tree builds so you need to specify a build directory.
98+
99+ $ meson setup _build
100+ $ meson setup _build --prefix=/tmp/junk/example
107101
108- There are several MyPaint-specific options.
109- These can be shown by running
102+ In addition to to [ Meson options] ( https://mesonbuild.com/Builtin-options.html#compiler-options ) , there are several libmypaint-specific options, see ` meson_options.txt ` file for details.
110103
111- $ ./configure --help
104+ $ meson setup _build -Dgegl=disabled -Ddocs=true -Di18n=enabled
112105
113106### Build
114107
115- $ make
108+ $ meson compile -C _build
116109
117110Once MyPaint is built, you can run the test suite and/or install it.
118111
119112### Test
120113
121- $ make check
114+ $ meson test -C _build
122115
123116This runs all the unit tests.
124117
125118### Install
126119
127- # make install
120+ # meson install -C _build
128121
129- Uninstall libmypaint with ` make uninstall` .
122+ Uninstall libmypaint with ` meson uninstall -C _build ` .
130123
131124### Check availability
132125
@@ -172,11 +165,7 @@ for details of how you can begin contributing.
172165
173166The distribution release can be generated with:
174167
175- $ make dist
176-
177- And it should be checked before public release with:
178-
179- $ make distcheck
168+ $ meson dist -C _build
180169
181170## Localization
182171
@@ -198,7 +187,7 @@ in `po/POTFILES.in`.
198187You can update the .po files when translated strings in the code change
199188using:
200189
201- $ cd po && make update-po
190+ $ meson compile -C _build update-po
202191
203192When the results of this are pushed, Weblate translators will see the
204193new strings immediately.
0 commit comments