[gnome-calendar] project: move evolution files to contrib/



commit c7f7506d52d6d7fe1c1691bfd6bcbd72c820e8ff
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Sep 7 11:41:05 2017 -0300

    project: move evolution files to contrib/
    
    It's better for the project organization if we nicely
    organize external projects' files in contrib/, and our
    own files in src/.

 .../evolution}/e-cal-data-model-subscriber.c       |    4 ---
 .../evolution}/e-cal-data-model-subscriber.h       |    0
 {src => contrib/evolution}/e-cal-data-model.c      |    4 ---
 {src => contrib/evolution}/e-cal-data-model.h      |    0
 contrib/evolution/meson.build                      |   21 ++++++++++++++++
 contrib/meson.build                                |    1 +
 meson.build                                        |   26 +++++++------------
 src/meson.build                                    |   17 +++++++++++-
 8 files changed, 47 insertions(+), 26 deletions(-)
---
diff --git a/src/e-cal-data-model-subscriber.c b/contrib/evolution/e-cal-data-model-subscriber.c
similarity index 99%
rename from src/e-cal-data-model-subscriber.c
rename to contrib/evolution/e-cal-data-model-subscriber.c
index b08b0c1..04af1ae 100644
--- a/src/e-cal-data-model-subscriber.c
+++ b/contrib/evolution/e-cal-data-model-subscriber.c
@@ -16,10 +16,6 @@
  * Authors: Milan Crha <mcrha redhat com>
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "e-cal-data-model-subscriber.h"
 
 G_DEFINE_INTERFACE (ECalDataModelSubscriber, e_cal_data_model_subscriber, G_TYPE_OBJECT)
diff --git a/src/e-cal-data-model-subscriber.h b/contrib/evolution/e-cal-data-model-subscriber.h
similarity index 100%
rename from src/e-cal-data-model-subscriber.h
rename to contrib/evolution/e-cal-data-model-subscriber.h
diff --git a/src/e-cal-data-model.c b/contrib/evolution/e-cal-data-model.c
similarity index 99%
rename from src/e-cal-data-model.c
rename to contrib/evolution/e-cal-data-model.c
index 311bc74..85cb8f5 100644
--- a/src/e-cal-data-model.c
+++ b/contrib/evolution/e-cal-data-model.c
@@ -16,10 +16,6 @@
  * Authors: Milan Crha <mcrha redhat com>
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <glib.h>
 /*#include <glib/gi18n-lib.h>*/
 
diff --git a/src/e-cal-data-model.h b/contrib/evolution/e-cal-data-model.h
similarity index 100%
rename from src/e-cal-data-model.h
rename to contrib/evolution/e-cal-data-model.h
diff --git a/contrib/evolution/meson.build b/contrib/evolution/meson.build
new file mode 100644
index 0000000..9a84e22
--- /dev/null
+++ b/contrib/evolution/meson.build
@@ -0,0 +1,21 @@
+libevolution_files = files(
+  'e-cal-data-model.c',
+  'e-cal-data-model-subscriber.c'
+)
+
+libevolution_deps = [
+  libecal_dep,
+  libedataserver_dep,
+]
+
+libevolution = static_library(
+      'evolution',
+     dependencies: libevolution_deps,
+          sources: libevolution_files,
+              pic: true,
+)
+
+libevolution_dep = declare_dependency(
+            link_with: libevolution,
+  include_directories: include_directories('.'),
+)
diff --git a/contrib/meson.build b/contrib/meson.build
new file mode 100644
index 0000000..5eb8cde
--- /dev/null
+++ b/contrib/meson.build
@@ -0,0 +1 @@
+subdir('evolution')
diff --git a/meson.build b/meson.build
index 922646d..49aeac5 100644
--- a/meson.build
+++ b/meson.build
@@ -167,26 +167,19 @@ config_h.set('HAVE_LIBICAL', libical_dep.found())
 assert(cc.has_function('icaltime_days_in_year', dependencies: libical_dep),
        'Error: icaltime_days_in_year() not found in libical!. Upgrade your libical library.')
 
+gsettings_desktop_schemas_dep = dependency('gsettings-desktop-schemas', version: '>= 3.21.2')
+libedataserverui_dep = dependency('libedataserverui-1.2', version: '>= 3.17.1')
+libedataserver_dep = dependency('libedataserver-1.2', version: '>= 3.17.1')
+libecal_dep = dependency('libecal-1.2', version: '>= 3.13.90')
+libsoup_dep = dependency('libsoup-2.4')
 glib_dep = dependency('glib-2.0', version: '>= 2.43.4')
 gtk_dep = dependency('gtk+-3.0', version: '>= 3.21.6')
-
-calendar_deps = [
-  glib_dep,
-  gtk_dep,
-  libical_dep,
-  dependency('gio-2.0', version: '>= 2.43.4'),
-  dependency('gmodule-export-2.0'),
-  dependency('goa-1.0', version: '>= 3.2.0'),
-  dependency('gsettings-desktop-schemas', version: '>= 3.21.2'),
-  dependency('libecal-1.2', version: '>= 3.13.90'),
-  dependency('libedataserver-1.2', version: '>= 3.17.1'),
-  dependency('libedataserverui-1.2', version: '>= 3.17.1'),
-  dependency('libsoup-2.4'),
-  cc.find_library('m')
-]
+gio_dep = dependency('gio-2.0', version: '>= 2.43.4')
+goa_dep = dependency('goa-1.0', version: '>= 3.2.0')
+m_dep = cc.find_library('m')
 
 configure_file(
-  output: 'config.h',
+         output: 'config.h',
   configuration: config_h
 )
 
@@ -204,6 +197,7 @@ po_dir = join_paths(meson.source_root(), 'po')
 # Subdirs #
 ###########
 
+subdir('contrib')
 subdir('data')
 subdir('src')
 subdir('po')
diff --git a/src/meson.build b/src/meson.build
index 9036b76..2499a46 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,6 +2,21 @@ src_inc = include_directories('.')
 
 enum_headers = files('gcal-utils.h')
 
+calendar_deps = [
+  gsettings_desktop_schemas_dep,
+  libedataserverui_dep,
+  libedataserver_dep,
+  libevolution_dep,
+  libecal_dep,
+  libsoup_dep,
+  libical_dep,
+  glib_dep,
+  gtk_dep,
+  gio_dep,
+  goa_dep,
+  m_dep,
+]
+
 sources = files(
   'views/gcal-month-view.c',
   'views/gcal-range-tree.c',
@@ -9,8 +24,6 @@ sources = files(
   'views/gcal-week-header.c',
   'views/gcal-week-view.c',
   'views/gcal-year-view.c',
-  'e-cal-data-model-subscriber.c',
-  'e-cal-data-model.c',
   'gcal-application.c',
   'gcal-clock.c',
   'gcal-date-chooser-day.c',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]