bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=ac304ea2a97df67164bbc287d38413b459dce73f

commit ac304ea2a97df67164bbc287d38413b459dce73f
Author: Marcel Hollerbach <marcel-hollerb...@t-online.de>
Date:   Tue Oct 3 18:52:45 2017 +0200

    time for meson!
---
 data/desktop/meson.build        | 14 ++++++++++
 data/extra/skeleton/meson.build | 15 +++++++++++
 data/images/meson.build         |  4 +++
 data/meson.build                |  3 +++
 doc/meson.build                 |  6 +++++
 meson.build                     | 57 +++++++++++++++++++++++++++++++++++++++++
 meson_options.txt               |  2 ++
 po/LINGUAS                      |  0
 po/meson.build                  |  5 ++++
 scripts/clang_include_dir.sh    |  3 +++
 src/bin/editor/meson.build      |  6 +++++
 src/bin/language/meson.build    |  4 +++
 src/bin/mainview/meson.build    |  8 ++++++
 src/bin/meson.build             | 47 +++++++++++++++++++++++++++++++++
 src/bin/screens/meson.build     | 10 ++++++++
 src/lib/meson.build             | 35 +++++++++++++++++++++++++
 src/meson.build                 |  3 +++
 17 files changed, 222 insertions(+)

diff --git a/data/desktop/meson.build b/data/desktop/meson.build
new file mode 100644
index 0000000..b221a81
--- /dev/null
+++ b/data/desktop/meson.build
@@ -0,0 +1,14 @@
+desktop_config = configuration_data()
+desktop_config.set('VERSION', meson.project_version())
+desktop_config.set('PACKAGE_NAME', meson.project_name())
+
+configure_file(
+  input : 'edi.desktop.in',
+  output : 'edi.desktop',
+  install_dir : join_paths(get_option('prefix'), 'share/applications/'),
+  configuration : desktop_config
+)
+
+install_data(['edi.png'],
+             install_dir: join_paths(get_option('prefix'), 
'share/icons/hicolor/256x256/apps')
+)
diff --git a/data/extra/skeleton/meson.build b/data/extra/skeleton/meson.build
new file mode 100644
index 0000000..fc134d5
--- /dev/null
+++ b/data/extra/skeleton/meson.build
@@ -0,0 +1,15 @@
+tar = find_program('tar')
+
+skeleton_names = ['eflproject', 'eflproject_python']
+
+foreach skeleton_name : skeleton_names
+
+  custom_target('skeleton ' + skeleton_name,
+     command : [tar, 'zcf', '@OUTPUT@', '@INPUT@'],
+     input : skeleton_name,
+     output : skeleton_name + '.tar.gz',
+     install_dir: join_paths(get_option('prefix'), get_option('datadir'), 
'edi', 'skeleton'),
+     install : true,
+  )
+
+endforeach
diff --git a/data/images/meson.build b/data/images/meson.build
new file mode 100644
index 0000000..4f4a4e1
--- /dev/null
+++ b/data/images/meson.build
@@ -0,0 +1,4 @@
+
+install_data(['about.png', 'welcome.png'],
+             install_dir: join_paths(get_option('prefix'), 
get_option('datadir'), 'edi', 'images')
+)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..49fa804
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,3 @@
+subdir('desktop')
+subdir('images')
+subdir('extra/skeleton')
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 0000000..cd5414a
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,6 @@
+configure_file(
+  input : 'edi.1.in',
+  output : 'edi.1',
+  install_dir : join_paths(get_option('prefix'), 'share/doc/edi/'),
+  configuration : config_h
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..94c5463
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,57 @@
+project(
+  'edi', 'c',
+  version : '0.0.1',
+  default_options: [ 'c_std=gnu99', 'warning_level=2' ],
+  meson_version : '>= 0.40.0')
+
+add_global_arguments('-DHAVE_CONFIG_H=1', '-DHAVE_CONFIG=1', language: 'c')
+
+config_h = configuration_data()
+config_h.set_quoted('PACKAGE'          , meson.project_name())
+config_h.set_quoted('PACKAGE_VERSION'  , meson.project_version())
+config_h.set_quoted('PACKAGE_URL'      , 'https://www.enlightenment.org')
+config_h.set_quoted('PACKAGE_TARNAME'  , meson.project_name())
+config_h.set_quoted('PACKAGE_BUGREPORT', 
'enlightenment-devel@lists.sourceforge.net')
+config_h.set_quoted('PACKAGE_STRING'   , meson.project_name() + ' ' + 
meson.project_version())
+config_h.set_quoted('PACKAGE_NAME'     , meson.project_name())
+config_h.set_quoted('PACKAGE_BIN_DIR', get_option('bindir'))
+config_h.set_quoted('PACKAGE_LIB_DIR', get_option('libdir'))
+config_h.set_quoted('PACKAGE_DATA_DIR', get_option('datadir'))
+config_h.set_quoted('PACKAGE_DOC_DIR', get_option('infodir'))
+
+config_h.set_quoted('EFL_BETA_API_SUPPORT'     , '1')
+
+elm = dependency('elementary')
+top_inc = include_directories('.')
+
+cc = meson.get_compiler('c')
+
+
+
+config_h.set_quoted('EFL_CFLAGS', run_command(find_program('pkg-config'), 
'--libs', '--cflags', 'elementary').stdout().strip())
+
+if get_option('bear') == true
+  bear = find_program('bear')
+  config_h.set_quoted('BEAR_COMMAND', 'bear')
+endif
+
+if get_option('libclang') == true
+  clang = cc.find_library('clang')
+
+  clang_include_dir_command = 
run_command(find_program('scripts/clang_include_dir.sh'))
+  clang_include_dir = clang_include_dir_command.stdout().strip()
+
+  config_h.set_quoted('CLANG_INCLUDES', clang_include_dir)
+  config_h.set('HAVE_LIBCLANG', '1')
+endif
+
+subdir('po')
+subdir('src')
+subdir('doc')
+subdir('data')
+
+configure_file(
+  output : 'config.h',
+  install : false,
+  configuration: config_h
+)
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..10ae169
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,2 @@
+option('libclang', type : 'boolean', value : true, description : 'Weather to 
have libclang support')
+option('bear', type : 'boolean', value : true, description : 'Weather to have 
bear support')
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..e69de29
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..0fdcc8d
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,5 @@
+i18n = import('i18n')
+i18n.gettext('edi')
+
+config_h.set('ENABLE_NLS', 1)
+config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), 
get_option('localedir')))
diff --git a/scripts/clang_include_dir.sh b/scripts/clang_include_dir.sh
new file mode 100755
index 0000000..a5b4ce5
--- /dev/null
+++ b/scripts/clang_include_dir.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+clang -E - -v < /dev/null 2>&1 | grep "^ /usr" | grep clang
diff --git a/src/bin/editor/meson.build b/src/bin/editor/meson.build
new file mode 100644
index 0000000..961b10d
--- /dev/null
+++ b/src/bin/editor/meson.build
@@ -0,0 +1,6 @@
+src += files([
+   'edi_editor.c',
+   'edi_editor.h',
+   'edi_editor_documentation.c',
+   'edi_editor_search.c'
+])
diff --git a/src/bin/language/meson.build b/src/bin/language/meson.build
new file mode 100644
index 0000000..c65e6ff
--- /dev/null
+++ b/src/bin/language/meson.build
@@ -0,0 +1,4 @@
+src += files([
+  'edi_language_provider.c',
+  'edi_language_provider.h',
+])
diff --git a/src/bin/mainview/meson.build b/src/bin/mainview/meson.build
new file mode 100644
index 0000000..73db783
--- /dev/null
+++ b/src/bin/mainview/meson.build
@@ -0,0 +1,8 @@
+src += files([
+  'edi_mainview.c',
+  'edi_mainview.h',
+  'edi_mainview_item.c',
+  'edi_mainview_item.h',
+  'edi_mainview_panel.c',
+  'edi_mainview_panel.h',
+])
diff --git a/src/bin/meson.build b/src/bin/meson.build
new file mode 100644
index 0000000..352f85e
--- /dev/null
+++ b/src/bin/meson.build
@@ -0,0 +1,47 @@
+packages = ['editor','language','mainview','screens',]
+
+src = files([
+  'edi_config.c',
+  'edi_config.h',
+  'edi_consolepanel.c',
+  'edi_consolepanel.h',
+  'edi_content_provider.c',
+  'edi_content_provider.h',
+  'edi_debugpanel.c',
+  'edi_debugpanel.h',
+  'edi_file.c',
+  'edi_file.h',
+  'edi_filepanel.c',
+  'edi_filepanel.h',
+  'edi_logpanel.c',
+  'edi_logpanel.h',
+  'edi_main.c',
+  'edi_private.h',
+  'edi_searchpanel.c',
+  'edi_searchpanel.h',
+])
+
+foreach package : packages
+   subdir(package)
+endforeach
+
+executable('edi', src,
+  dependencies : [elm, edi_lib, clang],
+  install : true
+)
+
+edi_scm_src = files([
+  'edi_scm_main.c',
+  'edi_scm_ui.c',
+  'edi_scm_ui.h'
+])
+
+executable('edi_scm', edi_scm_src,
+  dependencies : [elm, edi_lib],
+  install : true
+)
+
+executable('edi_build', 'edi_build_main.c',
+  dependencies : [elm, edi_lib],
+  install : true
+)
diff --git a/src/bin/screens/meson.build b/src/bin/screens/meson.build
new file mode 100644
index 0000000..b7fc785
--- /dev/null
+++ b/src/bin/screens/meson.build
@@ -0,0 +1,10 @@
+src += files([
+  'edi_about.c',
+  'edi_file_screens.c',
+  'edi_file_screens.h',
+  'edi_screens.c',
+  'edi_screens.h',
+  'edi_settings.c',
+  'edi_settings_font.c',
+  'edi_welcome.c',
+])
diff --git a/src/lib/meson.build b/src/lib/meson.build
new file mode 100644
index 0000000..2e27825
--- /dev/null
+++ b/src/lib/meson.build
@@ -0,0 +1,35 @@
+src = files([
+  'Edi.h',
+  'edi.c',
+  'edi_build_provider.c',
+  'edi_build_provider.h',
+  'edi_build_provider_cargo.c',
+  'edi_build_provider_cmake.c',
+  'edi_build_provider_make.c',
+  'edi_build_provider_meson.c',
+  'edi_build_provider_python.c',
+  'edi_builder.c',
+  'edi_builder.h',
+  'edi_create.c',
+  'edi_create.h',
+  'edi_exe.c',
+  'edi_exe.h',
+  'edi_path.c',
+  'edi_path.h',
+  'edi_private.h',
+  'edi_scm.c',
+  'edi_scm.h',
+  'md5.c',
+  'md5.h',
+])
+
+edi_lib_lib = library('edi_lib', src,
+  dependencies : [elm],
+  include_directories : top_inc,
+  install : true
+)
+
+edi_lib = declare_dependency(
+   link_with : edi_lib_lib,
+   include_directories : [include_directories('./'), top_inc]
+)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..67068a2
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,3 @@
+subdir('lib')
+subdir('bin')
+#subdir('tests')

-- 


Reply via email to