[rygel/wip/meson: 51/85] build: Basic meson support



commit dd2e6cdb249a06bce5c630986d0cd01a2e5a8d10
Author: Jens Georg <mail jensge org>
Date:   Mon May 8 19:00:08 2017 +0200

    build: Basic meson support

 meson.build                             |  62 +++++++++++++++
 src/librygel-core/meson.build           |  71 +++++++++++++++++
 src/librygel-renderer/meson.build       |  49 ++++++++++++
 src/librygel-server/meson.build         | 130 ++++++++++++++++++++++++++++++++
 src/media-engines/gstreamer/meson.build |  22 ++++++
 src/media-engines/meson.build           |   2 +
 src/meson.build                         |   4 +
 7 files changed, 340 insertions(+)
---
diff --git a/meson.build b/meson.build
new file mode 100644
index 00000000..7c63da0e
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,62 @@
+project('rygel', ['vala', 'c'],
+        version : '0.35.0')
+
+rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
+rygel_datadir = join_paths(get_option('prefix'), get_option('datadir'))
+rygel_plugindir = join_paths(get_option('prefix'), get_option('libdir'), 'rygel-2.6', 'plugins')
+rygel_enginedir = join_paths(get_option('prefix'), get_option('libdir'),
+'rygel-2.6', 'engines')
+rygel_presetdir = join_paths(rygel_datadir, 'rygel', 'presets')
+rygel_bigicondir = join_paths(rygel_datadir, 'rygel', 'icons', '120x120')
+rygel_smallicondir = join_paths(rygel_datadir, 'rygel', 'icons', '48x48')
+
+conf = configuration_data()
+conf.set('GETTEXT_PACKAGE', '"rygel"')
+conf.set('PACKAGE_NAME', '"Rygel"')
+conf.set('PACKAGE_STRING', '"Rygel @0@"'.format(meson.project_version()))
+conf.set('PACKAGE_VERSION', '"@0@"'.format(meson.project_version()))
+conf.set('ENGINE_DIR', '"@0@"'.format(rygel_enginedir))
+conf.set('PRESET_DIR', '"@0@"'.format(rygel_presetdir))
+conf.set('DATA_DIR', '"@0@"'.format(rygel_datadir))
+conf.set('PLUGIN_DIR', '"@0@"'.format(rygel_plugindir))
+conf.set('BIG_ICON_DIR', '"@0@"'.format(rygel_bigicondir))
+conf.set('SMALL_ICON_DIR', '"@0@"'.format(rygel_smallicondir))
+conf.set('SYS_CONFIG_DIR', '"@0@"'.format(rygel_sysconfdir))
+configure_file(output: 'config.h', configuration: conf)
+config_include = include_directories('.')
+
+add_global_arguments(['-include','config.h'], language : 'c')
+
+vala = meson.get_compiler('vala')
+gupnp = dependency('gupnp-1.0', version : '>= 0.24.14')
+gee = dependency('gee-0.8', version: '>= 0.8.0')
+gssdp = dependency('gssdp-1.0', version : '>= 0.13.0')
+gio = dependency('gio-2.0', version : '>= 2.26')
+gmodule = dependency('gmodule-2.0')
+libxml = dependency('libxml-2.0', version: '>= 2.7')
+gupnp_av = dependency('gupnp-av-1.0', version: '>= 0.12.8')
+gupnp_dlna = dependency('gupnp-dlna-2.0', version: '>= 0.9.4')
+soup = dependency('libsoup-2.4', version : '>= 2.44.0')
+mediaart = dependency('libmediaart-2.0', version : '>= 0.7.0')
+
+gstreamer = dependency('gstreamer-1.0', version : '>= 1.0')
+gstreamer_pbu = dependency('gstreamer-pbutils-1.0', version : '>= 1.0')
+gstreamer_base = dependency('gstreamer-base-1.0', version : '>= 1.0')
+
+posix = vala.find_library('posix')
+
+sed = find_program('sed')
+g_ir_compiler = find_program('g-ir-compiler')
+gir_dir = join_paths(get_option('datadir'), 'gir-1.0')
+typelib_dir = join_paths(get_option('libdir'), 'girepository-1.0')
+
+cc = meson.get_compiler('c')
+math = cc.find_library('m', required: false)
+
+common_deps = [gupnp, gee]
+
+core_deps = common_deps + [gssdp, gio, gmodule, libxml, posix, math]
+renderer_deps = common_deps + [gupnp_av, soup]
+server_deps = common_deps + [gssdp, gupnp_av, soup, mediaart, gmodule, libxml]
+
+subdir('src')
diff --git a/src/librygel-core/meson.build b/src/librygel-core/meson.build
new file mode 100644
index 00000000..90c8a6b4
--- /dev/null
+++ b/src/librygel-core/meson.build
@@ -0,0 +1,71 @@
+core_sources = [
+    'rygel-connection-manager.vala',
+    'rygel-basic-management.vala',
+    'rygel-basic-management-test.vala',
+    'rygel-basic-management-test-ping.vala',
+    'rygel-basic-management-test-nslookup.vala',
+    'rygel-basic-management-test-traceroute.vala',
+    'rygel-description-file.vala',
+    'rygel-dlna-profile.vala',
+    'rygel-energy-management.vala',
+    'rygel-root-device.vala',
+    'rygel-root-device-factory.vala',
+    'rygel-dbus-interface.vala',
+    'rygel-log-handler.vala',
+    'rygel-meta-config.vala',
+    'rygel-plugin-loader.vala',
+    'rygel-recursive-module-loader.vala',
+    'rygel-plugin.vala',
+    'rygel-resource-info.vala',
+    'rygel-media-device.vala',
+    'rygel-configuration.vala',
+    'rygel-base-configuration.vala',
+    'rygel-cmdline-config.vala',
+    'rygel-environment-config.vala',
+    'rygel-user-config.vala',
+    'rygel-state-machine.vala',
+    'rygel-v1-hacks.vala',
+    'rygel-icon-info.vala',
+    'rygel-xml-utils.vala',
+    'rygel-plugin-information.vala',
+    'rygel-energy-management-helper.c',
+    'rygel-build-config.vapi']
+
+build_config = declare_dependency(include_directories : config_include,
+                                  sources : 'rygel-build-config.vapi')
+
+
+core_lib = library('rygel-core-2.6', core_sources,
+        dependencies : core_deps,
+        include_directories: [config_include, include_directories('.')],
+        version: '2.0.4',
+        vala_gir : 'Rygel-2.6.gir',
+        vala_header : 'rygel-core.h',
+        install: true,
+        install_dir : [true, true, true, false])
+
+custom_target('RygelCore-2.6.typelib',
+               command: [g_ir_compiler, '--output', '@OUTPUT@', '@INPUT@'],
+               output: 'RygelCore-2.6.typelib',
+               input: 'RygelCore-2.6.gir',
+               depends: core_lib,
+               install: true,
+               install_dir: gir_dir)
+
+custom_target('RygelCore-2.6.gir',
+              command: [sed, '-e', 's,Rygel[.],RygelCore.,g',
+                        '-e', 's,namespace name="Rygel",namespace name="RygelCore",g',
+                        '@INPUT@'],
+              input: 'Rygel-2.6.gir',
+              output: 'RygelCore-2.6.gir',
+              capture: true,
+              install: true,
+              install_dir: typelib_dir)
+
+# need to add to get the current build dir as include dir
+rygel_core = declare_dependency(include_directories: include_directories('.'),
+                                dependencies: core_deps,
+                                link_with: core_lib)
+
+# necessary to be able to pass it to g-ir-compiler in other libs
+core_girdir = meson.current_build_dir()
diff --git a/src/librygel-renderer/meson.build b/src/librygel-renderer/meson.build
new file mode 100644
index 00000000..656e20e8
--- /dev/null
+++ b/src/librygel-renderer/meson.build
@@ -0,0 +1,49 @@
+renderer_sources = [
+    'rygel-media-renderer-plugin.vala',
+    'rygel-media-player.vala',
+    'rygel-media-renderer.vala',
+    'rygel-player-controller.vala',
+    'rygel-av-transport.vala',
+    'rygel-default-player-controller.vala',
+    'rygel-rendering-control.vala',
+    'rygel-sink-connection-manager.vala',
+    'rygel-time-utils.vala',
+    'rygel-changelog.vala',
+    'rygel-volume.vala']
+
+renderer_lib = library('rygel-renderer-2.6', renderer_sources,
+        dependencies : renderer_deps + [build_config, rygel_core],
+        version: '2.0.4',
+        vala_gir : 'Rygel-2.6.gir',
+        vala_header : 'rygel-renderer.h',
+        install: true,
+        install_dir : [true, true, true, false])
+
+custom_target('RygelRenderer-2.6.typelib',
+               command: [g_ir_compiler,
+                        '--output', '@OUTPUT@',
+                        '--includedir', core_girdir,
+                        '@INPUT@'],
+               output: 'RygelRenderer-2.6.typelib',
+               input: 'RygelRenderer-2.6.gir',
+               depends: renderer_lib,
+               install: true,
+               install_dir: typelib_dir)
+
+custom_target('RygelRenderer-2.6.gir',
+              command: [sed, '-e', 's,Rygel[.],RygelRenderer.,g',
+                                          '-e', 's,namespace name="Rygel",namespace name="RygelRenderer",g',
+                                          '-e', 's,RygelRenderer[.]Plugin,RygelCore.Plugin,g',
+                                          '-e', 's,RygelRenderer[.]MediaDevice,RygelCore.MediaDevice,g',
+                                          '-e', 's|<package name="rygel-renderer-2.6"/>|<include 
name="RygelCore" version="2.6"/><package name="rygel-renderer-2.6"/>|',
+                        '@INPUT@'],
+              input: 'Rygel-2.6.gir',
+              output: 'RygelRenderer-2.6.gir',
+              capture: true,
+              install: true,
+              install_dir: join_paths(get_option('datadir'),'gir-1.0'))
+rygel_renderer = declare_dependency(include_directories : include_directories('.'),
+                                    dependencies : renderer_deps,
+                                    link_with: renderer_lib)
+
+renderer_girdir = meson.current_build_dir()
diff --git a/src/librygel-server/meson.build b/src/librygel-server/meson.build
new file mode 100644
index 00000000..579be060
--- /dev/null
+++ b/src/librygel-server/meson.build
@@ -0,0 +1,130 @@
+server_sources = [
+    'rygel-audio-item.vala',
+    'rygel-image-item.vala',
+    'rygel-logical-expression.vala',
+    'rygel-media-art-store.vala',
+    'rygel-media-objects.vala',
+    'rygel-music-item.vala',
+    'rygel-photo-item.vala',
+    'rygel-relational-expression.vala',
+    'rygel-simple-container.vala',
+    'rygel-subtitle.vala',
+    'rygel-thumbnail.vala',
+    'rygel-video-item.vala',
+    'rygel-media-container.vala',
+    'rygel-media-item.vala',
+    'rygel-media-file-item.vala',
+    'rygel-media-object.vala',
+    'rygel-media-resource.vala',
+    'rygel-media-server-plugin.vala',
+    'rygel-search-expression.vala',
+    'rygel-searchable-container.vala',
+    'rygel-trackable-container.vala',
+    'rygel-trackable-item.vala',
+    'rygel-visual-item.vala',
+    'rygel-writable-container.vala',
+    'rygel-media-server.vala',
+    'rygel-media-engine.vala',
+    'rygel-http-seek.vala',
+    'rygel-data-source.vala',
+    'rygel-updatable-object.vala',
+    'rygel-playlist-item.vala',
+    'rygel-browse.vala',
+    'rygel-client-hacks.vala',
+    'rygel-content-directory.vala',
+    'rygel-dbus-thumbnailer.vala',
+    'rygel-engine-loader.vala',
+    'rygel-http-byte-seek-request.vala',
+    'rygel-http-byte-seek-response.vala',
+    'rygel-free-desktop-interfaces.vala',
+    'rygel-http-get-handler.vala',
+    'rygel-http-get.vala',
+    'rygel-http-thumbnail-handler.vala',
+    'rygel-http-subtitle-handler.vala',
+    'rygel-http-item-uri.vala',
+    'rygel-http-post.vala',
+    'rygel-http-request.vala',
+    'rygel-http-response.vala',
+    'rygel-http-response-element.vala',
+    'rygel-http-server.vala',
+    'rygel-http-time-seek-request.vala',
+    'rygel-http-time-seek-response.vala',
+    'rygel-http-resource-handler.vala',
+    'rygel-import-resource.vala',
+    'rygel-object-creator.vala',
+    'rygel-reference-creator.vala',
+    'rygel-item-destroyer.vala',
+    'rygel-item-updater.vala',
+    'rygel-object-removal-queue.vala',
+    'rygel-last-change-entry.vala',
+    'rygel-last-change-obj-add.vala',
+    'rygel-last-change-obj-del.vala',
+    'rygel-last-change-obj-mod.vala',
+    'rygel-last-change-st-done.vala',
+    'rygel-last-change.vala',
+    'rygel-lg-tv-hacks.vala',
+    'rygel-m3u-playlist.vala',
+    'rygel-media-query-action.vala',
+    'rygel-media-receiver-registrar.vala',
+    'rygel-panasonic-hacks.vala',
+    'rygel-samsung-tv-hacks.vala',
+    'rygel-seek-hacks.vala',
+    'rygel-search-criteria-parser.vala',
+    'rygel-search.vala',
+    'rygel-serializer.vala',
+    'rygel-source-connection-manager.vala',
+    'rygel-subtitle-manager.vala',
+    'rygel-thumbnailer.vala',
+    'rygel-wmp-hacks.vala',
+    'rygel-xbmc-hacks.vala',
+    'rygel-xbmc4xbox-hacks.vala',
+    'rygel-xbox-hacks.vala',
+    'rygel-phillips-hacks.vala',
+    'rygel-data-sink.vala',
+    'rygel-playspeed.vala',
+    'rygel-playspeed-request.vala',
+    'rygel-playspeed-response.vala',
+    'rygel-dtcp-cleartext-request.vala',
+    'rygel-dtcp-cleartext-response.vala',
+    'rygel-dlna-available-seek-request.vala',
+    'rygel-dlna-available-seek-response.vala']
+
+server_lib = library('rygel-server-2.6', server_sources,
+        dependencies : server_deps + [build_config, rygel_core],
+        version: '2.0.4',
+        vala_gir : 'Rygel-2.6.gir',
+        vala_header : 'rygel-server.h',
+        install: true,
+        install_dir : [true, true, true, false])
+
+custom_target('RygelServer-2.6.typelib',
+               command: [g_ir_compiler,
+                        '--output', '@OUTPUT@',
+                        '--includedir', core_girdir,
+                        '@INPUT@'],
+               output: 'RygelServer-2.6.typelib',
+               input: 'RygelServer-2.6.gir',
+               depends: server_lib,
+               install: true,
+               install_dir: typelib_dir)
+
+custom_target('RygelServer-2.6.gir',
+              command: [sed, '-e', 's,Rygel\.,RygelServer.,g',
+                                          '-e', 's,namespace name="Rygel",namespace name="RygelServer",g',
+                                          '-e', 's,RygelServer[.]Plugin,RygelCore.Plugin,g',
+                                          '-e', 's,RygelServer[.]MediaDevice,RygelCore.MediaDevice,g',
+                                          '-e', 's|<package name="rygel-server-2.6"/>|<include 
name="RygelCore" version="2.6"/><package name="rygel-server-2.6"/>|',
+                        '@INPUT@'],
+              input: 'Rygel-2.6.gir',
+              output: 'RygelServer-2.6.gir',
+              capture: true,
+              install: true,
+              install_dir: join_paths(get_option('datadir'),'gir-1.0'))
+
+# need to add to get the current build dir as include dir
+rygel_server = declare_dependency(include_directories: include_directories('.'),
+                                  dependencies : server_deps,
+                                  link_with: server_lib)
+
+# necessary to be able to pass it to g-ir-compiler in other libs
+server_girdir = meson.current_build_dir()
diff --git a/src/media-engines/gstreamer/meson.build b/src/media-engines/gstreamer/meson.build
new file mode 100644
index 00000000..a6dbd387
--- /dev/null
+++ b/src/media-engines/gstreamer/meson.build
@@ -0,0 +1,22 @@
+media_engine_gst_sources = [
+    'rygel-aac-transcoder.vala',
+    'rygel-audio-transcoder.vala',
+    'rygel-avc-transcoder.vala',
+    'rygel-gst-data-source.vala',
+    'rygel-gst-media-engine.vala',
+    'rygel-gst-sink.vala',
+    'rygel-gst-transcoder.vala',
+    'rygel-gst-utils.vala',
+    'rygel-l16-transcoder.vala',
+    'rygel-mp2ts-transcoder.vala',
+    'rygel-mp3-transcoder.vala',
+    'rygel-video-transcoder.vala',
+    'rygel-wmv-transcoder.vala'
+    ]
+
+
+library('rygel-media-engine-gst',
+        media_engine_gst_sources,
+        dependencies: [build_config, gee, gupnp_av, libxml, gio, rygel_core, rygel_server, gstreamer, 
gstreamer_pbu, gstreamer_base, gupnp_dlna],
+        install: true,
+        install_dir : rygel_enginedir)
diff --git a/src/media-engines/meson.build b/src/media-engines/meson.build
new file mode 100644
index 00000000..e859166c
--- /dev/null
+++ b/src/media-engines/meson.build
@@ -0,0 +1,2 @@
+subdir('gstreamer')
+#subdir('simple')
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 00000000..76e26a9b
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,4 @@
+subdir('librygel-core')
+subdir('librygel-renderer')
+subdir('librygel-server')
+subdir('media-engines')


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