[totem] build: Port to meson build system
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] build: Port to meson build system
- Date: Fri, 23 Jun 2017 16:04:02 +0000 (UTC)
commit 95256079d3457056fbcdf48e5d618a6e57af0439
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Jun 9 22:38:19 2017 +0200
build: Port to meson build system
With additional testing and patches from Bastien Nocera
<hadess hadess net>
https://bugzilla.gnome.org/show_bug.cgi?id=783205
.gitmodules | 6 +-
Makefile.am | 4 +-
autogen.sh | 2 +-
configure.ac | 7 +-
data/appdata/meson.build | 10 +
data/icons/meson.build | 20 ++
data/meson.build | 163 +++++++++++
data/org.gnome.Totem.desktop.meson | 18 ++
data/totem.thumbnailer.meson | 4 +
docs/meson.build | 1 +
docs/reference/Makefile.am | 4 +-
docs/reference/meson.build | 98 +++++++
help/meson.build | 54 ++++
libgd | 1 -
meson.build | 357 +++++++++++++++++++++++++
meson_compile_python.py | 11 +
meson_options.txt | 8 +
meson_post_install.py | 15 +
po/meson.build | 1 +
src/Makefile.am | 16 +-
src/backend/meson.build | 121 +++++++++
src/gst/meson.build | 60 ++++
src/meson.build | 323 ++++++++++++++++++++++
src/plugins/apple-trailers/meson.build | 24 ++
src/plugins/autoload-subtitles/meson.build | 24 ++
src/plugins/brasero-disc-recorder/meson.build | 27 ++
src/plugins/dbusservice/meson.build | 19 ++
src/plugins/gromit/meson.build | 24 ++
src/plugins/im-status/meson.build | 24 ++
src/plugins/lirc/meson.build | 31 +++
src/plugins/media-player-keys/meson.build | 26 ++
src/plugins/meson.build | 150 +++++++++++
src/plugins/ontop/meson.build | 24 ++
src/plugins/opensubtitles/meson.build | 40 +++
src/plugins/properties/meson.build | 26 ++
src/plugins/pythonconsole/meson.build | 39 +++
src/plugins/recent/meson.build | 24 ++
src/plugins/rotation/meson.build | 43 +++
src/plugins/sample-vala/meson.build | 34 +++
src/plugins/samplepython/meson.build | 23 ++
src/plugins/save-file/meson.build | 27 ++
src/plugins/screensaver/meson.build | 24 ++
src/plugins/screenshot/meson.build | 49 ++++
src/plugins/skipto/meson.build | 35 +++
src/plugins/variable-rate/meson.build | 24 ++
src/plugins/vimeo/meson.build | 24 ++
src/plugins/zeitgeist-dp/meson.build | 43 +++
src/properties/meson.build | 18 ++
subprojects/Makefile.am | 3 +
subprojects/libgd | 1 +
50 files changed, 2135 insertions(+), 19 deletions(-)
---
diff --git a/.gitmodules b/.gitmodules
index bfd964e..054b71c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,3 @@
-[submodule "libgd"]
- path = libgd
- url = git://git.gnome.org/libgd
+[submodule "subprojects/libgd"]
+ path = subprojects/libgd
+ url = https://git.gnome.org/browse/libgd
diff --git a/Makefile.am b/Makefile.am
index fade4da..214e2ad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-ACLOCAL_AMFLAGS = -I m4 -I libgd ${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS = -I m4 -I subprojects/libgd ${ACLOCAL_FLAGS}
-SUBDIRS = libgd po data help src docs
+SUBDIRS = subprojects po data help src docs
EXTRA_DIST = \
license_change \
diff --git a/autogen.sh b/autogen.sh
index 235ee4e..8b8fc41 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,7 +7,7 @@ test -z "$srcdir" && srcdir=.
olddir=`pwd`
PKG_NAME="totem"
-ACLOCAL_FLAGS="-I libgd $ACLOCAL_FLAGS"
+ACLOCAL_FLAGS="-I subprojects/libgd $ACLOCAL_FLAGS"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
diff --git a/configure.ac b/configure.ac
index aa38349..75537ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,8 +247,10 @@ PKG_CHECK_MODULES(PROPERTIES, gtk+-3.0 >= $GTK_REQS)
LIBGD_INIT([
tagged-entry
main-view
+ gtk-hacks
+ view-common
static
- ])
+ ][subprojects/libgd])
dnl ================================================================
@@ -536,7 +538,8 @@ AC_SUBST([AM_LDFLAGS])
AC_CONFIG_FILES([
Makefile
totem.spec
-libgd/Makefile
+subprojects/Makefile
+subprojects/libgd/Makefile
src/Makefile
src/gst/Makefile
src/properties/Makefile
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
new file mode 100644
index 0000000..e4d6fde
--- /dev/null
+++ b/data/appdata/meson.build
@@ -0,0 +1,10 @@
+info_name = 'org.gnome.Totem.metainfo.xml'
+
+custom_target(
+ info_name,
+ input: 'org.gnome.Totem.appdata.xml.in',
+ output: info_name,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'metainfo')
+)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000..2d8794a
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,20 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'org.gnome.Totem.png'),
+ install_dir: join_paths(totem_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'symbolic/org.gnome.Totem-symbolic.svg',
+ install_dir: join_paths(totem_datadir, 'icons', 'hicolor', 'symbolic', 'apps')
+)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..85bbd32
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,163 @@
+subdir('appdata')
+subdir('icons')
+
+desktop_sh = find_program('desktop.sh')
+thumbnailer_sh = find_program('thumbnailer.sh')
+mime_type_include_sh = find_program('mime-type-include.sh')
+mime_type_imports_sh = find_program('mime-type-imports.sh')
+uri_scheme_include_sh = find_program('uri-scheme-include.sh')
+
+mime_type_list = files('mime-type-list.txt')
+uri_schemes_list = files('uri-schemes-list.txt')
+
+pod2man = find_program('pod2man', required: false)
+
+if pod2man.found()
+ thumbnailer_name = 'totem-video-thumbnailer'
+ pod2man_opts = [
+ '-c', '""',
+ '-s', '1',
+ '-q', 'none',
+ '-n', thumbnailer_name,
+ '-r', 'GNOME'
+ ]
+
+ custom_target(
+ thumbnailer_name + '.1',
+ input: thumbnailer_name + '.pod',
+ output: thumbnailer_name + '.1',
+ command: [pod2man, pod2man_opts, '@INPUT@', '@OUTPUT@'],
+ install: true,
+ install_dir: join_paths(totem_mandir, 'man1')
+ )
+
+ install_data(
+ 'totem.1',
+ install_dir: join_paths(totem_mandir, 'man1')
+ )
+else
+ message('Man page generation disabled')
+endif
+
+ui_files = files(
+ 'controls.ui',
+ 'playlist.ui',
+ 'preferences.ui',
+ 'properties.ui',
+ 'shortcuts.ui',
+ 'totem.ui',
+ 'uri.ui'
+)
+
+install_data(
+ ui_files,
+ install_dir: totem_pkgdatadir
+)
+
+r = run_command(desktop_sh, mime_type_list, uri_schemes_list)
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', totem_version)
+desktop_conf.set('MIME_TYPE', r.stdout().strip())
+
+desktop = 'org.gnome.Totem.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.meson',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'applications')
+)
+
+service_conf = configuration_data()
+service_conf.set('bindir', totem_bindir)
+
+service = 'org.gnome.Totem.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+r = run_command(thumbnailer_sh, mime_type_list)
+
+thumbnailer_conf = configuration_data()
+thumbnailer_conf.set('BINDIR', totem_bindir)
+thumbnailer_conf.set('MIME_TYPE', r.stdout().strip())
+
+thumbnailer = 'totem.thumbnailer'
+
+configure_file(
+ input: thumbnailer + '.meson',
+ output: thumbnailer,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'thumbnailers'),
+ configuration: thumbnailer_conf
+)
+
+gen_sources = []
+
+totem_mime_header = 'totem-mime-types.h'
+
+gen_sources += custom_target(
+ totem_mime_header,
+ output: totem_mime_header,
+ capture: true,
+ command: [mime_type_include_sh, mime_type_list]
+)
+
+nautilus_mime_header = 'nautilus-video-mime-types.h'
+
+custom_target(
+ nautilus_mime_header,
+ output: nautilus_mime_header,
+ capture: true,
+ command: [mime_type_include_sh, '--nautilus', mime_type_list]
+)
+
+totem_mime_js = 'totemMimeTypes.js'
+
+custom_target(
+ totem_mime_js,
+ output: totem_mime_js,
+ capture: true,
+ command: [mime_type_imports_sh, mime_type_list]
+)
+
+totem_uri_header = 'totem-uri-schemes.h'
+
+gen_sources += custom_target(
+ totem_uri_header,
+ output: totem_uri_header,
+ capture: true,
+ command: [uri_scheme_include_sh, uri_schemes_list],
+)
+
+schema_conf = configuration_data()
+schema_conf.set('GETTEXT_PACKAGE', meson.project_name())
+
+schema = 'org.gnome.totem.gschema.xml'
+
+configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: totem_schemadir,
+ configuration: schema_conf
+)
+
+install_data(
+ 'totem.convert',
+ install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
+)
diff --git a/data/org.gnome.Totem.desktop.meson b/data/org.gnome.Totem.desktop.meson
new file mode 100644
index 0000000..04a1599
--- /dev/null
+++ b/data/org.gnome.Totem.desktop.meson
@@ -0,0 +1,18 @@
+[Desktop Entry]
+_Name=Videos
+_Comment=Play movies
+_Keywords=Video;Movie;Film;Clip;Series;Player;DVD;TV;Disc;
+Exec=totem %U
+Icon=org.gnome.Totem
+DBusActivatable=true
+Terminal=false
+Type=Application
+Categories=GTK;GNOME;AudioVideo;Player;Video;
+X-GNOME-DocPath=totem/totem.xml
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=totem
+X-GNOME-Bugzilla-Component=general
+X-GNOME-Bugzilla-Version=@VERSION@
+X-GNOME-Bugzilla-OtherBinaries=totem-video-thumbnailer;
+StartupNotify=true
+@MIME_TYPE@
diff --git a/data/totem.thumbnailer.meson b/data/totem.thumbnailer.meson
new file mode 100644
index 0000000..650a926
--- /dev/null
+++ b/data/totem.thumbnailer.meson
@@ -0,0 +1,4 @@
+[Thumbnailer Entry]
+TryExec=@BINDIR@/totem-video-thumbnailer
+Exec=@BINDIR@/totem-video-thumbnailer -s %s %u %o
+@MIME_TYPE@
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..ead14c4
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1 @@
+subdir('reference')
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index ab52bd5..25ad413 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -137,8 +137,8 @@ GTKDOC_CFLAGS = \
-I$(top_srcdir)/src/plugins \
$(PLAYER_CFLAGS)
GTKDOC_LIBS = \
- $(top_builddir)/src/libtotem.la \
- $(top_builddir)/libgd/libgd.la \
+ $(top_builddir)/src/libtotem.la \
+ $(top_builddir)/subprojects/libgd/libgd.la \
$(PLAYER_LIBS)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 0000000..16f64bb
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,98 @@
+private_headers = [
+ 'bacon-resize.h',
+ 'bacon-time-label.h',
+ 'bacon-video-controls-actor.h',
+ 'bacon-video-spinner-actor.h',
+ 'bacon-video-widget-common.h',
+ 'bacon-video-widget-gst-missing-plugins.h',
+ 'bacon-video-widget-properties.h',
+ 'clock.h',
+ 'debug.h',
+ 'gd-fullscreen-filter.h',
+ 'gd-tagged-entry.h',
+ 'gnome-screenshot-widget.h',
+ 'gsd-media-keys-window.h',
+ 'gstscreenshot.h',
+ 'icon-helpers.h',
+ 'screenshot-filename-builder.h',
+ 'totem-aspect-frame.h',
+ 'totem-chapters-utils.h',
+ 'totem-cmml-parser.h',
+ 'totem-dnd-menu.h',
+ 'totem-dvb-setup.h',
+ 'totem-edit-chapter.h',
+ 'totem-fullscreen.h',
+ 'totem-gallery-progress.h',
+ 'totem-gallery.h',
+ 'totem-grilo.h',
+ 'totem-gst-helpers.h',
+ 'totem-gst-pixbuf-helpers.h',
+ 'totem-main-toolbar.h',
+ 'totem-menu.h',
+ 'totem-module.h',
+ 'totem-open-location.h',
+ 'totem-options.h',
+ 'totem-playlist.h',
+ 'totem-plugins-engine.h',
+ 'totem-plugin-manager.h',
+ 'totem-preferences.h',
+ 'totem-private.h',
+ 'totem-profile.h',
+ 'totem-properties-view.h',
+ 'totem-python-plugin.h',
+ 'totem-resources.h',
+ 'totem-sample-vala-plugin.h',
+ 'totem-screenshot-plugin.h',
+ 'totem-screenshot.h',
+ 'totem-search-entry.h',
+ 'totem-selection-toolbar.h',
+ 'totem-session.h',
+ 'totem-skipto-plugin.h',
+ 'totem-skipto.h',
+ 'totem-statusbar.h',
+ 'totem-subtitle-encoding.h',
+ 'totem-time-entry.h',
+ 'totem-time-helpers.h',
+ 'totem-time-label.h',
+ 'totem-tracker-widget.h',
+ 'totem-uri.h',
+ 'video-utils.h'
+]
+
+version_conf = configuration_data()
+version_conf.set('TOTEM_VERSION_MAJOR', totem_major_version)
+version_conf.set('TOTEM_VERSION_MINOR', totem_minor_version)
+version_conf.set('TOTEM_VERSION_MICRO', totem_micro_version)
+
+version_xml = 'version.xml'
+
+configure_file(
+ input: version_xml + '.in',
+ output: version_xml,
+ configuration: version_conf
+)
+
+doc_path = join_paths(totem_datadir, 'gtk-doc', 'html', meson.project_name())
+
+gnome.gtkdoc(
+ meson.project_name(),
+ main_xml: meson.project_name() + '-docs.xml',
+ src_dir: [
+ top_inc,
+ src_inc,
+ plugins_inc,
+ backend_inc
+ ],
+ dependencies: libtotem_dep,
+ scan_args: [
+ '--rebuild-types',
+ '--ignore-headers=' + ' '.join(private_headers),
+ ],
+ mkdb_args: [
+ '--sgml-mode',
+ '--output-format=xml',
+ '--name-space=' + meson.project_name()
+ ],
+ install: true,
+ install_dir: doc_path
+)
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..4a7e461
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,54 @@
+sources = [
+ 'index.docbook',
+ 'legal.xml'
+]
+
+media = [
+ 'figures/totem_next_button.png',
+ 'figures/totem_pause_button.png',
+ 'figures/totem_play_button.png',
+ 'figures/totem_previous_button.png',
+ 'figures/totem_show_playlist_button.png',
+ 'figures/totem_start_window.png',
+ 'figures/totem_volume_maximum_button.png',
+ 'figures/totem_volume_mute_button.png'
+]
+
+linguas = [
+ 'bg',
+ 'ca',
+ 'cs',
+ 'da',
+ 'de',
+ 'el',
+ 'en_GB',
+ 'es',
+ 'eu',
+ 'fi',
+ 'fr',
+ 'gl',
+ 'id',
+ 'it',
+ 'ja',
+ 'oc',
+ 'pa',
+ 'pl',
+ 'pt_BR',
+ 'ro',
+ 'ru',
+ 'sl',
+ 'sv',
+ 'te',
+ 'uk',
+ 'zh_CN',
+ 'zh_HK',
+ 'zh_TW'
+]
+
+gnome.yelp(
+ meson.project_name(),
+ sources: sources,
+ media: media,
+ symlink_media: true,
+ languages: linguas
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..40d8be6
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,357 @@
+project(
+ 'totem', 'c',
+ version: '3.24.0',
+ license: 'GPL2+',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'c_std=gnu99',
+ 'warning_level=1'
+ ],
+ meson_version: '>= 0.41.0'
+)
+
+totem_version = meson.project_version()
+version_array = totem_version.split('.')
+totem_major_version = version_array[0].to_int()
+totem_minor_version = version_array[1].to_int()
+totem_micro_version = version_array[2].to_int()
+
+totem_api_version = '1.0'
+api_version_array = totem_version.split('.')
+totem_api_major_version = api_version_array[0].to_int()
+totem_api_minor_version = api_version_array[1].to_int()
+
+totem_api_path = join_paths(meson.project_name(), totem_api_version)
+
+totem_gir_ns = 'Totem'
+
+totem_prefix = get_option('prefix')
+totem_bindir = join_paths(totem_prefix, get_option('bindir'))
+totem_datadir = join_paths(totem_prefix, get_option('datadir'))
+totem_includedir = join_paths(totem_prefix, get_option('includedir'))
+totem_libdir = join_paths(totem_prefix, get_option('libdir'))
+totem_libexecdir = join_paths(totem_prefix, get_option('libexecdir'))
+totem_localedir = join_paths(totem_prefix, get_option('localedir'))
+totem_mandir = join_paths(totem_prefix, get_option('mandir'))
+
+totem_pkglibdir = join_paths(totem_libdir, meson.project_name())
+totem_pkgdatadir = join_paths(totem_datadir, meson.project_name())
+totem_pkgincludedir = join_paths(totem_includedir, meson.project_name())
+
+totem_pluginsdir = join_paths(totem_pkglibdir, 'plugins')
+totem_schemadir = join_paths(totem_datadir, 'glib-2.0', 'schemas')
+
+soversion = 0
+current = 0
+revision = 0
+libversion = '@0@.@1@.@2@'.format(soversion, current, revision)
+
+totem_buildtype = get_option('buildtype')
+
+cc = meson.get_compiler('c')
+
+config_h = configuration_data()
+
+config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
+
+# debug options
+config_h.set('GNOME_ENABLE_DEBUG', totem_buildtype != 'release',
+ description: 'Define if debugging is enabled')
+config_h.set('NDEBUG', totem_buildtype == 'release',
+ description: 'Define if debugging is disabled')
+
+# package
+config_h.set_quoted('PACKAGE', meson.project_name())
+config_h.set_quoted('PACKAGE_BUGREPORT', 'http://bugzilla.gnome.org/enter_bug.cgi?product=totem')
+config_h.set_quoted('PACKAGE_NAME', meson.project_name())
+config_h.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), totem_version))
+config_h.set_quoted('PACKAGE_TARNAME', meson.project_name())
+config_h.set_quoted('PACKAGE_URL', 'https://wiki.gnome.org/Apps/Videos')
+config_h.set_quoted('PACKAGE_VERSION', totem_version)
+config_h.set_quoted('TOTEM_API_VERSION', totem_api_version)
+config_h.set_quoted('VERSION', totem_version)
+
+# headers
+config_h.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
+config_h.set('HAVE_INTTYPES_H', cc.has_header('inttypes.h'))
+config_h.set('HAVE_MEMORY_H', cc.has_header('memory.h'))
+config_h.set('HAVE_STDINT_H', cc.has_header('stdint.h'))
+config_h.set('HAVE_STDLIB_H', cc.has_header('stdlib.h'))
+config_h.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
+config_h.set('HAVE_STRING_H', cc.has_header('string.h'))
+config_h.set('HAVE_SYS_STAT_H', cc.has_header('sys/stat.h'))
+config_h.set('HAVE_SYS_TYPES_H', cc.has_header('sys/types.h'))
+config_h.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
+
+# Compiler flags
+common_flags = [
+ '-DHAVE_CONFIG_H',
+ '-D_REENTRANT',
+ '-DGCONF_DISABLE_DEPRECATED',
+ '-DGCONF_DISABLE_SINGLE_INCLUDES',
+ '-DBONOBO_DISABLE_DEPRECATED',
+ '-DBONOBO_DISABLE_SINGLE_INCLUDES',
+ '-DBONOBO_UI_DISABLE_DEPRECATED',
+ '-DBONOBO_UI_DISABLE_SINGLE_INCLUDES',
+ '-DGNOME_DISABLE_DEPRECATED',
+ '-DGNOME_DISABLE_SINGLE_INCLUDES',
+ '-DLIBGLADE_DISABLE_DEPRECATED',
+ '-DLIBGLADE_DISABLE_SINGLE_INCLUDES',
+ '-DGNOME_VFS_DISABLE_DEPRECATED',
+ '-DGNOME_VFS_DISABLE_SINGLE_INCLUDES',
+ '-DWNCK_DISABLE_DEPRECATED',
+ '-DWNCK_DISABLE_SINGLE_INCLUDES',
+ '-DLIBSOUP_DISABLE_DEPRECATED',
+ '-DLIBSOUP_DISABLE_SINGLE_INCLUDES'
+]
+
+if totem_buildtype == 'debug' or totem_buildtype == 'debugoptimized'
+ test_cflags = [
+ '-fno-strict-aliasing',
+ '-Wcast-align',
+ '-Wmissing-declarations',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wpointer-arith'
+ ]
+
+ foreach cflag: test_cflags
+ if cc.has_argument(cflag)
+ common_flags += [cflag]
+ endif
+ endforeach
+
+ test_cflags = [
+ '-Werror=format=2',
+ '-Werror=implicit-function-declaration',
+ '-Werror=init-self',
+ '-Werror=missing-include-dirs',
+ '-Werror=missing-prototypes',
+ '-Werror=pointer-arith',
+ '-Werror=return-type',
+ '-Wstrict-prototypes'
+ ]
+
+ warn_flags = []
+
+ foreach cflag: test_cflags
+ if cc.has_argument(cflag)
+ warn_flags += [cflag]
+ endif
+ endforeach
+
+ add_project_arguments(common_flags, language: 'c')
+endif
+
+glib_req_version = '>= 2.35.0'
+gtk_req_version = '>= 3.19.4'
+gst_req_version = '>= 1.6.0'
+grilo_req_version = '>= 0.3.0'
+peas_req_version = '>= 1.1.0'
+totem_plparser_req_version = '>= 3.10.1'
+
+glib_dep = dependency('glib-2.0', version: glib_req_version)
+gobject_dep = dependency('gobject-2.0', version: glib_req_version)
+gio_dep = dependency('gio-2.0', version: '>= 2.43.4')
+gtk_dep = dependency('gtk+-3.0', version: gtk_req_version)
+gdk_x11_dep = dependency('gdk-x11-3.0', version: gtk_req_version)
+gst_dep = dependency('gstreamer-1.0', version: gst_req_version)
+gst_tag_dep = dependency('gstreamer-tag-1.0', version: '>= 0.11.93')
+gst_video_dep = dependency('gstreamer-video-1.0')
+peas_dep = dependency('libpeas-1.0', version: peas_req_version)
+peas_gtk_dep = dependency('libpeas-gtk-1.0', version: peas_req_version)
+totem_plparser_dep = dependency('totem-plparser', version: totem_plparser_req_version)
+clutter_gtk_dep = dependency('clutter-gtk-1.0', version: '>= 1.8.1')
+m_dep = cc.find_library('m', required: true)
+
+libgd = subproject(
+ 'libgd',
+ default_options: [
+ 'static=true',
+ 'with-gtk-hacks=true',
+ 'with-main-view=true',
+ 'with-tagged-entry=true',
+ 'with-view-common=true'
+ ]
+)
+libgd_dep = libgd.get_variable('libgd_dep')
+
+# introspection support
+have_gir = false
+
+introspection_option = get_option('enable-introspection')
+if introspection_option != 'no'
+ gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false)
+
+ if gir_dep.found()
+ have_gir = true
+ endif
+endif
+
+# missing plugins support
+missing_plugins_deps = []
+
+easy_codec_option = get_option('enable-easy-codec-installation')
+if easy_codec_option != 'no'
+ have_easy_codec = false
+
+ gst_pbutils_dep = dependency('gstreamer-pbutils-1.0', required: (easy_codec_option == 'yes'))
+ if gst_pbutils_dep.found()
+ have_easy_codec = true
+ endif
+
+ missing_plugins_deps += gst_pbutils_dep
+ config_h.set('ENABLE_MISSING_PLUGIN_INSTALLATION', have_easy_codec,
+ description: 'Whether we can and want to do installation of missing plugins')
+endif
+
+# python support
+have_python = false
+python_deps = []
+
+python_option = get_option('enable-python')
+if python_option != 'no'
+ python = find_program('python', required: false)
+ if python.found()
+ python_req_version = '>= 2.3'
+
+ r = run_command(python, '--version')
+ python_version = r.stderr().split(' ')[1]
+
+ pygobject_dep = dependency('pygobject-3.0', version: '>= 2.90.3', required: false)
+ pylint = find_program('pylint', required: false)
+
+ if python_version.version_compare(python_req_version) and pygobject_dep.found() and pylint.found()
+ have_python = true
+ python_deps += pygobject_dep
+ meson.add_install_script('meson_compile_python.py')
+ endif
+ endif
+
+ if not have_python
+ str = 'python ' + python_req_version + ', pygobject or pylint not found'
+ if python_option == 'yes'
+ error(str)
+ endif
+ message(str + ', disabling Python support')
+ endif
+endif
+
+# vala support
+have_vala = false
+
+vala_option = get_option('enable-vala')
+if vala_option != 'no'
+ if have_gir
+ if add_languages('vala', required: false)
+ vala_req_version = '>= 0.14.1'
+ if meson.get_compiler('vala').version().version_compare(vala_req_version)
+ have_vala = true
+ endif
+ endif
+
+ if not have_vala
+ str = 'you need vala ' + vala_req_version + ' installed to use vala plugins'
+ endif
+ else
+ str = 'you need introspection support for the vala plugins'
+ endif
+
+ if not have_vala
+ if vala_options == 'yes' or introspection_option == 'yes'
+ error(str)
+ endif
+ message(str)
+ endif
+endif
+
+# nautilus support
+if get_option('enable-nautilus') != 'no'
+ libnautilus_ext_dep = dependency('libnautilus-extension', version: '>= 2.91.3', required: false)
+ if libnautilus_ext_dep.found()
+ nautilusdir = get_option('with-nautilusdir')
+ if nautilusdir == ''
+ nautilusdir = libnautilus_ext_dep.get_pkgconfig_variable('extensiondir')
+ endif
+
+ config_h.set('HAVE_NAUTILUS', true)
+ have_nautilus = true
+ message('installing nautilus plugin in ' + nautilusdir)
+ else
+ if get_option('enable-nautilus') == 'yes'
+ error('nautilus support enabled but libnautilus-extension missing')
+ else
+ message('libnautilus-extension missing so disabling nautilus supportt')
+ endif
+ endif
+endif
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h
+)
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+po_dir = join_paths(meson.source_root(), 'po')
+
+intltool_merge = find_program('intltool-merge')
+intltool_cache = join_paths(po_dir, '.intltool-merge-cache')
+intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
+
+top_inc = include_directories('.')
+
+subdir('po')
+subdir('data')
+subdir('help')
+subdir('src')
+
+if get_option('enable-gtk-doc')
+ subdir('docs')
+endif
+
+meson.add_install_script('meson_post_install.py')
+
+message('Totem was configured with the following options:')
+message('** Using the GStreamer-1.0 backend')
+
+str = 'Easy codec installation support'
+if have_easy_codec
+ message('** ' + str + ' enabled')
+else
+ message(' ' + str + ' disabled')
+endif
+
+str = 'Python plugin support'
+if have_python
+ message('** ' + str + ' enabled')
+else
+ message(' ' + str + ' disabled')
+endif
+
+str = 'Vala plugin support'
+if have_vala
+ message('** ' + str + ' enabled')
+else
+ message(' ' + str + ' disabled')
+endif
+
+foreach plugin: allowed_plugins
+ if plugins.contains(plugin)
+ message('** ' + plugin + ' plugin enabled')
+ else
+ message(' ' + plugin + ' plugin disabled')
+ endif
+endforeach
+
+str = 'Nautilus properties page'
+if have_nautilus
+ message('** ' + str + ' enabled')
+else
+ message(' ' + str + ' disabled')
+endif
+
+message('End options')
diff --git a/meson_compile_python.py b/meson_compile_python.py
new file mode 100644
index 0000000..11eba43
--- /dev/null
+++ b/meson_compile_python.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+installdir = os.environ['MESON_INSTALL_PREFIX']
+
+if not os.environ.get('DESTDIR'):
+ print('Byte-compiling python modules...')
+ subprocess.call(['pycompile', installdir])
+ subprocess.call(['python', '-O', '-m', 'compileall', '-f', '-q', installdir])
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..3b6ff67
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,8 @@
+option('enable-easy-codec-installation', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto',
description: 'Whether to enable easy codec installation support for GStreamer')
+option('enable-python', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable
python support')
+option('enable-vala', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'whether
Vala plugin support is requested')
+option('with-plugins', type: 'combo', choices: ['all', 'none', 'auto'], value: 'auto', description: 'Which
Totem plugins to compile (default: auto; "all", "none" and "auto" are valid)')
+option('enable-nautilus', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description:
'compile the nautilus plugin')
+option('with-nautilusdir', type: 'string', value: '', description: 'Installation path for Nautilus
extension')
+option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
+option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description:
'Enable GObject Introspection (depends on GObject)')
diff --git a/meson_post_install.py b/meson_post_install.py
new file mode 100644
index 0000000..bf320a9
--- /dev/null
+++ b/meson_post_install.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+install_prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
+schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
+
+if not os.environ.get('DESTDIR'):
+ print('Update icon cache...')
+ subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+
+ print('Compiling gsettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..e9b77d7
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext(meson.project_name(), preset: 'glib')
diff --git a/src/Makefile.am b/src/Makefile.am
index 6fca96b..45d0ba9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,10 +107,10 @@ libtotem_la_CPPFLAGS = \
$(AM_CPPFLAGS)
libtotem_la_CFLAGS = \
- $(PLAYER_CFLAGS) \
- $(AM_CFLAGS) \
- -I$(srcdir)/gst/ \
- -I$(top_srcdir)/libgd
+ $(PLAYER_CFLAGS) \
+ $(AM_CFLAGS) \
+ -I$(srcdir)/gst/ \
+ -I$(top_srcdir)/subprojects/libgd/
libtotem_la_LDFLAGS = \
-export-dynamic \
@@ -118,9 +118,9 @@ libtotem_la_LDFLAGS = \
$(AM_LDFLAGS)
libtotem_la_LIBADD = \
- libtotem_player.la \
- backend/libbaconvideowidget.la \
- $(top_builddir)/libgd/libgd.la \
+ libtotem_player.la \
+ backend/libbaconvideowidget.la \
+ $(top_builddir)/subprojects/libgd/libgd.la \
$(PLAYER_LIBS)
# Totem
@@ -230,7 +230,7 @@ Totem_1_0_gir_SCANNERFLAGS = --c-include=totem.h --pkg-export=totem
Totem_1_0_gir_CFLAGS = \
$(PLAYER_CFLAGS) \
$(libtotem_la_CPPFLAGS)
-Totem_1_0_gir_LIBS = libtotem.la $(top_builddir)/libgd/libgd.la
+Totem_1_0_gir_LIBS = libtotem.la $(top_builddir)/subprojects/libgd/libgd.la
Totem_1_0_gir_FILES = $(introspection_sources)
Totem_1_0_gir_EXPORT_PACKAGES = totem
INTROSPECTION_GIRS += Totem-1.0.gir
diff --git a/src/backend/meson.build b/src/backend/meson.build
new file mode 100644
index 0000000..4b0de0e
--- /dev/null
+++ b/src/backend/meson.build
@@ -0,0 +1,121 @@
+backend_inc = include_directories('.')
+
+gst_inspect = find_program(
+ 'gst-inspect-1.0',
+ join_paths(gst_dep.get_pkgconfig_variable('toolsdir'), 'gst-inspect-1.0'),
+ required: false
+)
+
+assert(gst_inspect.found(),
+ 'Cannot find required GStreamer-1.0 tool "gst-inspect-1.0". It should be part of gstreamer-1_0-utils.
Please install it.')
+
+gst_base_plugins = [
+ 'playbin',
+ 'videoscale'
+]
+
+foreach plugin: gst_base_plugins
+ r = run_command(gst_inspect, plugin)
+ assert(r.returncode() == 0,
+ 'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of gst-plugins-base.
Please install it.')
+endforeach
+
+gst_good_plugins = [
+ 'autoaudiosink',
+ 'goom',
+ 'scaletempo'
+]
+
+foreach plugin: gst_good_plugins
+ r = run_command(gst_inspect, plugin)
+ assert(r.returncode() == 0,
+ 'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of gst-plugins-good.
Please install it.')
+endforeach
+
+sources = files(
+ 'bacon-time-label.c',
+ 'bacon-video-controls-actor.c',
+ 'bacon-video-spinner-actor.c',
+ 'bacon-video-widget-gst-missing-plugins.c',
+ 'bacon-video-widget.c',
+ 'clock.c',
+ 'totem-aspect-frame.c'
+)
+
+enums = 'bacon-video-widget-enums'
+enums_header = files('bacon-video-widget.h')
+
+sources += gnome.mkenums(
+ enums + '.h',
+ sources: enums_header,
+ fhead: '#ifndef BVW_ENUMS_H\n#define BVW_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n',
+ fprod: '/* enumerations from "@filename@" */\n',
+ vhead: 'GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define BVW_TYPE_@ENUMSHORT@
(@enum_name@_get_type())\n',
+ ftail: 'G_END_DECLS\n\n#endif /* !BVW_ENUMS_H */'
+)
+
+sources += gnome.mkenums(
+ enums + '.c',
+ sources: enums_header,
+ fhead: '#include "bacon-video-widget.h"\n#include "bacon-video-widget-enums.h"',
+ fprod: '\n/* enumerations from "@filename@" */',
+ vhead: 'GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static
const G@Type@Value values[] = {',
+ vprod: ' { @VALUENAME@, "@VALUENAME@", "@valuenick@" },',
+ vtail: ' { 0, NULL, NULL }\n };\n etype = g_@type@_register_static ("@EnumName@", values);\n
}\n return etype;\n}\n'
+)
+
+libbacon_video_widget_incs = [
+ top_inc,
+ gst_inc
+]
+
+libbacon_video_widget_deps = missing_plugins_deps + [
+ gst_dep,
+ dependency('gstreamer-base-1.0', version: gst_req_version),
+ dependency('gstreamer-plugins-base-1.0', version: gst_req_version),
+ gst_tag_dep,
+ dependency('gstreamer-audio-1.0'),
+ gst_video_dep,
+ dependency('clutter-1.0', version: '>= 1.17.3'),
+ dependency('clutter-gst-3.0', version: '>= 2.99.2'),
+ clutter_gtk_dep,
+ dependency('cairo', version: '>= 1.14.0'),
+ dependency('gsettings-desktop-schemas'),
+ m_dep,
+ libtotem_gst_helpers_dep,
+ libtotem_gst_pixbuf_helpers_dep,
+ libtotem_time_helpers_dep
+]
+
+libbacon_video_widget_cflags = common_flags + warn_flags + [
+ '-DDATADIR="@0@"'.format(totem_pkgdatadir)
+]
+
+libbacon_video_widget = static_library(
+ 'baconvideowidget',
+ sources: sources,
+ include_directories: libbacon_video_widget_incs,
+ dependencies: libbacon_video_widget_deps,
+ c_args: libbacon_video_widget_cflags
+)
+
+libbacon_video_widget_dep = declare_dependency(
+ link_with: libbacon_video_widget,
+ include_directories: backend_inc,
+ dependencies: libbacon_video_widget_deps
+)
+
+if have_easy_codec
+ backend_test = 'bvw-test'
+
+ executable(
+ backend_test,
+ backend_test + '.c',
+ include_directories: libbacon_video_widget_incs,
+ dependencies: libbacon_video_widget_dep,
+ c_args: libbacon_video_widget_cflags + [
+ '-DLOGO_PATH="@0@"'.format(join_paths(totem_pkgdatadir, meson.project_name(), 'totem_logo.png')),
+ '-DG_LOG_DOMAIN="@0@"'.format(backend_test)
+ ]
+ )
+endif
diff --git a/src/gst/meson.build b/src/gst/meson.build
new file mode 100644
index 0000000..c5ec2c4
--- /dev/null
+++ b/src/gst/meson.build
@@ -0,0 +1,60 @@
+gst_inc = include_directories('.')
+
+libtotem_gst_helpers_deps = [
+ gst_dep,
+ gst_tag_dep,
+]
+
+libtotem_gst_helpers = library(
+ 'totemgsthelpers',
+ sources: 'totem-gst-helpers.c',
+ dependencies: libtotem_gst_helpers_deps
+)
+
+libtotem_gst_helpers_dep = declare_dependency(
+ link_with: libtotem_gst_helpers,
+ include_directories: gst_inc,
+ dependencies: libtotem_gst_helpers_deps
+)
+
+libtotem_gst_pixbuf_helpers_deps = [
+ dependency('gdk-pixbuf-2.0'),
+ gst_tag_dep,
+ gst_video_dep
+]
+
+libtotem_gst_pixbuf_helpers = library(
+ 'totemgstpixbufhelpers',
+ sources: 'totem-gst-pixbuf-helpers.c',
+ dependencies: libtotem_gst_pixbuf_helpers_deps
+)
+
+libtotem_gst_pixbuf_helpers_dep = declare_dependency(
+ link_with: libtotem_gst_pixbuf_helpers,
+ include_directories: gst_inc,
+ dependencies: libtotem_gst_pixbuf_helpers_deps
+)
+
+libtotem_time_helpers = library(
+ 'totemtimehelpers',
+ sources: 'totem-time-helpers.c',
+ dependencies: glib_dep
+)
+
+libtotem_time_helpers_dep = declare_dependency(
+ link_with: libtotem_time_helpers,
+ include_directories: gst_inc,
+ dependencies: glib_dep
+)
+
+gst_test = 'test-time'
+
+exe = executable(
+ gst_test,
+ gst_test + '.c',
+ include_directories: top_inc,
+ dependencies: glib_dep,
+ link_with: libtotem_time_helpers
+)
+
+test(gst_test, exe)
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..ea6d4bf
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,323 @@
+src_inc = include_directories('.')
+plugins_inc = include_directories('plugins')
+
+subdir('gst')
+subdir('backend')
+subdir('properties')
+
+enum_headers = files(
+ 'backend/bacon-time-label.h',
+ 'backend/bacon-video-controls-actor.h',
+ 'backend/bacon-video-spinner-actor.h',
+ 'backend/bacon-video-widget-gst-missing-plugins.h',
+ 'backend/bacon-video-widget.h',
+ 'backend/clock.h',
+ 'backend/totem-aspect-frame.h',
+ 'icon-helpers.h',
+ 'totem-grilo.h',
+ 'totem-interface.h',
+ 'totem-main-toolbar.h',
+ 'totem-menu.h',
+ 'totem-open-location.h',
+ 'totem-options.h',
+ 'totem-playlist.h',
+ 'totem-preferences.h',
+ 'totem-private.h',
+ 'totem-profile.h',
+ 'totem-properties-view.h',
+ 'totem-resources.h',
+ 'totem-search-entry.h',
+ 'totem-selection-toolbar.h',
+ 'totem-session.h',
+ 'totem-subtitle-encoding.h',
+ 'totem-time-label.h',
+ 'totem-uri.h',
+ 'totem.h'
+)
+
+gnome.mkenums(
+ 'org.gnome.totem.enums.xml',
+ sources: enum_headers,
+ comments: '<!-- @comment@ -->',
+ fhead: '<schemalist>',
+ vhead: ' <@type@ id="org.gnome.totem.@EnumName@">',
+ vprod: ' <value nick="@valuenick@" value="@valuenum@"/>',
+ vtail: ' </@type@>',
+ ftail: '</schemalist>',
+ install_header: true,
+ install_dir: totem_schemadir
+)
+
+totem_common_incs = [
+ top_inc,
+ plugins_inc
+]
+
+totem_common_deps = libbacon_video_widget_deps + python_deps + [
+ glib_dep,
+ gio_dep,
+ gtk_dep,
+ gdk_x11_dep,
+ dependency('gmodule-2.0'),
+ totem_plparser_dep,
+ peas_dep,
+ peas_gtk_dep,
+ dependency('grilo-0.3', version: grilo_req_version),
+ dependency('grilo-pls-0.3', version: grilo_req_version),
+ dependency('gnome-desktop-3.0')
+]
+
+totem_common_cflags = common_flags + warn_flags + [
+ '-DDBUS_API_SUBJECT_TO_CHANGE',
+ '-DGNOMELOCALEDIR="@0@"'.format(totem_localedir),
+ '-DDATADIR="@0@"'.format(totem_datadir),
+ '-DLIBEXECDIR="@0@"'.format(totem_libexecdir),
+ '-DTOTEM_PLUGIN_DIR="@0@"'.format(totem_pluginsdir),
+ '-DBINDIR="@0@"'.format(totem_bindir),
+ '-DGTKBUILDERDIR=""'
+]
+
+headers = files(
+ 'plugins/totem-plugin.h',
+ 'plugins/totem-dirs.h',
+ 'totem-interface.h',
+ 'totem.h'
+)
+
+install_headers(
+ headers,
+ subdir: join_paths(totem_includedir, totem_api_path)
+)
+
+libtotem_player_sources = files(
+ 'totem-interface.c',
+ 'totem-time-label.c'
+)
+
+libtotem_player_deps = totem_common_deps + [
+ libtotem_time_helpers_dep
+]
+
+libtotem_player = static_library(
+ 'totem_player',
+ sources: libtotem_player_sources,
+ include_directories: top_inc,
+ dependencies: libtotem_player_deps,
+ c_args: totem_common_cflags + [
+ '-DG_LOG_DOMAIN="Totem"'
+ ]
+)
+
+libtotem_player_dep = declare_dependency(
+ link_with: libtotem_player,
+ include_directories: src_inc,
+ dependencies: libtotem_player_deps
+)
+
+libtotem_sources = files(
+ 'plugins/totem-dirs.c',
+ 'plugins/totem-plugins-engine.c',
+ 'icon-helpers.c',
+ 'totem-grilo.c',
+ 'totem-main-toolbar.c',
+ 'totem-menu.c',
+ 'totem-object.c',
+ 'totem-open-location.c',
+ 'totem-options.c',
+ 'totem-playlist.c',
+ 'totem-preferences.c',
+ 'totem-search-entry.c',
+ 'totem-selection-toolbar.c',
+ 'totem-session.c',
+ 'totem-subtitle-encoding.c',
+ 'totem-uri.c'
+)
+
+libtotem_sources += gnome.compile_resources(
+ 'griloresources',
+ 'grilo.gresource.xml',
+ export: true,
+ source_dir: '.',
+ c_name: '_totem'
+)
+
+libtotem_deps = [
+ libtotem_player_dep,
+ libbacon_video_widget_dep,
+ libgd_dep
+]
+
+libtotem = shared_library(
+ 'totem',
+ sources: libtotem_sources + gen_sources,
+ version: libversion,
+ soversion: soversion,
+ include_directories: totem_common_incs,
+ dependencies: libtotem_deps,
+ c_args: totem_common_cflags + [
+ '-DG_LOG_DOMAIN="Totem"'
+ ],
+ install: true,
+ install_dir: totem_libdir
+)
+
+libtotem_dep = declare_dependency(
+ link_with: libtotem,
+ include_directories: src_inc,
+ dependencies: libtotem_deps
+)
+
+pkg.generate(
+ libraries: libtotem,
+ version: totem_version,
+ name: 'Totem',
+ description: 'Totem Movie Player plugin API',
+ filebase: meson.project_name(),
+ subdirs: totem_api_path,
+ requires: [
+ 'gio-2.0 ' + glib_req_version,
+ 'gtk+-3.0 ' + gtk_req_version,
+ 'totem-plparser ' + totem_plparser_req_version
+ ],
+ variables: [
+ 'exec_prefix=' + totem_libexecdir,
+ 'pluginsdir=' + totem_pluginsdir
+ ],
+ install_dir: join_paths(totem_libdir, 'pkgconfig')
+)
+
+totem = executable(
+ meson.project_name(),
+ 'totem.c',
+ include_directories: totem_common_incs,
+ dependencies: libtotem_dep,
+ c_args: totem_common_cflags + [
+ '-DG_LOG_DOMAIN="Totem"'
+ ],
+ install: true,
+ install_dir: totem_bindir
+)
+
+totem_video_thumbnailer_sources = files(
+ 'totem-resources.c',
+ 'totem-video-thumbnailer.c'
+)
+
+totem_video_thumbnailer_deps = [
+ dependency('gdk-3.0'),
+ totem_plparser_dep,
+ gst_tag_dep,
+ gst_video_dep,
+ m_dep,
+ libtotem_gst_helpers_dep,
+ libtotem_gst_pixbuf_helpers_dep,
+ libtotem_time_helpers_dep
+]
+
+executable(
+ 'totem-video-thumbnailer',
+ totem_video_thumbnailer_sources,
+ include_directories: top_inc,
+ dependencies: totem_video_thumbnailer_deps,
+ c_args: totem_common_cflags + [
+ '-DG_LOG_DOMAIN="TotemVideoThumbnailer"'
+ ],
+ install: true,
+ install_dir: totem_bindir
+)
+
+if have_nautilus
+ libtotem_properties_page_sources = files(
+ 'totem-properties-main.c',
+ 'totem-properties-view.c'
+ )
+
+ libtotem_properties_page_deps = missing_plugins_deps + [
+ gtk_dep,
+ dependency('gthread-2.0'),
+ libnautilus_ext_dep,
+ gst_tag_dep,
+ libbacon_video_widget_properties_dep
+ ]
+
+ libtotem_properties_page = shared_module(
+ 'totem-properties-page',
+ sources: libtotem_properties_page_sources + gen_sources,
+ include_directories: top_inc,
+ dependencies: libtotem_properties_page_deps,
+ c_args: totem_common_cflags + [
+ '-DG_LOG_DOMAIN="TotemPropertiesPage"'
+ ],
+ install: true,
+ install_dir: nautilusdir
+ )
+
+ test_properties_page_sources = files(
+ 'totem-properties-main.c',
+ 'totem-properties-view.c',
+ 'test-properties-page.c'
+ )
+
+ executable(
+ 'test-properties-page',
+ test_properties_page_sources + gen_sources,
+ include_directories: top_inc,
+ dependencies: libtotem_properties_page_deps + [
+ libtotem_player_dep,
+ libbacon_video_widget_dep
+ ],
+ c_args: totem_common_cflags
+ )
+endif
+
+test_icons_sources = files(
+ 'icon-helpers.c',
+ 'test-icons.c'
+)
+
+executable(
+ 'test-icons',
+ test_icons_sources,
+ dependencies: [
+ libtotem_player_dep,
+ libbacon_video_widget_dep
+ ],
+ c_args: totem_common_cflags
+)
+
+if have_gir
+ gir_sources = libtotem_sources + libtotem_player_sources + headers
+
+ gir_incs = [
+ 'Gio-2.0',
+ 'GLib-2.0',
+ 'GObject-2.0',
+ 'Gtk-3.0',
+ 'TotemPlParser-1.0'
+ ]
+
+ gir_extra_args = [
+ '--c-include=totem.h',
+ '--pkg-export=totem'
+ ]
+
+ gir_dir = join_paths(totem_datadir, 'gir-' + totem_api_version)
+ typelib_dir = join_paths(totem_libdir, 'girepository-' + totem_api_version)
+
+ libtotem_gir = gnome.generate_gir(
+ libtotem,
+ sources: gir_sources,
+ nsversion: totem_api_version,
+ namespace: totem_gir_ns,
+ symbol_prefix: totem_gir_ns.to_lower(),
+ identifier_prefix: totem_gir_ns,
+ includes: gir_incs,
+ include_directories: src_inc,
+ install: true,
+ install_dir_gir: gir_dir,
+ install_dir_typelib: typelib_dir,
+ extra_args: gir_extra_args
+ )
+endif
+
+subdir('plugins')
diff --git a/src/plugins/apple-trailers/meson.build b/src/plugins/apple-trailers/meson.build
new file mode 100644
index 0000000..1ee6c71
--- /dev/null
+++ b/src/plugins/apple-trailers/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'apple-trailers'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/autoload-subtitles/meson.build b/src/plugins/autoload-subtitles/meson.build
new file mode 100644
index 0000000..8d64dc2
--- /dev/null
+++ b/src/plugins/autoload-subtitles/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'autoload-subtitles'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/brasero-disc-recorder/meson.build b/src/plugins/brasero-disc-recorder/meson.build
new file mode 100644
index 0000000..d328345
--- /dev/null
+++ b/src/plugins/brasero-disc-recorder/meson.build
@@ -0,0 +1,27 @@
+plugin_name = 'brasero-disc-recorder'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-disc-recorder.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps + [
+ libxml_dep,
+ gtk_x11_dep
+ ],
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/dbusservice/meson.build b/src/plugins/dbusservice/meson.build
new file mode 100644
index 0000000..0dc653f
--- /dev/null
+++ b/src/plugins/dbusservice/meson.build
@@ -0,0 +1,19 @@
+plugin_name = 'dbusservice'
+
+plugin_dir = join_paths(totem_pluginsdir, 'dbus')
+
+install_data(
+ plugin_name + '.py',
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/gromit/meson.build b/src/plugins/gromit/meson.build
new file mode 100644
index 0000000..64057e8
--- /dev/null
+++ b/src/plugins/gromit/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'gromit'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/im-status/meson.build b/src/plugins/im-status/meson.build
new file mode 100644
index 0000000..d691d4b
--- /dev/null
+++ b/src/plugins/im-status/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'totem-im-status'
+
+plugin_dir = join_paths(totem_pluginsdir, 'im-status')
+
+shared_module(
+ plugin_name,
+ sources: plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/lirc/meson.build b/src/plugins/lirc/meson.build
new file mode 100644
index 0000000..0be0eeb
--- /dev/null
+++ b/src/plugins/lirc/meson.build
@@ -0,0 +1,31 @@
+plugin_name = 'lirc'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps + [
+ lirc_dep
+ ],
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
+
+install_data(
+ 'totem_lirc_default',
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/media-player-keys/meson.build b/src/plugins/media-player-keys/meson.build
new file mode 100644
index 0000000..660b413
--- /dev/null
+++ b/src/plugins/media-player-keys/meson.build
@@ -0,0 +1,26 @@
+plugin_name = 'media-player-keys'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name.underscorify(),
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps + [
+ gio_dep
+ ],
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
new file mode 100644
index 0000000..99c7163
--- /dev/null
+++ b/src/plugins/meson.build
@@ -0,0 +1,150 @@
+plugins_incs = [
+ top_inc,
+ plugins_inc
+]
+
+plugins_deps = [libtotem_dep]
+
+plugins_cflags = common_flags + warn_flags + [
+ '-DG_LOG_DOMAIN="Totem"'
+]
+
+plugins_conf = configuration_data()
+plugins_conf.set('GETTEXT_PACKAGE', meson.project_name())
+
+allowed_plugins = [
+ 'apple-trailers',
+ 'autoload-subtitles',
+ 'brasero-disc-recorder',
+ 'dbusservice',
+ 'gromit',
+ 'im-status',
+ 'lirc',
+ 'media-player-keys',
+ 'ontop',
+ 'opensubtitles',
+ 'properties',
+ 'pythonconsole',
+ 'recent',
+ 'rotation',
+ 'sample-vala',
+ 'samplepython',
+ 'save-file',
+ 'screensaver',
+ 'screenshot',
+ 'skipto',
+ 'variable-rate',
+ 'vimeo',
+ 'zeitgeist-dp'
+]
+
+plugins = []
+
+plugins_option = get_option('with-plugins')
+if plugins_option != 'none'
+ plugins += [
+ 'apple-trailers',
+ 'autoload-subtitles',
+ 'im-status',
+ 'media-player-keys',
+ 'ontop',
+ 'properties',
+ 'recent',
+ 'screensaver',
+ 'screenshot',
+ 'skipto',
+ 'variable-rate',
+ 'vimeo'
+ ]
+
+ plugin_error = (plugins_option == 'all')
+
+ gdk_targets = gtk_dep.get_pkgconfig_variable('targets')
+ if gdk_targets.contains('x11')
+ plugins += 'gromit'
+ else
+ str = 'the gromit plugin is not supported on non-X11 targets'
+ if plugin_error
+ error(str)
+ endif
+ message(str)
+ endif
+
+ lirc_dep = dependency('lirc_client', required: false)
+ if lirc_dep.found() and cc.has_function('lirc_init') and cc.has_header('lirc/lirc_client.h')
+ plugins += 'lirc'
+ else
+ str = 'you need lirc_client installed for the lirc plugin'
+ if plugin_error
+ error(str)
+ endif
+ message(str)
+ endif
+
+ libxml_req_version = '>= 2.6.0'
+ libxml_dep = dependency('libxml-2.0', version: libxml_req_version, required: false)
+ gtk_x11_dep = dependency('gtk+-x11-3.0', version: gtk_req_version, required: false)
+ if libxml_dep.found() and gtk_x11_dep.found()
+ plugins += 'brasero-disc-recorder'
+ else
+ str = 'you need libxml-2.0 ' + libxml_req_version + ' and gtk+-x11-3.0 to use the brasero-disc-recorder
plugin'
+ if plugin_error
+ error(str)
+ endif
+ message(str)
+ endif
+
+ if have_nautilus
+ plugins += 'save-file'
+ else
+ str = 'you need libnautilus-extension to use the save-file plugin'
+ if plugin_error
+ error(str)
+ endif
+ message(str)
+ endif
+
+ if have_python
+ plugins += [
+ 'dbusservice',
+ 'opensubtitles',
+ 'pythonconsole',
+ 'samplepython'
+ ]
+ endif
+
+ if have_vala
+ plugins_vala_sources = [libtotem_gir[0]]
+
+ plugins_vala_flags = [
+ '-Wno-unused-but-set-variable',
+ '-Wno-unused-function',
+ '-Wno-unused-variable'
+ ]
+
+ plugins_vala_args = [
+ '--girdir=' + join_paths(meson.build_root(), 'src'),
+ '--pkg=Totem-1.0',
+ ]
+
+ plugins += [
+ 'rotation',
+ 'sample-vala'
+ ]
+
+ zeitgeist_dep = dependency('zeitgeist-2.0', version: '>= 0.9.12', required: false)
+ if zeitgeist_dep.found()
+ plugins += 'zeitgeist-dp'
+ else
+ str = 'you need zeitgeist-2.0 >= 0.9.12 to use the zeitgeist-dp plugin'
+ if plugin_error
+ error(str)
+ endif
+ message(str)
+ endif
+ endif
+endif
+
+foreach plugin: plugins
+ subdir(plugin)
+endforeach
diff --git a/src/plugins/ontop/meson.build b/src/plugins/ontop/meson.build
new file mode 100644
index 0000000..54f32f5
--- /dev/null
+++ b/src/plugins/ontop/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'ontop'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/opensubtitles/meson.build b/src/plugins/opensubtitles/meson.build
new file mode 100644
index 0000000..f4692f4
--- /dev/null
+++ b/src/plugins/opensubtitles/meson.build
@@ -0,0 +1,40 @@
+plugin_name = 'opensubtitles'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ plugin_name + '.py',
+ 'hash.py',
+ plugin_name + '.ui'
+)
+
+install_data(
+ plugin_files,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
+
+schema = 'org.gnome.totem.plugins.' + plugin_name + '.gschema.xml'
+
+configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: totem_schemadir,
+ configuration: plugins_conf
+)
+
+install_data(
+ plugin_name + '.convert',
+ install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
+)
diff --git a/src/plugins/properties/meson.build b/src/plugins/properties/meson.build
new file mode 100644
index 0000000..47931b8
--- /dev/null
+++ b/src/plugins/properties/meson.build
@@ -0,0 +1,26 @@
+plugin_name = 'movie-properties'
+
+plugin_dir = join_paths(totem_pluginsdir, 'properties')
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps + [
+ libbacon_video_widget_properties_dep
+ ],
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/pythonconsole/meson.build b/src/plugins/pythonconsole/meson.build
new file mode 100644
index 0000000..e782e5b
--- /dev/null
+++ b/src/plugins/pythonconsole/meson.build
@@ -0,0 +1,39 @@
+plugin_name = 'pythonconsole'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ plugin_name + '.py',
+ 'console.py'
+)
+
+install_data(
+ plugin_files,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
+
+schema = 'org.gnome.totem.plugins.' + plugin_name + '.gschema.xml'
+
+configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: totem_schemadir,
+ configuration: plugins_conf
+)
+
+install_data(
+ plugin_name + '.convert',
+ install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
+)
diff --git a/src/plugins/recent/meson.build b/src/plugins/recent/meson.build
new file mode 100644
index 0000000..c3d024f
--- /dev/null
+++ b/src/plugins/recent/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'recent'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/rotation/meson.build b/src/plugins/rotation/meson.build
new file mode 100644
index 0000000..b55d3c4
--- /dev/null
+++ b/src/plugins/rotation/meson.build
@@ -0,0 +1,43 @@
+plugin_name = 'rotation'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ 'totem-' + plugin_name + '-plugin.vala',
+ 'bacon-video.vapi'
+)
+
+plugin_deps = [
+ gtk_dep,
+ peas_dep,
+ dependency('cogl-pango-1.0'),
+ clutter_gtk_dep,
+]
+
+shared_module(
+ plugin_name,
+ sources: plugins_vala_sources + plugin_files,
+ include_directories: plugins_incs + [
+ backend_inc,
+ src_inc
+ ],
+ dependencies: plugin_deps,
+ c_args: plugins_cflags + plugins_vala_flags + [
+ '--include=config.h'
+ ],
+ vala_args: plugins_vala_args,
+ link_with: libtotem,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/sample-vala/meson.build b/src/plugins/sample-vala/meson.build
new file mode 100644
index 0000000..7c9c02c
--- /dev/null
+++ b/src/plugins/sample-vala/meson.build
@@ -0,0 +1,34 @@
+plugin_name = 'sample-vala'
+
+plugin_install = false
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_deps = [
+ gtk_dep,
+ peas_dep
+]
+
+shared_module(
+ plugin_name,
+ sources: plugins_vala_sources + [
+ 'totem-' + plugin_name + '-plugin.vala'
+ ],
+ include_directories: plugins_incs,
+ dependencies: plugin_deps,
+ c_args: plugins_cflags + plugins_vala_flags,
+ vala_args: plugins_vala_args,
+ install: plugin_install,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: plugin_install,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/samplepython/meson.build b/src/plugins/samplepython/meson.build
new file mode 100644
index 0000000..bada009
--- /dev/null
+++ b/src/plugins/samplepython/meson.build
@@ -0,0 +1,23 @@
+plugin_name = 'samplepython'
+
+plugin_install = false
+
+plugin_dir = join_paths(totem_pluginsdir, 'sample-python')
+
+if plugin_install
+ install_data(
+ plugin_name + '.py',
+ install_dir: plugin_dir
+ )
+endif
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: plugin_install,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/save-file/meson.build b/src/plugins/save-file/meson.build
new file mode 100644
index 0000000..0ac157d
--- /dev/null
+++ b/src/plugins/save-file/meson.build
@@ -0,0 +1,27 @@
+plugin_name = 'save-file'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps + [
+ gio_dep,
+ libnautilus_ext_dep
+ ],
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/screensaver/meson.build b/src/plugins/screensaver/meson.build
new file mode 100644
index 0000000..5c398c7
--- /dev/null
+++ b/src/plugins/screensaver/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'screensaver'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/screenshot/meson.build b/src/plugins/screenshot/meson.build
new file mode 100644
index 0000000..c08d5eb
--- /dev/null
+++ b/src/plugins/screenshot/meson.build
@@ -0,0 +1,49 @@
+plugin_name = 'screenshot'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ 'totem-' + plugin_name + '-plugin.c',
+ 'screenshot-filename-builder.c',
+ 'totem-gallery.c',
+ 'totem-gallery-progress.c'
+)
+
+test_cflags = [
+ '-Wno-error=format-nonliteral',
+ '-Wno-format-nonliteral'
+]
+
+plugin_cflags = plugins_cflags
+
+foreach cflag: test_cflags
+ if cc.has_argument(cflag)
+ plugin_cflags += [cflag]
+ endif
+endforeach
+
+shared_module(
+ plugin_name,
+ sources: plugin_files,
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugin_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
+
+install_data(
+ 'gallery.ui',
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/skipto/meson.build b/src/plugins/skipto/meson.build
new file mode 100644
index 0000000..a175d44
--- /dev/null
+++ b/src/plugins/skipto/meson.build
@@ -0,0 +1,35 @@
+plugin_name = 'skipto'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ 'totem-' + plugin_name + '-plugin.c',
+ 'totem-time-entry.c',
+ 'totem-' + plugin_name + '.c'
+)
+
+shared_module(
+ plugin_name,
+ sources: plugin_files,
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
+
+install_data(
+ plugin_name + '.ui',
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/variable-rate/meson.build b/src/plugins/variable-rate/meson.build
new file mode 100644
index 0000000..53761fb
--- /dev/null
+++ b/src/plugins/variable-rate/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'variable-rate'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '-plugin.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/vimeo/meson.build b/src/plugins/vimeo/meson.build
new file mode 100644
index 0000000..c89b16b
--- /dev/null
+++ b/src/plugins/vimeo/meson.build
@@ -0,0 +1,24 @@
+plugin_name = 'vimeo'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+shared_module(
+ plugin_name,
+ sources: 'totem-' + plugin_name + '.c',
+ include_directories: plugins_incs,
+ dependencies: plugins_deps,
+ c_args: plugins_cflags,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/plugins/zeitgeist-dp/meson.build b/src/plugins/zeitgeist-dp/meson.build
new file mode 100644
index 0000000..ff328f6
--- /dev/null
+++ b/src/plugins/zeitgeist-dp/meson.build
@@ -0,0 +1,43 @@
+plugin_name = 'zeitgeist-dp'
+
+plugin_dir = join_paths(totem_pluginsdir, plugin_name)
+
+plugin_files = files(
+ 'totem-' + plugin_name + '-plugin.vala',
+ 'bacon-video.vapi'
+)
+
+plugin_deps = [
+ clutter_gtk_dep,
+ gtk_dep,
+ peas_dep,
+ zeitgeist_dep
+]
+
+shared_module(
+ 'totem-' + plugin_name + '-plugin',
+ sources: plugins_vala_sources + plugin_files,
+ include_directories: plugins_incs + [
+ backend_inc,
+ src_inc
+ ],
+ dependencies: plugin_deps,
+ c_args: plugins_cflags + plugins_vala_flags + [
+ '--include=config.h'
+ ],
+ vala_args: plugins_vala_args,
+ link_with: libtotem,
+ install: true,
+ install_dir: plugin_dir
+)
+
+plugin_data = plugin_name + '.plugin'
+
+custom_target(
+ plugin_data,
+ input: plugin_data + '.in',
+ output: plugin_data,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: plugin_dir
+)
diff --git a/src/properties/meson.build b/src/properties/meson.build
new file mode 100644
index 0000000..19fbab3
--- /dev/null
+++ b/src/properties/meson.build
@@ -0,0 +1,18 @@
+libbacon_video_widget_properties = library(
+ 'libbaconvideowidgetproperties',
+ sources: 'bacon-video-widget-properties.c',
+ include_directories: [
+ top_inc,
+ src_inc
+ ],
+ dependencies: gtk_dep,
+ c_args: common_flags + warn_flags + [
+ '-DDATADIR="@0@"'.format(totem_pkgdatadir)
+ ]
+)
+
+libbacon_video_widget_properties_dep = declare_dependency(
+ link_with: libbacon_video_widget_properties,
+ include_directories: include_directories('.'),
+ dependencies: gtk_dep
+)
diff --git a/subprojects/Makefile.am b/subprojects/Makefile.am
new file mode 100644
index 0000000..563f375
--- /dev/null
+++ b/subprojects/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = libgd
+
+-include $(top_srcdir)/git.mk
diff --git a/subprojects/libgd b/subprojects/libgd
new file mode 160000
index 0000000..cc90107
--- /dev/null
+++ b/subprojects/libgd
@@ -0,0 +1 @@
+Subproject commit cc90107531640bcba6c3c58e5cf6aec94d498763
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]