summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-09-21 23:47:28 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2020-09-21 23:47:28 +0100
commit297110cbd695b2bd0a740153ffb11961b573b5ed (patch)
treedc773d299640638c197b24aef79fef007218a6e0
parent6eba02af8bfbe11170c53ea2d91222fc8e10e03a (diff)
downloadgnome-dictionary-297110cbd695b2bd0a740153ffb11961b573b5ed.tar.gz
Merge libgdict with the rest of the application
There's no point in keeping it into a separate directory, when it's a static library that isn't installed any more.
-rw-r--r--libgdict/meson.build91
-rw-r--r--meson.build2
-rw-r--r--po/POTFILES.in16
-rw-r--r--src/gdict-client-context.c (renamed from libgdict/gdict-client-context.c)0
-rw-r--r--src/gdict-client-context.h (renamed from libgdict/gdict-client-context.h)0
-rw-r--r--src/gdict-context-private.h (renamed from libgdict/gdict-context-private.h)0
-rw-r--r--src/gdict-context.c (renamed from libgdict/gdict-context.c)0
-rw-r--r--src/gdict-context.h (renamed from libgdict/gdict-context.h)0
-rw-r--r--src/gdict-database-chooser-button.c (renamed from libgdict/gdict-database-chooser-button.c)0
-rw-r--r--src/gdict-database-chooser-button.h (renamed from libgdict/gdict-database-chooser-button.h)0
-rw-r--r--src/gdict-database-chooser.c (renamed from libgdict/gdict-database-chooser.c)0
-rw-r--r--src/gdict-database-chooser.h (renamed from libgdict/gdict-database-chooser.h)0
-rw-r--r--src/gdict-debug.h (renamed from libgdict/gdict-debug.h)0
-rw-r--r--src/gdict-defbox.c (renamed from libgdict/gdict-defbox.c)0
-rw-r--r--src/gdict-defbox.h (renamed from libgdict/gdict-defbox.h)0
-rw-r--r--src/gdict-enum-types.c.in (renamed from libgdict/gdict-enum-types.c.in)0
-rw-r--r--src/gdict-enum-types.h.in (renamed from libgdict/gdict-enum-types.h.in)0
-rw-r--r--src/gdict-marshal.list (renamed from libgdict/gdict-marshal.list)0
-rw-r--r--src/gdict-private.h (renamed from libgdict/gdict-private.h)0
-rw-r--r--src/gdict-source-chooser.c (renamed from libgdict/gdict-source-chooser.c)0
-rw-r--r--src/gdict-source-chooser.h (renamed from libgdict/gdict-source-chooser.h)0
-rw-r--r--src/gdict-source-loader.c (renamed from libgdict/gdict-source-loader.c)0
-rw-r--r--src/gdict-source-loader.h (renamed from libgdict/gdict-source-loader.h)0
-rw-r--r--src/gdict-source.c (renamed from libgdict/gdict-source.c)0
-rw-r--r--src/gdict-source.h (renamed from libgdict/gdict-source.h)0
-rw-r--r--src/gdict-speller.c (renamed from libgdict/gdict-speller.c)0
-rw-r--r--src/gdict-speller.h (renamed from libgdict/gdict-speller.h)0
-rw-r--r--src/gdict-strategy-chooser.c (renamed from libgdict/gdict-strategy-chooser.c)0
-rw-r--r--src/gdict-strategy-chooser.h (renamed from libgdict/gdict-strategy-chooser.h)0
-rw-r--r--src/gdict-utils.c (renamed from libgdict/gdict-utils.c)0
-rw-r--r--src/gdict-utils.h (renamed from libgdict/gdict-utils.h)0
-rw-r--r--src/gdict.h (renamed from libgdict/gdict.h)0
-rw-r--r--src/meson.build56
33 files changed, 61 insertions, 104 deletions
diff --git a/libgdict/meson.build b/libgdict/meson.build
deleted file mode 100644
index 18bd715..0000000
--- a/libgdict/meson.build
+++ /dev/null
@@ -1,91 +0,0 @@
-sources_h = [
- 'gdict-context.h',
- 'gdict-client-context.h',
- 'gdict-database-chooser.h',
- 'gdict-database-chooser-button.h',
- 'gdict-defbox.h',
- 'gdict-source-chooser.h',
- 'gdict-source-loader.h',
- 'gdict-source.h',
- 'gdict-speller.h',
- 'gdict-strategy-chooser.h',
- 'gdict-utils.h',
-]
-
-sources_h_priv = [
- 'gdict-context-private.h',
- 'gdict-debug.h',
- 'gdict-private.h',
-]
-
-sources_c = [
- 'gdict-context.c',
- 'gdict-client-context.c',
- 'gdict-database-chooser.c',
- 'gdict-database-chooser-button.c',
- 'gdict-defbox.c',
- 'gdict-source-chooser.c',
- 'gdict-source-loader.c',
- 'gdict-source.c',
- 'gdict-speller.c',
- 'gdict-strategy-chooser.c',
- 'gdict-utils.c',
-]
-
-libgdict_enums = gnome.mkenums('gdict-enum-types', sources: sources_h,
- h_template: 'gdict-enum-types.h.in',
- c_template: 'gdict-enum-types.c.in',
- install_header: false,
-)
-
-libgdict_marshal = gnome.genmarshal('gdict-marshal',
- sources: 'gdict-marshal.list',
- prefix: 'gdict_marshal',
-)
-
-libgdict_version = meson.project_version().split('.')
-libgdict_major = libgdict_version[0].to_int()
-libgdict_minor = libgdict_version[1] in ['alpha', 'beta', 'rc'] ? 0 : libgdict_version[1].to_int()
-libgdict_micro = 0
-
-libgdict_cflags = [
- '-D_GNU_SOURCE',
- '-DG_LOG_DOMAIN="Gdict"',
- '-DDATADIR="@0@"'.format(gdict_datadir),
- '-DLIBDIR="@0@"'.format(gdict_libdir),
- '-DSYSCONFDIR="@0@"'.format(gdict_sysconfdir),
- '-DPREFIX="@0@"'.format(gdict_prefix),
- '-DGNOMELOCALEDIR="@0@"'.format(join_paths(gdict_datadir, 'locale')),
- '-DGDICTSOURCESDIR="@0@"'.format(join_paths(gdict_datadir, 'gdict-1.0', 'sources')),
- '-DGDICT_ENABLE_INTERNALS=1',
- '-DGDICT_MAJOR_VERSION=@0@'.format(libgdict_major),
- '-DGDICT_MINOR_VERSION=@0@'.format(libgdict_minor),
- '-DGDICT_MICRO_VERSION=@0@'.format(libgdict_micro),
- '-DG_DISABLE_DEPRECATED',
- '-DGDK_DISABLE_DEPRECATED',
- '-UGTK_DISABLE_DEPRECATED',
- '-DPANGO_DISABLE_DEPRECATED',
- '-DG_DISABLE_SINGLE_INCLUDES',
- '-DGTK_DISABLE_SINGLE_INCLUDES',
-]
-
-libgdict_ldflags = cc.get_supported_link_arguments([
- '-Wl,-Bsymbolic-functions',
- '-Wl,-z,relro',
- '-Wl,-z,now',
-])
-
-libgdict_lib = static_library('libgdict-1.0',
- sources: sources_c + libgdict_enums + libgdict_marshal,
- dependencies: [ gio_dep, gtk_dep, ipv6_deps ],
- include_directories: root_inc,
- c_args: common_cflags + debug_cflags + libgdict_cflags,
- link_args: libgdict_ldflags,
- install: false,
-)
-
-libgdict_dep = declare_dependency(sources: libgdict_enums + libgdict_marshal,
- link_with: libgdict_lib,
- include_directories: [ libgdict_inc ],
- dependencies: [ gio_dep, gtk_dep, ipv6_deps ],
-)
diff --git a/meson.build b/meson.build
index 3be6c46..08ff333 100644
--- a/meson.build
+++ b/meson.build
@@ -133,7 +133,6 @@ endif
conf.set10('ENABLE_IPV6', use_ipv6)
root_inc = include_directories('.')
-libgdict_inc = include_directories('libgdict')
src_inc = include_directories('src')
po_dir = join_paths(meson.current_source_dir(), 'po')
@@ -145,7 +144,6 @@ gtk_dep = dependency('gtk+-3.0', version: '>= 3.21.2')
gnome = import('gnome')
i18n = import('i18n')
-subdir('libgdict')
subdir('src')
subdir('po')
subdir('data')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 95ada05..07fd624 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,21 +6,21 @@ data/org.gnome.Dictionary.desktop.in.in
data/org.gnome.dictionary.gschema.xml
data/spanish.desktop.in
data/thai.desktop.in
-libgdict/gdict-client-context.c
-libgdict/gdict-database-chooser.c
-libgdict/gdict-defbox.c
-libgdict/gdict-source.c
-libgdict/gdict-source-chooser.c
-libgdict/gdict-speller.c
-libgdict/gdict-strategy-chooser.c
-libgdict/gdict-utils.c
src/gdict-about.c
src/gdict-app-menus.ui
src/gdict-app-window.ui
src/gdict-app.c
+src/gdict-client-context.c
+src/gdict-database-chooser.c
+src/gdict-defbox.c
src/gdict-pref-dialog.c
src/gdict-pref-dialog.ui
src/gdict-print.c
+src/gdict-source-chooser.c
src/gdict-source-dialog.c
src/gdict-source-dialog.ui
+src/gdict-source.c
+src/gdict-speller.c
+src/gdict-strategy-chooser.c
src/gdict-window.c
+src/gdict-utils.c
diff --git a/libgdict/gdict-client-context.c b/src/gdict-client-context.c
index 6fed76b..6fed76b 100644
--- a/libgdict/gdict-client-context.c
+++ b/src/gdict-client-context.c
diff --git a/libgdict/gdict-client-context.h b/src/gdict-client-context.h
index d68b729..d68b729 100644
--- a/libgdict/gdict-client-context.h
+++ b/src/gdict-client-context.h
diff --git a/libgdict/gdict-context-private.h b/src/gdict-context-private.h
index d9ea27b..d9ea27b 100644
--- a/libgdict/gdict-context-private.h
+++ b/src/gdict-context-private.h
diff --git a/libgdict/gdict-context.c b/src/gdict-context.c
index dfadc99..dfadc99 100644
--- a/libgdict/gdict-context.c
+++ b/src/gdict-context.c
diff --git a/libgdict/gdict-context.h b/src/gdict-context.h
index b0e8735..b0e8735 100644
--- a/libgdict/gdict-context.h
+++ b/src/gdict-context.h
diff --git a/libgdict/gdict-database-chooser-button.c b/src/gdict-database-chooser-button.c
index 52ceabb..52ceabb 100644
--- a/libgdict/gdict-database-chooser-button.c
+++ b/src/gdict-database-chooser-button.c
diff --git a/libgdict/gdict-database-chooser-button.h b/src/gdict-database-chooser-button.h
index b181e92..b181e92 100644
--- a/libgdict/gdict-database-chooser-button.h
+++ b/src/gdict-database-chooser-button.h
diff --git a/libgdict/gdict-database-chooser.c b/src/gdict-database-chooser.c
index 36ab547..36ab547 100644
--- a/libgdict/gdict-database-chooser.c
+++ b/src/gdict-database-chooser.c
diff --git a/libgdict/gdict-database-chooser.h b/src/gdict-database-chooser.h
index d4023b0..d4023b0 100644
--- a/libgdict/gdict-database-chooser.h
+++ b/src/gdict-database-chooser.h
diff --git a/libgdict/gdict-debug.h b/src/gdict-debug.h
index 0f648a8..0f648a8 100644
--- a/libgdict/gdict-debug.h
+++ b/src/gdict-debug.h
diff --git a/libgdict/gdict-defbox.c b/src/gdict-defbox.c
index dda7109..dda7109 100644
--- a/libgdict/gdict-defbox.c
+++ b/src/gdict-defbox.c
diff --git a/libgdict/gdict-defbox.h b/src/gdict-defbox.h
index e839280..e839280 100644
--- a/libgdict/gdict-defbox.h
+++ b/src/gdict-defbox.h
diff --git a/libgdict/gdict-enum-types.c.in b/src/gdict-enum-types.c.in
index 0dbbdc6..0dbbdc6 100644
--- a/libgdict/gdict-enum-types.c.in
+++ b/src/gdict-enum-types.c.in
diff --git a/libgdict/gdict-enum-types.h.in b/src/gdict-enum-types.h.in
index bfaf3e2..bfaf3e2 100644
--- a/libgdict/gdict-enum-types.h.in
+++ b/src/gdict-enum-types.h.in
diff --git a/libgdict/gdict-marshal.list b/src/gdict-marshal.list
index 39fa85e..39fa85e 100644
--- a/libgdict/gdict-marshal.list
+++ b/src/gdict-marshal.list
diff --git a/libgdict/gdict-private.h b/src/gdict-private.h
index 6265fd1..6265fd1 100644
--- a/libgdict/gdict-private.h
+++ b/src/gdict-private.h
diff --git a/libgdict/gdict-source-chooser.c b/src/gdict-source-chooser.c
index 1eb7003..1eb7003 100644
--- a/libgdict/gdict-source-chooser.c
+++ b/src/gdict-source-chooser.c
diff --git a/libgdict/gdict-source-chooser.h b/src/gdict-source-chooser.h
index 0f8cc93..0f8cc93 100644
--- a/libgdict/gdict-source-chooser.h
+++ b/src/gdict-source-chooser.h
diff --git a/libgdict/gdict-source-loader.c b/src/gdict-source-loader.c
index 4ba5414..4ba5414 100644
--- a/libgdict/gdict-source-loader.c
+++ b/src/gdict-source-loader.c
diff --git a/libgdict/gdict-source-loader.h b/src/gdict-source-loader.h
index a25fcb1..a25fcb1 100644
--- a/libgdict/gdict-source-loader.h
+++ b/src/gdict-source-loader.h
diff --git a/libgdict/gdict-source.c b/src/gdict-source.c
index 6afef9a..6afef9a 100644
--- a/libgdict/gdict-source.c
+++ b/src/gdict-source.c
diff --git a/libgdict/gdict-source.h b/src/gdict-source.h
index 609eb3f..609eb3f 100644
--- a/libgdict/gdict-source.h
+++ b/src/gdict-source.h
diff --git a/libgdict/gdict-speller.c b/src/gdict-speller.c
index 05889cf..05889cf 100644
--- a/libgdict/gdict-speller.c
+++ b/src/gdict-speller.c
diff --git a/libgdict/gdict-speller.h b/src/gdict-speller.h
index 2305c40..2305c40 100644
--- a/libgdict/gdict-speller.h
+++ b/src/gdict-speller.h
diff --git a/libgdict/gdict-strategy-chooser.c b/src/gdict-strategy-chooser.c
index a2a9ffb..a2a9ffb 100644
--- a/libgdict/gdict-strategy-chooser.c
+++ b/src/gdict-strategy-chooser.c
diff --git a/libgdict/gdict-strategy-chooser.h b/src/gdict-strategy-chooser.h
index dc3db46..dc3db46 100644
--- a/libgdict/gdict-strategy-chooser.h
+++ b/src/gdict-strategy-chooser.h
diff --git a/libgdict/gdict-utils.c b/src/gdict-utils.c
index f3ee8dc..f3ee8dc 100644
--- a/libgdict/gdict-utils.c
+++ b/src/gdict-utils.c
diff --git a/libgdict/gdict-utils.h b/src/gdict-utils.h
index ca97f5d..ca97f5d 100644
--- a/libgdict/gdict-utils.h
+++ b/src/gdict-utils.h
diff --git a/libgdict/gdict.h b/src/gdict.h
index 0fd2d54..0fd2d54 100644
--- a/libgdict/gdict.h
+++ b/src/gdict.h
diff --git a/src/meson.build b/src/meson.build
index 915331a..5f5dc99 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,23 +1,68 @@
+libgdict_version = meson.project_version().split('.')
+libgdict_major = libgdict_version[0].to_int()
+libgdict_minor = libgdict_version[1] in ['alpha', 'beta', 'rc'] ? 0 : libgdict_version[1].to_int()
+libgdict_micro = 0
+
+gdict_headers = [
+ 'gdict-context.h',
+ 'gdict-client-context.h',
+ 'gdict-database-chooser.h',
+ 'gdict-database-chooser-button.h',
+ 'gdict-defbox.h',
+ 'gdict-source-chooser.h',
+ 'gdict-source-loader.h',
+ 'gdict-source.h',
+ 'gdict-speller.h',
+ 'gdict-strategy-chooser.h',
+ 'gdict-utils.h',
+]
+
app_sources = [
'gdict-about.c',
'gdict-app.c',
'gdict-app.h',
+ 'gdict-client-context.c',
'gdict-common.c',
+ 'gdict-context.c',
+ 'gdict-database-chooser.c',
+ 'gdict-database-chooser-button.c',
+ 'gdict-defbox.c',
'gdict-pref-dialog.c',
'gdict-print.c',
'gdict-sidebar.c',
+ 'gdict-source-chooser.c',
'gdict-source-dialog.c',
+ 'gdict-source-loader.c',
+ 'gdict-source.c',
+ 'gdict-speller.c',
+ 'gdict-strategy-chooser.c',
+ 'gdict-utils.c',
'gdict-window.c',
'main.c',
]
-resources = gnome.compile_resources ('gdict-resources',
+gdict_enums = gnome.mkenums('gdict-enum-types',
+ sources: gdict_headers,
+ h_template: 'gdict-enum-types.h.in',
+ c_template: 'gdict-enum-types.c.in',
+ install_header: false,
+)
+
+gdict_marshal = gnome.genmarshal('gdict-marshal',
+ sources: 'gdict-marshal.list',
+ prefix: 'gdict_marshal',
+)
+
+gdict_resources = gnome.compile_resources('gdict-resources',
'gdict.gresource.xml',
source_dir: '.',
c_name: 'gdict',
)
gdict_cflags = [
+ '-D_GNU_SOURCE',
+ '-DG_LOG_DOMAIN="Gdict"',
+ '-DG_LOG_USE_STRUCTURED=1',
'-DPREFIX="@0@"'.format(gdict_prefix),
'-DSYSCONFDIR="@0@"'.format(gdict_sysconfdir),
'-DLIBDIR="@0@"'.format(gdict_libdir),
@@ -25,6 +70,11 @@ gdict_cflags = [
'-DPKGDATADIR="@0@"'.format(join_paths(gdict_datadir, 'gnome-dictionary')),
'-DGNOMELOCALEDIR="@0@"'.format(join_paths(gdict_datadir, 'locale')),
'-DAPPLICATION_ID="@0@"'.format(application_id),
+ '-DGDICTSOURCESDIR="@0@"'.format(join_paths(gdict_datadir, 'gdict-1.0', 'sources')),
+ '-DGDICT_ENABLE_INTERNALS=1',
+ '-DGDICT_MAJOR_VERSION=@0@'.format(libgdict_major),
+ '-DGDICT_MINOR_VERSION=@0@'.format(libgdict_minor),
+ '-DGDICT_MICRO_VERSION=@0@'.format(libgdict_micro),
]
if profile == 'devel' or gdict_minor_version in ['alpha', 'beta', 'rc']
@@ -36,9 +86,9 @@ endif
mathlib = cc.find_library('m', required: false)
executable('gnome-dictionary',
- sources: app_sources + resources,
+ sources: [ app_sources, gdict_enums, gdict_marshal, gdict_resources ],
c_args: gdict_cflags,
- dependencies: [ libgdict_dep, mathlib ],
+ dependencies: [ gio_dep, gtk_dep, ipv6_deps, mathlib ],
include_directories: root_inc,
install: true,
)