aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Build-options.md15
-rw-r--r--docs/markdown/Dependencies.md12
-rw-r--r--docs/markdown/Gnome-module.md19
-rw-r--r--docs/markdown/Icestorm-module.md2
-rw-r--r--docs/markdown/Localisation.md52
-rw-r--r--docs/markdown/Python-3-module.md4
-rw-r--r--docs/markdown/Users.md13
-rw-r--r--docs/markdown/Using-wraptool.md22
8 files changed, 104 insertions, 35 deletions
diff --git a/docs/markdown/Build-options.md b/docs/markdown/Build-options.md
index 74d2355..9ccdf83 100644
--- a/docs/markdown/Build-options.md
+++ b/docs/markdown/Build-options.md
@@ -16,7 +16,7 @@ Here is a simple option file.
option('someoption', type : 'string', value : 'optval', description : 'An option')
option('other_one', type : 'boolean', value : false)
option('combo_opt', type : 'combo', choices : ['one', 'two', 'three'], value : 'three')
-option('integer_opt', type : 'integer', min : 0, max : 5, value : 3)
+option('integer_opt', type : 'integer', min : 0, max : 5, value : 3) # Since 0.45.0
option('free_array_opt', type : 'array', value : ['one', 'two'])
option('array_opt', type : 'array', choices : ['one', 'two', 'three'], value : ['one', 'two'])
```
@@ -44,7 +44,9 @@ default.
An integer option contains a single integer with optional upper and
lower values that are specified with the `min` and `max` keyword
-arguments. Available since Meson version 0.45.0.
+arguments.
+
+This type is available since Meson version 0.45.0.
### Arrays
@@ -56,7 +58,7 @@ empty. The `value` parameter specifies the default value of the option
and if it is unset then the values of `choices` will be used as the
default.
-This type is new in version 0.44.0
+This type is available since version 0.44.0
## Using build options
@@ -105,6 +107,13 @@ $ meson configure "-Doption=['a,b', 'c,d']"
The inner values must always be single quotes and the outer ones
double quotes.
+To change values in subprojects prepend the name of the subproject and
+a colon:
+
+```console
+$ meson configure -Dsubproject:option=newvalue
+```
+
**NOTE:** If you cannot call `meson configure` you likely have a old
version of Meson. In that case you can call `mesonconf` instead, but
that is deprecated in newer versions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index 6653cc1..74a918a 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -252,3 +252,15 @@ llvm_dep = dependency(
'llvm', version : '>= 4.0', modules : ['amdgpu'], optional_modules : ['inteljitevents'],
)
```
+
+## Python3
+
+Python3 is handled specially by meson:
+1. Meson tries to use `pkg-config`.
+1. If `pkg-config` fails meson uses fallback:
+ - On Windows fallback is current `python3` interpreter.
+ - On OSX fallback is framework dependency from `/Library/Frameworks`.
+
+Note that `python3` found by this dependency might differ from the one used in
+`python3` module because modules uses current interpreter but dependency tries
+`pkg-config` first.
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md
index b33009d..fbf9530 100644
--- a/docs/markdown/Gnome-module.md
+++ b/docs/markdown/Gnome-module.md
@@ -46,6 +46,25 @@ file called `foobar.h`, which you can then include in your sources.
Returns an array containing: `[c_source, header_file]` or
`[gresource_bundle]`
+Example:
+
+```meson
+gnome = import('gnome')
+
+asresources = gnome.compile_resources(
+ 'as-resources', 'data/asresources.gresource.xml',
+ source_dir: 'data',
+ c_name: 'as'
+)
+
+executable(
+ meson.project_name(),
+ asresources,
+ dependencies: my_deps,
+ install: true
+)
+```
+
### gnome.generate_gir()
Generates GObject introspection data. Takes one positional argument,
diff --git a/docs/markdown/Icestorm-module.md b/docs/markdown/Icestorm-module.md
index 896311f..6aa8481 100644
--- a/docs/markdown/Icestorm-module.md
+++ b/docs/markdown/Icestorm-module.md
@@ -1,4 +1,4 @@
-# Unstable SIMD module
+# Unstable IceStorm module
This module provides is available since version 0.45.0.
diff --git a/docs/markdown/Localisation.md b/docs/markdown/Localisation.md
index 34cad8d..517b642 100644
--- a/docs/markdown/Localisation.md
+++ b/docs/markdown/Localisation.md
@@ -4,37 +4,57 @@ short-description: Localization with GNU Gettext
# Localisation
-Localising your application with GNU gettext takes a little effort but is quite straightforward. This documentation assumes that you have a `po` subdirectory at your project root directory that contains all the localisation info.
+Localising your application with GNU gettext takes a little effort but is quite straightforward. We'll create a `po` subdirectory at your project root directory for all the localisation info.
-The first thing you need is a file called `POTFILES`. It lists all the source files that gettext should scan in order to find strings to translate. The syntax of the file is one line per source file and the line must contain the relative path from source root. A sample POTFILES might look like this.
+## Generating .pot and .po files
+In your main meson.build file include the `po` subdirectory in the build proces.
+
+ subdir('po')
+
+In this `po` subdirectory we need:
+- `LINGUAS`: Space separated list of languages
+- `POTFILES`: List of source files to scan for translatable strings.
+- `meson.build`: Localization specific meson file
+
+### LINGUAS
+File with space separated list of languages. A sample LINGUAS might look like this.
+
+ aa ab ae af
+
+### POTFILES
+File that lists all the source files that gettext should scan in order to find strings to translate. The syntax of the file is one line per source file and the line must contain the relative path from source root. A sample POTFILES might look like this.
src/file1.c
src/file2.c
src/subdir/file3.c
include/mything/somefile.h
-We also need to define an array of strings containing all the locales we want to generate. This is done in the Meson file in the `po` subdirectory. Assuming we want to generate Finnish and German localisations, the definition would look like this.
-
+### meson.build
+Localization specific meson file. It imports and uses the `i18n` module. If not defined before it needs to define the `GETTEXT_PACKAGE` global.
```meson
-langs = ['fi', 'de']
+i18n = import('i18n')
+# define GETTEXT_PACKAGE
+add_project_arguments('-DGETTEXT_PACKAGE="intltest"', language:'c')
+i18n.gettext(meson.project_name(),
+ args: '--directory=' + meson.source_root()
+)
```
+The first command imports the `i18n` module that provides gettext features. The fourth line does the actual invocation. The first argument is the gettext package name. This causes two things to happen. The first is that Meson will generate binary mo files and put them to their proper locations when doing an install. The second is that it creates a build rule to regenerate the main pot file. If you are using the Ninja backend, this is how you would invoke the rebuild.
-Then we need to generate the main pot file. Usually this is generated manually or exists already. If not, see later on how to generate it using Meson. The potfile can have any name but is usually the name of the gettext package. Let's say the project is called *intltest*. In this case the corresponding pot file would be called `intltest.pot`.
+### generate .pot file
-For each language listed in the array above we need a corresponding `.po` file. This has to be generated manually, see the gettext manual for details. Once we have all this, we can define the localisation to Meson with these lines.
+Then we need to generate the main pot file. The potfile can have any name but is usually the name of the gettext package. Let's say the project is called *intltest*. In this case the corresponding pot file would be called `intltest.pot`.
-```meson
-i18n = import('i18n')
-langs = ['fi', 'de']
-i18n.gettext('intltest', languages : langs)
-```
-
-The first command imports the `i18n` module that provides gettext features. The third line does the actual invocation. The first argument is the gettext package name. This causes two things to happen. The first is that Meson will generate binary mo files and put them to their proper locations when doing an install. The second is that it creates a build rule to regenerate the main pot file. If you are using the Ninja backend, this is how you would invoke the rebuild.
+Run the following command from your build folder to generate the pot file. It is recommended to inspect it manually afterwards and fill in e.g. proper copyright and contact information.
```console
$ ninja intltest-pot
```
-If the pot file does not yet exist, it will be created. It is recommended to inspect it manually afterwards and fill in e.g. proper copyright and contact information.
+### generate .po files
-Meson does not currently have built in commands for generating po files from the pot file. This is because translations are usually done by people who are not developers and thus have their own workflows.
+For each language listed in the array above we need a corresponding `.po` file. Those can be generated by running the following command from your build folder.
+
+```console
+$ ninja intltest-update-po
+```
diff --git a/docs/markdown/Python-3-module.md b/docs/markdown/Python-3-module.md
index dc6f571..7dda672 100644
--- a/docs/markdown/Python-3-module.md
+++ b/docs/markdown/Python-3-module.md
@@ -18,6 +18,10 @@ conventions of the target platform. All positional and keyword
arguments are the same as for
[shared_module](Reference-manual.md#shared_module).
+`extension_module` does not add any dependencies to the library so user may
+need to add `dependencies : dependency('python3')`, see
+[Python3 dependency](Dependencies.md#Python3).
+
*Added 0.38.0*
## language_version
diff --git a/docs/markdown/Users.md b/docs/markdown/Users.md
index 34abc96..1665922 100644
--- a/docs/markdown/Users.md
+++ b/docs/markdown/Users.md
@@ -10,6 +10,7 @@ If you have a project that uses Meson that you want to add to this list, let us
- [Arduino sample project](https://github.com/jpakkane/mesonarduino)
- [Budgie Desktop](https://github.com/budgie-desktop/budgie-desktop), a desktop environment built on GNOME technologies
- [casync](https://github.com/systemd/casync), Content-Addressable Data Synchronization Tool
+ - [cinnamon-desktop](https://github.com/linuxmint/cinnamon-desktop), the cinnamon desktop library
- [dbus-broker](https://github.com/bus1/dbus-broker), Linux D-Bus Message Broker
- [Dpdk](http://dpdk.org/ml/archives/dev/2018-January/089724.html), Data plane development kit, a set of libraries and drivers for fast packet processing
- [DXVK](https://github.com/doitsujin/dxvk), a Vulkan-based Direct3D 11 implementation for Linux using Wine
@@ -36,7 +37,7 @@ If you have a project that uses Meson that you want to add to this list, let us
- [Ksh](https://github.com/att/ast), a Korn Shell
- [Libdrm](https://cgit.freedesktop.org/drm/libdrm/), a library for abstracting DRM kernel interfaces
- [Libepoxy](https://github.com/anholt/libepoxy/), a library for handling OpenGL function pointer management
- - [libfuse](https://github.com/libfuse/libfuse), the reference implementation of the Linux FUSE (Filesystem in Userspace)
+ - [libfuse](https://github.com/libfuse/libfuse), the reference implementation of the Linux FUSE (Filesystem in Userspace) interface
- [Libgit2-glib](https://git.gnome.org/browse/libgit2-glib/), a GLib wrapper for libgit2
- [Libhttpseverywhere](https://github.com/grindhold/libhttpseverywhere), a library to enable httpseverywhere on any desktop app
- [Libosmscout](https://github.com/Framstag/libosmscout), a C++ library for offline map rendering, routing and location
@@ -46,23 +47,27 @@ lookup based on OpenStreetMap data
- [Kiwix libraries](https://github.com/kiwix/kiwix-lib)
- [Mesa](https://www.mesa3d.org/), An open source graphics driver project
- [MiracleCast](https://github.com/albfan/miraclecast), connect external monitors to your system via Wifi-Display specification aka Miracast
- - [Nautilus](https://git.gnome.org/browse/nautilus/commit/?id=ed5652c89ac0654df2e82b54b00b27d51c825465) the Gnome file manager
+ - [Nautilus](https://git.gnome.org/browse/nautilus/commit/?id=ed5652c89ac0654df2e82b54b00b27d51c825465), the Gnome file manager
+ - [Nemo](https://github.com/linuxmint/nemo), the file manager for the Cinnamon desktop environment
- [Orc](http://cgit.freedesktop.org/gstreamer/orc/), the Optimized Inner Loop Runtime Compiler (not the default yet)
- [Outlier](https://github.com/kerolasa/outlier), a small Hello World style meson example project
- [Pango](https://git.gnome.org/browse/pango/), an Internationalized text layout and rendering library (not the default yet)
- [Parzip](https://github.com/jpakkane/parzip), a multithreaded reimplementation of Zip
- [PipeWire](https://pipewire.org/), a framework for video and audio for containerized applications
+ - [Pithos](https://github.com/pithos/pithos), a Pandora Radio client
- [Pitivi](http://pitivi.org/), a nonlinear video editor
- [Polari](https://git.gnome.org/browse/polari), an IRC client
- [radare2](https://github.com/radare/radare2), unix-like reverse engineering framework and commandline tools (not the default)
- [SSHFS](https://github.com/libfuse/sshfs), allows you to mount a remote filesystem using SFTP
- [Sysprof](https://wiki.gnome.org/Apps/Sysprof), a profiling tool
- [systemd](https://github.com/systemd/systemd), the init system
+ - [szl](https://github.com/dimkr/szl), a lightweight, embeddable scripting language
- [Taisei Project](https://taisei-project.org/), an open-source Touhou Project clone and fangame
- - [Xorg](https://cgit.freedesktop.org/xorg/xserver/) the X.org display server (not the default yet)
+ - [xi-gtk](https://github.com/eyelash/xi-gtk), a GTK+ front-end for the Xi editor
+ - [Xorg](https://cgit.freedesktop.org/xorg/xserver/), the X.org display server (not the default yet)
- [Valum](https://github.com/valum-framework/valum), a micro web framework written in Vala
- [Wayland and Weston](https://lists.freedesktop.org/archives/wayland-devel/2016-November/031984.html), a next generation display server (not merged yet)
- [wlroots](https://github.com/swaywm/wlroots), a modular Wayland compositor library
- - [ZStandard](https://github.com/facebook/zstd/commit/4dca56ed832c6a88108a2484a8f8ff63d8d76d91) a compression algorithm developed at Facebook (not used by default)
+ - [ZStandard](https://github.com/facebook/zstd/commit/4dca56ed832c6a88108a2484a8f8ff63d8d76d91), a compression algorithm developed at Facebook (not used by default)
Note that a more up-to-date list of GNOME projects that use Meson can be found [here](https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting).
diff --git a/docs/markdown/Using-wraptool.md b/docs/markdown/Using-wraptool.md
index 08b1bfa..f6023e8 100644
--- a/docs/markdown/Using-wraptool.md
+++ b/docs/markdown/Using-wraptool.md
@@ -1,9 +1,9 @@
# Using wraptool
-Wraptool is a helper tool that allows you to manage your source
-dependencies using the WrapDB database. It gives you all things you
-would expect, such as installing and updating dependencies. The wrap
-tool works on all platforms, the only limitation is that the wrap
+Wraptool is a subcommand of Meson that allows you to manage your
+source dependencies using the WrapDB database. It gives you all things
+you would expect, such as installing and updating dependencies. The
+wrap tool works on all platforms, the only limitation is that the wrap
definition works on your target platform. If you find some Wraps that
don't work, please file bugs or, even better, patches.
@@ -16,7 +16,7 @@ are commands to type.
The simplest operation to do is to query the list of packages
available. To list them all issue the following command:
- $ wraptool list
+ $ meson wrap list
box2d
enet
gtest
@@ -33,13 +33,13 @@ available. To list them all issue the following command:
Usually you want to search for a specific package. This can be done
with the `search` command:
- $ wraptool search jpeg
+ $ meson wrap search jpeg
libjpeg
To determine which versions of libjpeg are available to install, issue
the `info` command:
- $ wraptool info libjpeg
+ $ meson wrap info libjpeg
Available versions of libjpeg:
9a 2
@@ -54,7 +54,7 @@ Installing dependencies is just as straightforward. First just create
the `subprojects` directory at the top of your source tree and issue
the install command.
- $ wraptool install libjpeg
+ $ meson wrap install libjpeg
Installed libjpeg branch 9a revision 2
Now you can issue a `subproject('libjpeg')` in your `meson.build` file
@@ -62,7 +62,7 @@ to use it.
To check if your projects are up to date you can issue the `status` command.
- $ wraptool status
+ $ meson wrap status
Subproject status
libjpeg up to date. Branch 9a, revision 2.
zlib not up to date. Have 1.2.8 2, but 1.2.8 4 is available.
@@ -70,12 +70,12 @@ To check if your projects are up to date you can issue the `status` command.
In this case `zlib` has a newer release available. Updating it is
straightforward:
- $ wraptool update zlib
+ $ meson wrap update zlib
Updated zlib to branch 1.2.8 revision 4
Wraptool can do other things besides these. Documentation for these
can be found in the command line help, which can be accessed by
-`wraptool --help`.
+`meson wrap --help`.
## Promoting dependencies