diff --git a/.gitmodules b/.gitmodules index e69de29b..69a8a2ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "subprojects/libhandy"] + path = subprojects/libhandy + url = https://gitlab.gnome.org/GNOME/libhandy.git + branch = master diff --git a/meson.build b/meson.build index 61d0e096..d9eceaa0 100644 --- a/meson.build +++ b/meson.build @@ -85,7 +85,7 @@ gthread = dependency('gthread-2.0', version: '>=' + target_glib) iso_codes = dependency('iso-codes') javascriptcoregtk = dependency('javascriptcoregtk-4.0', version: '>=' + target_webkit) json_glib = dependency('json-glib-1.0', version: '>= 1.0') -libhandy = dependency('libhandy-0.0', version: '>= 0.0.10') +libhandy = dependency('libhandy-1', version: '>= 0.90', required: false) libmath = cc.find_library('m') libpeas = dependency('libpeas-1.0', version: '>= 1.24.0') libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.24.0') @@ -117,6 +117,24 @@ if libunwind_dep.found() ) endif +# Handy 1.0 is still rather new +if not libhandy.found() + libhandy_project = subproject( + 'libhandy', + default_options: [ + 'examples=false', + 'package_subdir=geary', + 'tests=false', + ] + ) + libhandy = declare_dependency( + dependencies: [ + libhandy_project.get_variable('libhandy_dep'), + libhandy_project.get_variable('libhandy_vapi'), + ] + ) +endif + # Optional dependencies appstream_util = find_program('appstream-util', required: false) desktop_file_validate = find_program('desktop-file-validate', required: false) diff --git a/org.gnome.Geary.json b/org.gnome.Geary.json index f429bcac..99e41612 100644 --- a/org.gnome.Geary.json +++ b/org.gnome.Geary.json @@ -203,13 +203,15 @@ "name": "libhandy", "buildsystem": "meson", "config-opts": [ - "-Dglade_catalog=disabled" + "-Dglade_catalog=disabled", + "-Dexamples=false", + "-Dtests=false" ], "sources": [ { "type": "git", - "url": "https://source.puri.sm/Librem5/libhandy.git", - "branch": "v0.0.13" + "url": "https://gitlab.gnome.org/GNOME/libhandy.git", + "branch": "master" } ] }, diff --git a/org.gnome.Geary.yaml b/org.gnome.Geary.yaml index 92fabdd8..0dd89a18 100644 --- a/org.gnome.Geary.yaml +++ b/org.gnome.Geary.yaml @@ -204,10 +204,12 @@ modules: buildsystem: meson config-opts: - "-Dglade_catalog=disabled" + - "-Dexamples=false" + - "-Dtests=false" sources: - type: git - url: https://source.puri.sm/Librem5/libhandy.git - branch: v0.0.13 + url: https://gitlab.gnome.org/GNOME/libhandy.git + branch: master # Geary dependency - name: libpeas diff --git a/src/meson.build b/src/meson.build index f5ff23ae..314650d2 100644 --- a/src/meson.build +++ b/src/meson.build @@ -44,7 +44,6 @@ geary_c_args = [ '-DGCK_API_SUBJECT_TO_CHANGE', '-DGCR_API_SUBJECT_TO_CHANGE', '-DGOA_API_IS_SUBJECT_TO_CHANGE', - '-DHANDY_USE_UNSTABLE_API', ] subdir('sqlite3-unicodesn') diff --git a/subprojects/libhandy b/subprojects/libhandy new file mode 160000 index 00000000..d22356ef --- /dev/null +++ b/subprojects/libhandy @@ -0,0 +1 @@ +Subproject commit d22356ef5f0cc6c6080896ae5611677d59849f51