diff --git a/data/meson.build b/data/meson.build index f704ec1..52ed78a 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,34 +1,36 @@ pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) -desktop_file = i18n.merge_file( - input: 'io.github.mightycreak.Diffuse.desktop.in', - output: 'io.github.mightycreak.Diffuse.desktop', - type: 'desktop', - po_dir: '../po', - install: true, - install_dir: join_paths(get_option('datadir'), 'applications') -) - -desktop_utils = find_program('desktop-file-validate', required: false) -if desktop_utils.found() - test('Validate desktop file', desktop_utils, - args: [desktop_file] +if build_machine.system() == 'linux' + desktop_file = i18n.merge_file( + input: 'io.github.mightycreak.Diffuse.desktop.in', + output: 'io.github.mightycreak.Diffuse.desktop', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'applications') ) -endif -appstream_file = i18n.merge_file( - input: 'io.github.mightycreak.Diffuse.appdata.xml.in', - output: 'io.github.mightycreak.Diffuse.appdata.xml', - po_dir: '../po', - install: true, - install_dir: join_paths(get_option('datadir'), 'appdata') -) + desktop_utils = find_program('desktop-file-validate', required: false) + if desktop_utils.found() + test('Validate desktop file', desktop_utils, + args: [desktop_file] + ) + endif -appstream_util = find_program('appstream-util', required: false) -if appstream_util.found() - test('Validate appstream file', appstream_util, - args: ['validate', appstream_file] + appstream_file = i18n.merge_file( + input: 'io.github.mightycreak.Diffuse.appdata.xml.in', + output: 'io.github.mightycreak.Diffuse.appdata.xml', + po_dir: '../po', + install: true, + install_dir: join_paths(get_option('datadir'), 'appdata') ) + + appstream_util = find_program('appstream-util', required: false) + if appstream_util.found() + test('Validate appstream file', appstream_util, + args: ['validate', appstream_file] + ) + endif endif # Diffuse config file diff --git a/docs/developers/developers-setup.md b/docs/developers/developers-setup.md index ad4ea7f..ef09447 100644 --- a/docs/developers/developers-setup.md +++ b/docs/developers/developers-setup.md @@ -8,7 +8,7 @@ Diffuse depends on these projects: * PyPi * Cairo and GObject Introspection development headers * Meson -* Flatpak and Flatpak builder +* Flatpak and Flatpak builder (Linux only) ### Install the distribution dependencies @@ -35,6 +35,20 @@ sudo dnf install python-pip cairo-devel cairo-gobject-devel meson flatpak flatpa _Note: Tested on Fedora 34_ +
+ Mac OS + +On Mac, all deps can be fetched using [Homebrew](https://docs.brew.sh/). + +```sh +brew install meson python3 py3cairo pygobject3 gtk+3 +``` + +_Note: Tested on macOS 12.5 (Monterey)_ + +You don't need to use `pip` because the above `brew` command installs all dependencies. +
+ ### Install the project dependencies To install the requirements just to execute the binary, run: @@ -72,7 +86,7 @@ To uninstall Diffuse: flatpak remove io.github.mightycreak.Diffuse ``` -### Build, test and install using Meson +## Build, test and install using Meson on Linux and Mac OS Diffuse build system is meson. diff --git a/meson.build b/meson.build index 05a2205..3d3d279 100644 --- a/meson.build +++ b/meson.build @@ -10,4 +10,6 @@ subdir('data') subdir('src') subdir('po') -meson.add_install_script('build-aux/meson/postinstall.py') +if build_machine.system() == 'linux' + meson.add_install_script('build-aux/meson/postinstall.py') +endif