@@ -12,28 +12,27 @@ License: ISC, see [COPYING](./COPYING) for details.
1212## Dependencies
1313
1414* All configurations and builds:
15+ - C compiler, linker etc.
16+ - [ Python] ( http://python.org/ )
17+ - [ Meson] ( https://en.wikipedia.org/wiki/Meson_(software) ) and [ ninja] ( https://en.wikipedia.org/wiki/Ninja_(build_system) )
18+ - Alternately, Autotools can be used instead but they are now considered deprecated.
1519 - [ 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 ` ):
20+ - [ gettext ] ( https://www.gnu.org/software/gettext/gettext.html ) (unless ` -Di18n=disabled ` )
21+ * Most configurations (all except ` -Dintrospection=disabled -Dglib=disabled ` ):
1822 - [ GObject-Introspection] ( https://live.gnome.org/GObjectIntrospection )
1923 - [ GLib] ( https://wiki.gnome.org/Projects/GLib )
20- * When building from ` git ` (developer package names vary by distribution):
21- - [ Python] ( http://python.org/ )
22- - [ autotools] ( https://en.wikipedia.org/wiki/GNU_Build_System )
23- - [ intltool] ( https://freedesktop.org/wiki/Software/intltool/ )
24- - [ gettext] ( https://www.gnu.org/software/gettext/gettext.html )
25- * For ` --enable-gegl ` (GIMP * does not* require this):
24+ * For ` -Dgegl=enabled ` (GIMP * does not* require this):
2625 - [ GEGL + BABL] ( http://gegl.org/ )
2726
2827### Install dependencies (Debian and derivatives)
2928
3029On recent Debian-like systems, you can type the following
3130to get started with a standard configuration:
3231
33- # apt install -y build-essential
32+ # apt install -y build-essential meson
3433 # apt install -y libjson-c-dev libgirepository1.0-dev libglib2.0-dev
3534
36- When building from git :
35+ Additionally, when using the deprecated Autotools build system :
3736
3837 # apt install -y python autotools-dev intltool gettext libtool
3938
@@ -44,11 +43,11 @@ You might also try using your package manager:
4443
4544### Install dependencies (Red Hat and derivatives)
4645
47- The following works on a minimal CentOS 7 installation:
46+ The following should works on a minimal CentOS 7 installation:
4847
49- # yum install -y gcc gobject-introspection-devel json-c-devel glib2-devel
48+ # yum install -y gcc meson gobject-introspection-devel json-c-devel glib2-devel
5049
51- When building from git, you'll want to add :
50+ Additionally, when using the deprecated Autotools build system :
5251
5352 # yum install -y git python autoconf intltool gettext libtool
5453
@@ -60,9 +59,9 @@ You might also try your package manager:
6059
6160Works with a fresh OpenSUSE Tumbleweed Docker image:
6261
63- # zypper install gcc13 gobject-introspection-devel libjson-c-devel glib2-devel
62+ # zypper install gcc13 meson gobject-introspection-devel libjson-c-devel glib2-devel
6463
65- When building from git :
64+ Additionally, when using the deprecated Autotools build system :
6665
6766 # zypper install git python311 autoconf intltool gettext-tools libtool
6867
@@ -72,61 +71,53 @@ Package manager:
7271
7372## Build and install
7473
74+ You can use [ Meson] ( https://mesonbuild.com/ ) build system.
75+
76+ $ meson setup _build --prefix=/usr
77+ $ meson compile -C _build
78+ # meson install -C _build
79+ # ldconfig
80+
7581MyPaint and libmypaint benefit dramatically from autovectorization and other compiler optimizations.
76- You may want to set your CFLAGS before compiling (for gcc):
82+ You may want to set your CFLAGS before compiling (for gcc) by passing something like the following as an argument to ` meson setup ` :
7783
78- $ export CFLAGS ='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'
84+ -Dc_args ='-Ofast -ftree-vectorize -fopt-info-vec-optimized -march=native -mtune=native -funsafe-math-optimizations -funsafe-loop-optimizations'
7985
80- The traditional setup works just fine.
86+ Alternately, you can use the traditional Autotools build system for now (it is deprecated and will be eventually removed):
8187
82- $ ./autogen.sh # Only needed when building from git.
88+ $ ./autogen.sh
8389 $ ./configure
8490 # make install
8591 # ldconfig
8692
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-
10393### Configure
10494
105- $ ./configure
106- $ ./configure --prefix=/tmp/junk/example
95+ Meson requires out-of-tree builds so you need to specify a build directory.
10796
108- There are several MyPaint-specific options.
109- These can be shown by running
97+ $ meson setup _build
98+ $ meson setup _build --prefix=/tmp/junk/example
11099
111- $ ./configure --help
100+ 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.
101+
102+ $ meson setup _build -Dgegl=disabled -Ddocs=true -Di18n=enabled
112103
113104### Build
114105
115- $ make
106+ $ meson compile -C _build
116107
117108Once MyPaint is built, you can run the test suite and/or install it.
118109
119110### Test
120111
121- $ make check
112+ $ meson test -C _build
122113
123114This runs all the unit tests.
124115
125116### Install
126117
127- # make install
118+ # meson install -C _build
128119
129- Uninstall libmypaint with ` make uninstall` .
120+ Uninstall libmypaint with ` meson uninstall -C _build ` .
130121
131122### Check availability
132123
@@ -172,11 +163,7 @@ for details of how you can begin contributing.
172163
173164The distribution release can be generated with:
174165
175- $ make dist
176-
177- And it should be checked before public release with:
178-
179- $ make distcheck
166+ $ meson dist -C _build
180167
181168## Localization
182169
@@ -198,7 +185,7 @@ in `po/POTFILES.in`.
198185You can update the .po files when translated strings in the code change
199186using:
200187
201- $ cd po && make update-po
188+ $ meson compile -C _build update-po
202189
203190When the results of this are pushed, Weblate translators will see the
204191new strings immediately.
0 commit comments