1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
gnome = import('gnome')
plparser_public_headers = [
'totem-pl-parser.h',
'totem-pl-playlist.h',
'totem-pl-parser-mini.h',
]
install_headers(plparser_public_headers, subdir : 'totem-pl-parser/1/plparser')
# generate totem-pl-parser-features.h
version_cdata = configuration_data()
version_cdata.set('TOTEM_PL_PARSER_VERSION_MAJOR', plparse_major_version)
version_cdata.set('TOTEM_PL_PARSER_VERSION_MINOR', plparse_minor_version)
version_cdata.set('TOTEM_PL_PARSER_VERSION_MICRO', plparse_micro_version)
features_h = configure_file(output: 'totem-pl-parser-features.h',
install_dir: 'include/totem-pl-parser/1/plparser',
configuration: version_cdata)
totem_pl_parser_builtins = gnome.mkenums('totem-pl-parser-builtins',
sources: 'totem-pl-parser.h',
c_template : 'totem-pl-parser-builtins.c.template',
h_template : 'totem-pl-parser-builtins.h.template',
install_dir : 'include/totem-pl-parser/1/plparser',
install_header : true)
totem_pl_parser_builtins_h = totem_pl_parser_builtins[1]
totem_pl_parser_marshalers = gnome.genmarshal('totemplparser-marshal',
sources : 'totemplparser-marshal.list',
prefix : '_totemplparser_marshal')
plparser_sources = [
'totem-disc.c',
'totem-pl-parser.c',
'totem-pl-parser-amz.c',
'totem-pl-parser-lines.c',
'totem-pl-parser-media.c',
'totem-pl-parser-misc.c',
'totem-pl-parser-pla.c',
'totem-pl-parser-pls.c',
'totem-pl-parser-podcast.c',
'totem-pl-parser-qt.c',
'totem-pl-parser-smil.c',
'totem-pl-parser-videosite.c',
'totem-pl-parser-wm.c',
'totem-pl-parser-xspf.c',
'totem-pl-playlist.c',
'xmlparser.c',
'xmllexer.c',
]
totemlib_inc = include_directories('../lib')
libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
plparser_cflags = extra_warning_cflags + ['-DLIBEXECDIR="@0@"'.format(libexecdir)]
symbol_map = 'plparser.map'
symbol_link_args = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), symbol_map)
plparser_lib = library('totem-plparser',
plparser_sources, features_h,
totem_pl_parser_builtins,
totem_pl_parser_marshalers,
include_directories: [config_inc, totemlib_inc],
c_args: plparser_cflags,
dependencies: totem_pl_parser_deps,
link_args : symbol_link_args,
link_with: totem_glibc_lib,
link_depends : symbol_map,
soversion: plparse_soversion,
install: true)
plparser_dep = declare_dependency(sources: [totem_pl_parser_builtins_h, features_h],
include_directories: [config_inc, plparser_inc],
dependencies: gio_dep,
link_with: plparser_lib)
plparser_mini_sources = [
'totem-pl-parser.c',
'totem-pl-parser-lines.c',
'totem-pl-parser-misc.c',
'totem-pl-parser-pls.c',
'totem-pl-parser-podcast.c',
'totem-pl-parser-qt.c',
'totem-pl-parser-smil.c',
'totem-pl-parser-videosite.c',
'totem-pl-parser-wm.c',
'totem-pl-parser-xspf.c',
'totem-pl-parser-amz.c',
'totem-pl-playlist.c',
]
mini_symbol_map = 'plparser-mini.map'
mini_symbol_link_args = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mini_symbol_map)
plparser_mini_lib = library('totem-plparser-mini',
plparser_mini_sources,
totem_pl_parser_builtins, features_h,
include_directories: [config_inc, totemlib_inc],
c_args: plparser_cflags + ['-DTOTEM_PL_PARSER_MINI'],
dependencies: gio_dep,
link_args : mini_symbol_link_args,
link_with: totem_glibc_lib,
link_depends : mini_symbol_map,
soversion: plparse_soversion,
install: true)
if have_quvi
videosite_exe = executable('99-totem-pl-parser-videosite',
'videosite-parser.c', totem_pl_parser_builtins_h,
c_args: '-DLIBEXECDIR="@0@"'.format(libexecdir),
include_directories: [config_inc, totemlib_inc],
dependencies: [quvi_dep, glib_dep],
install_dir: join_paths(libexecdir, 'totem-pl-parser'),
install: true)
endif
# Introspection
if not meson.is_cross_build()
gnome.generate_gir(plparser_lib,
sources: plparser_public_headers + plparser_sources + [
totem_pl_parser_marshalers[1],
totem_pl_parser_builtins_h,
features_h,
],
namespace: 'TotemPlParser',
nsversion: '1.0',
identifier_prefix: 'TotemPl',
symbol_prefix: 'totem_pl',
includes: ['GObject-2.0', 'Gio-2.0'],
extra_args: ['--identifier-prefix=TotemDisc',
'--symbol-prefix=totem_disc',
'--identifier-prefix=TotemCd',
'--symbol-prefix=totem_cd',
'--quiet'],
install: true)
endif
subdir('tests')
|