mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-10-01 05:33:51 +00:00
Merge branch 'meson' into 'master'
WIP: build: port to meson See merge request GNOME/gparted!10
This commit is contained in:
commit
29ff8444a0
32
data/icons/meson.build
Normal file
32
data/icons/meson.build
Normal file
|
@ -0,0 +1,32 @@
|
|||
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||
|
||||
install_data(
|
||||
'hicolor_apps_16x16_gparted.png',
|
||||
install_dir: join_paths(icondir, '16x16', 'apps'),
|
||||
rename: 'gparted.png',
|
||||
)
|
||||
install_data(
|
||||
'hicolor_apps_22x22_gparted.png',
|
||||
install_dir: join_paths(icondir, '22x22', 'apps'),
|
||||
rename: 'gparted.png',
|
||||
)
|
||||
install_data(
|
||||
'hicolor_apps_24x24_gparted.png',
|
||||
install_dir: join_paths(icondir, '24x24', 'apps'),
|
||||
rename: 'gparted.png',
|
||||
)
|
||||
install_data(
|
||||
'hicolor_apps_32x32_gparted.png',
|
||||
install_dir: join_paths(icondir, '32x32', 'apps'),
|
||||
rename: 'gparted.png',
|
||||
)
|
||||
install_data(
|
||||
'hicolor_apps_48x48_gparted.png',
|
||||
install_dir: join_paths(icondir, '48x48', 'apps'),
|
||||
rename: 'gparted.png',
|
||||
)
|
||||
install_data(
|
||||
'hicolor_apps_scalable_gparted.svg',
|
||||
install_dir: join_paths(icondir, 'scalable', 'apps'),
|
||||
rename: 'gparted.svg',
|
||||
)
|
1
data/meson.build
Normal file
1
data/meson.build
Normal file
|
@ -0,0 +1 @@
|
|||
subdir('icons')
|
1
doc/meson.build
Normal file
1
doc/meson.build
Normal file
|
@ -0,0 +1 @@
|
|||
install_man('gparted.8')
|
19
help/C/meson.build
Normal file
19
help/C/meson.build
Normal file
|
@ -0,0 +1,19 @@
|
|||
install_data(
|
||||
'gparted.xml',
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: 'gparted.xml',
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/cs/meson.build
Normal file
31
help/cs/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/de/meson.build
Normal file
31
help/de/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/el/meson.build
Normal file
31
help/el/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/es/meson.build
Normal file
31
help/es/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/fr/meson.build
Normal file
31
help/fr/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/gd/meson.build
Normal file
31
help/gd/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/it/meson.build
Normal file
31
help/it/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
39
help/meson.build
Normal file
39
help/meson.build
Normal file
|
@ -0,0 +1,39 @@
|
|||
linguas = [
|
||||
'C',
|
||||
'cs',
|
||||
'de',
|
||||
'el',
|
||||
'es',
|
||||
'fr',
|
||||
'gd',
|
||||
'it',
|
||||
'pt_BR',
|
||||
'ro',
|
||||
'ru',
|
||||
'sl',
|
||||
'sr',
|
||||
'sr@latin',
|
||||
'sv',
|
||||
'te',
|
||||
'th',
|
||||
]
|
||||
|
||||
# We use these later in the individual meson.build's of every lingua.
|
||||
# Meson doesn't support outputting files into custom directories with
|
||||
# custom_target via the "output" argument, so we need one meson.build for
|
||||
# every lingua, otherwise we'd have to call each file differently.
|
||||
msgfmt = find_program('msgfmt')
|
||||
msgfmt_command = [msgfmt, '-o', '@OUTPUT@', '@INPUT@']
|
||||
xml2po = find_program('xml2po')
|
||||
xml2po_command = [xml2po, '-o', '@OUTPUT@', '-m', 'docbook', '-e', '-t', '@INPUT0@', '@INPUT1@']
|
||||
xsltproc = find_program('xsltproc')
|
||||
scrollkeeper_config = find_program('scrollkeeper-config')
|
||||
scrollkeeper_output = run_command(scrollkeeper_config, '--pkgdatadir').stdout().strip()
|
||||
pkgconfig_output = gnome_doc_utils_dep.get_pkgconfig_variable('db2omf')
|
||||
gnome_help_prefix = join_paths(get_option('prefix'), get_option('datadir'), 'gnome', 'help', 'gparted')
|
||||
|
||||
foreach l: linguas
|
||||
# Define it here, so that we can use the "l" variable for the lingua
|
||||
xsltproc_command = [xsltproc, '-o', '@OUTPUT@', '--stringparam', 'db2omf.basename', 'gparted', '--stringparam', 'db2omf.format', 'docbook', '--stringparam', 'db2omf.dtd', '-//OASIS//DTD DocBook XML V4.1.2//EN', '--stringparam', 'db2omf.lang', l, '--stringparam', 'db2omf.omf_dir', join_paths(get_option('prefix'),get_option('datadir'), 'omf'), '--stringparam', 'db2omf.help_dir', join_paths(join_paths(get_option('prefix'),get_option('datadir')), 'gnome/help'), '--stringparam', 'db2omf.omf_in', join_paths(meson.current_source_dir(), 'gparted.omf.in'), '--stringparam', 'db2omf.scrollkeeper_cl', scrollkeeper_output + '/Templates/C/scrollkeeper_cl.xml', pkgconfig_output, '@INPUT@']
|
||||
subdir(l)
|
||||
endforeach
|
31
help/pt_BR/meson.build
Normal file
31
help/pt_BR/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/ro/meson.build
Normal file
31
help/ro/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/ru/meson.build
Normal file
31
help/ru/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/sl/meson.build
Normal file
31
help/sl/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/sr/meson.build
Normal file
31
help/sr/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/sr@latin/meson.build
Normal file
31
help/sr@latin/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/sv/meson.build
Normal file
31
help/sv/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/te/meson.build
Normal file
31
help/te/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
31
help/th/meson.build
Normal file
31
help/th/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
mo = custom_target(
|
||||
l + '_lingua_mo',
|
||||
input: l + '.po',
|
||||
output: l + '.mo',
|
||||
command: msgfmt_command,
|
||||
install: false
|
||||
)
|
||||
|
||||
xml = custom_target(
|
||||
l + '_lingua_xml',
|
||||
input: [mo, '../C/gparted.xml'],
|
||||
output: 'gparted.xml',
|
||||
command: xml2po_command,
|
||||
install: true,
|
||||
install_dir: join_paths(gnome_help_prefix, l)
|
||||
)
|
||||
|
||||
custom_target(
|
||||
l + '_lingua_omf',
|
||||
input: xml,
|
||||
output: 'gparted-' + l + '.omf',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('prefix'),get_option('datadir'), 'omf', 'gparted')
|
||||
)
|
||||
if run_command('[', '-d', 'figures', ']').returncode() == 0
|
||||
install_data(
|
||||
'figures/gparted_window.png',
|
||||
install_dir: join_paths(gnome_help_prefix, l, 'figures')
|
||||
)
|
||||
endif
|
249
meson.build
Executable file
249
meson.build
Executable file
|
@ -0,0 +1,249 @@
|
|||
project(
|
||||
'gparted',
|
||||
'cpp',
|
||||
version : '0.31.0',
|
||||
meson_version: '>= 0.46.0',
|
||||
)
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
add_project_arguments(
|
||||
'-DHAVE_CONFIG_H',
|
||||
'-DGNOME_ICONDIR="' + join_paths(get_option('prefix'), get_option('datadir'), 'pixmaps') + '"',
|
||||
'-DGNOMELOCALEDIR="' + join_paths(get_option('prefix'), get_option('datadir'), 'locale') + '"',
|
||||
language: 'cpp',
|
||||
)
|
||||
|
||||
glibmm_dep = dependency('glibmm-2.4', version: '>=2.14.0')
|
||||
gtkmm_dep = dependency('gtkmm-2.4', version: '>2.8')
|
||||
gthread_dep = dependency('gthread-2.0')
|
||||
libdl_dep = cpp.find_library('dl')
|
||||
libparted_dep = dependency('libparted', version: '>=1.7.1')
|
||||
uuid_dep = dependency('uuid')
|
||||
|
||||
conf = configuration_data()
|
||||
|
||||
gparted_version = meson.project_version()
|
||||
conf.set_quoted('VERSION', gparted_version)
|
||||
conf.set_quoted('PACKAGE_VERSION', gparted_version)
|
||||
conf.set_quoted('PACKAGE_STRING', 'gparted' + gparted_version)
|
||||
|
||||
# Check for libparted 2.0 to 3.0 inclusive for a bug where loop table
|
||||
# creation doesn't delete old partitions.
|
||||
if dependency('libparted', version: ['>=2', '<=3'], required: false).found()
|
||||
conf.set('ENABLE_LOOP_DELETE_OLD_PTNS_WORKAROUND', true)
|
||||
else
|
||||
conf.set('ENABLE_LOOP_DELETE_OLD_PTNS_WORKAROUND', false)
|
||||
endif
|
||||
|
||||
# Check for libparted >= 2.2 for improved informing the kernel to
|
||||
# re-read the partition table code and support of larger sector sizes
|
||||
# (> 512 bytes).
|
||||
if dependency('libparted', version: '>=2.2', required: false).found()
|
||||
conf.set('USE_LIBPARTED_LARGE_SECTOR_SUPPORT', 1)
|
||||
else
|
||||
conf.set('ENABLE_PT_REREAD_WORKAROUND', 1)
|
||||
endif
|
||||
|
||||
# Check for ped_file_system_resize() function to determine the existence
|
||||
# of the API in the original parted library. Available in parted <= 2.4.
|
||||
parted_fs_resize_dep = [ ]
|
||||
if cpp.has_function('ped_file_system_resize', dependencies: libparted_dep)
|
||||
conf.set('HAVE_LIBPARTED_FS_RESIZE', 1)
|
||||
# If not already found, check for ped_file_system_resize() function in
|
||||
# the parted-fs-resize library to determine the need to use the new
|
||||
# library. Available in parted >= 3.1.
|
||||
elif cpp.find_library('parted-fs-resize', required: false).found()
|
||||
parted_fs_resize_dep = cpp.find_library('parted-fs-resize')
|
||||
conf.set('HAVE_LIBPARTED_FS_RESIZE', 1)
|
||||
else
|
||||
conf.set('HAVE_LIBPARTED_FS_RESIZE', false)
|
||||
parted_fs_resize_dep = [ ]
|
||||
endif
|
||||
|
||||
# Check for gtkmm >= 2.22 to determine availability of Gtk::MessageDialog::get_message_area().
|
||||
if dependency('gtkmm-2.4', version: '>=2.22.0', required: false).found()
|
||||
conf.set('HAVE_GET_MESSAGE_AREA', 1)
|
||||
endif
|
||||
|
||||
# Only enable C++11 compilation if required
|
||||
cxx_std = 'c++98'
|
||||
|
||||
# Check for glibmm >= 2.45.40 which requires C++11 compilation
|
||||
if dependency('glibmm-2.4', version: '>=2.45.40', required: false).found()
|
||||
cxx_std = 'c++11'
|
||||
endif
|
||||
|
||||
# Check for libsigc++ >= 2.5.1 which requires C++11 compilation.
|
||||
if dependency('sigc++-2.0', version: '>-2.5.1', required: false).found()
|
||||
cxx_std = 'c++11'
|
||||
endif
|
||||
|
||||
deps = [
|
||||
libdl_dep,
|
||||
uuid_dep,
|
||||
libparted_dep,
|
||||
gthread_dep,
|
||||
gtkmm_dep,
|
||||
glibmm_dep,
|
||||
parted_fs_resize_dep,
|
||||
]
|
||||
|
||||
|
||||
conf.set('PACKAGE', 'gparted')
|
||||
conf.set('PACKAGE_NAME', 'gparted')
|
||||
|
||||
#TODO: Optionalize the below if necessary
|
||||
conf.set('ENABLE_NLS', true)
|
||||
conf.set('HAVE_INTTYPES_H', 1)
|
||||
conf.set('HAVE_LIBPARTED', 1)
|
||||
conf.set('HAVE_LIBUUID', 1)
|
||||
conf.set('HAVE_STRING_H', 1)
|
||||
|
||||
if get_option('help')
|
||||
gnome_doc_utils_dep = dependency('gnome-doc-utils')
|
||||
conf.set('ENABLE_HELP_DOC', 1)
|
||||
subdir('help')
|
||||
else
|
||||
conf.set('ENABLE_HELP_DOC', false)
|
||||
endif
|
||||
|
||||
configure_file(
|
||||
output: 'config.h',
|
||||
configuration: conf
|
||||
)
|
||||
|
||||
include_dirs = [
|
||||
include_directories('include'),
|
||||
include_directories('src'),
|
||||
include_directories('.'),
|
||||
]
|
||||
|
||||
# i18n stuff
|
||||
i18n = import('i18n')
|
||||
|
||||
intltool = find_program('intltool-merge')
|
||||
|
||||
podir = join_paths(meson.current_source_dir(), 'po')
|
||||
|
||||
intltool_cache = join_paths(meson.current_build_dir(), 'intltool-merge-cache')
|
||||
|
||||
intltool_xml_command = [
|
||||
intltool, '-x', '-u',
|
||||
'-c', intltool_cache,
|
||||
podir, '@INPUT@', '@OUTPUT@',
|
||||
]
|
||||
|
||||
intltool_desktop_command = [
|
||||
intltool, '-d', '-u',
|
||||
'-c', intltool_cache,
|
||||
podir, '@INPUT@', '@OUTPUT@',
|
||||
]
|
||||
|
||||
gettext_package = 'gparted'
|
||||
add_project_arguments('-DGETTEXT_PACKAGE="' + gettext_package + '"', language: 'cpp')
|
||||
subdir('po')
|
||||
|
||||
po_conf = configuration_data()
|
||||
|
||||
po_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
||||
|
||||
desktop_in = configure_file(
|
||||
input: 'gparted.desktop.in.in',
|
||||
output: 'gparted.desktop.in',
|
||||
configuration: po_conf,
|
||||
)
|
||||
|
||||
# TODO: maybe drop intltool and use pure gettext so that we can use i18n.merge_file instead
|
||||
custom_target(
|
||||
'gparted.appdata.xml',
|
||||
input: 'gparted.appdata.xml.in',
|
||||
output: 'gparted.appdata.xml',
|
||||
command: intltool_xml_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'appdata'),
|
||||
)
|
||||
|
||||
custom_target(
|
||||
'gparted.desktop',
|
||||
input: desktop_in,
|
||||
output: 'gparted.desktop',
|
||||
command: intltool_desktop_command,
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'applications'),
|
||||
)
|
||||
|
||||
if get_option('polkit')
|
||||
polkitpolicydir = join_paths(get_option('datadir'), 'polkit-1/actions')
|
||||
|
||||
polkit_policy_in = configure_file(
|
||||
input: 'org.gnome.gparted.policy.in.in',
|
||||
output: 'org.gnome.gparted.policy.in',
|
||||
configuration: po_conf,
|
||||
)
|
||||
|
||||
custom_target(
|
||||
'org.gnome.gparted.policy',
|
||||
input: polkit_policy_in,
|
||||
output: 'org.gnome.gparted.policy',
|
||||
command: intltool_xml_command,
|
||||
install: true,
|
||||
install_dir: polkitpolicydir,
|
||||
)
|
||||
endif
|
||||
|
||||
# Find graphical privilege escalation program
|
||||
gksuprog = ''
|
||||
if get_option('polkit')
|
||||
# Check for pkexec >= 0.102 for its ability to run X11 apps.
|
||||
polkit_dep = dependency('polkit-agent-1', version: '>=0.102')
|
||||
gksuprog = 'pkexec --disable-internal-agent'
|
||||
elif find_program('gksudo', required: false).found()
|
||||
gksuprog = 'gksudo'
|
||||
elif find_program('gksu', required: false).found()
|
||||
gksuprog = 'gksu'
|
||||
elif find_program('kdesudo', required: false).found()
|
||||
gksuprog = 'kdesudo'
|
||||
elif find_program('xdg-su', required: false).found()
|
||||
gksuprog = 'xdg-su -c'
|
||||
endif
|
||||
|
||||
# Configure the gparted script
|
||||
gparted_bin_conf = configuration_data()
|
||||
|
||||
gparted_bin_conf.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir')))
|
||||
gparted_bin_conf.set('gksuprog', gksuprog)
|
||||
gparted_bin_conf.set('enable_xhost_root', get_option('xhost_root'))
|
||||
gparted_bin_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
||||
|
||||
gparted_bin = configure_file(
|
||||
input: 'gparted.in',
|
||||
output: 'gparted',
|
||||
configuration: gparted_bin_conf,
|
||||
)
|
||||
|
||||
install_data(
|
||||
gparted_bin,
|
||||
install_dir: join_paths(get_option('bindir')),
|
||||
rename: 'gparted',
|
||||
install_mode: 'rwxr-xr-x',
|
||||
)
|
||||
|
||||
# Optional stuff
|
||||
if get_option('libparted_dmraid')
|
||||
conf.set('USE_LIBPARTED_DMRAID', 1)
|
||||
endif
|
||||
|
||||
# Check for libparted >= 3.2 for online resize support
|
||||
if get_option('online-resize')
|
||||
dependency('libparted', version: '>=3.2')
|
||||
conf.set('ENABLE_ONLINE_RESIZE', 1)
|
||||
endif
|
||||
|
||||
if get_option('man')
|
||||
subdir('doc')
|
||||
endif
|
||||
|
||||
subdir('data')
|
||||
subdir('src')
|
||||
subdir('tests')
|
6
meson_options.txt
Normal file
6
meson_options.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
option('help', type: 'boolean', value: false, description: 'install help via gnome-doc-utils')
|
||||
option('man', type: 'boolean', value: true, description: 'install manpages')
|
||||
option('libparted_dmraid', type: 'boolean', value: false, description: 'support dmraid')
|
||||
option('online-resize', type: 'boolean', value: false, description: 'support online resize')
|
||||
option('polkit', type: 'boolean', value: false, description: 'install polkit policy files')
|
||||
option('xhost_root', type: 'combo', choices: ['yes', 'no'], value: 'no', description: 'enable explicitly granting root access the display')
|
1
po/meson.build
Normal file
1
po/meson.build
Normal file
|
@ -0,0 +1 @@
|
|||
i18n.gettext(gettext_package)
|
79
src/meson.build
Normal file
79
src/meson.build
Normal file
|
@ -0,0 +1,79 @@
|
|||
gparted_sources=[
|
||||
'BlockSpecial.cc',
|
||||
'CopyBlocks.cc',
|
||||
'DMRaid.cc',
|
||||
'Device.cc',
|
||||
'DialogFeatures.cc',
|
||||
'DialogManageFlags.cc',
|
||||
'DialogPasswordEntry.cc',
|
||||
'Dialog_Base_Partition.cc',
|
||||
'Dialog_Disklabel.cc',
|
||||
'Dialog_FileSystem_Label.cc',
|
||||
'Dialog_Partition_Copy.cc',
|
||||
'Dialog_Partition_Info.cc',
|
||||
'Dialog_Partition_Name.cc',
|
||||
'Dialog_Partition_New.cc',
|
||||
'Dialog_Partition_Resize_Move.cc',
|
||||
'Dialog_Progress.cc',
|
||||
'Dialog_Rescue_Data.cc',
|
||||
'DrawingAreaVisualDisk.cc',
|
||||
'FS_Info.cc',
|
||||
'FileSystem.cc',
|
||||
'Frame_Resizer_Base.cc',
|
||||
'Frame_Resizer_Extended.cc',
|
||||
'GParted_Core.cc',
|
||||
'HBoxOperations.cc',
|
||||
'LVM2_PV_Info.cc',
|
||||
'LUKS_Info.cc',
|
||||
'Mount_Info.cc',
|
||||
'Operation.cc',
|
||||
'OperationChangeUUID.cc',
|
||||
'OperationCheck.cc',
|
||||
'OperationCopy.cc',
|
||||
'OperationCreate.cc',
|
||||
'OperationDelete.cc',
|
||||
'OperationDetail.cc',
|
||||
'OperationFormat.cc',
|
||||
'OperationLabelFileSystem.cc',
|
||||
'OperationNamePartition.cc',
|
||||
'OperationResizeMove.cc',
|
||||
'Partition.cc',
|
||||
'PartitionLUKS.cc',
|
||||
'PartitionVector.cc',
|
||||
'PasswordRAMStore.cc',
|
||||
'PipeCapture.cc',
|
||||
'Proc_Partitions_Info.cc',
|
||||
'ProgressBar.cc',
|
||||
'SWRaid_Info.cc',
|
||||
'TreeView_Detail.cc',
|
||||
'Utils.cc',
|
||||
'Win_GParted.cc',
|
||||
'btrfs.cc',
|
||||
'exfat.cc',
|
||||
'ext2.cc',
|
||||
'f2fs.cc',
|
||||
'fat16.cc',
|
||||
'hfs.cc',
|
||||
'hfsplus.cc',
|
||||
'jfs.cc',
|
||||
'linux_swap.cc',
|
||||
'lvm2_pv.cc',
|
||||
'luks.cc',
|
||||
'main.cc',
|
||||
'nilfs2.cc',
|
||||
'ntfs.cc',
|
||||
'reiser4.cc',
|
||||
'reiserfs.cc',
|
||||
'udf.cc',
|
||||
'ufs.cc',
|
||||
'xfs.cc',
|
||||
]
|
||||
|
||||
gparted_executable = executable(
|
||||
'gpartedbin',
|
||||
gparted_sources,
|
||||
dependencies: deps,
|
||||
install: true,
|
||||
include_directories: include_dirs,
|
||||
override_options: ['cpp_std=' + cxx_std],
|
||||
)
|
31
tests/meson.build
Normal file
31
tests/meson.build
Normal file
|
@ -0,0 +1,31 @@
|
|||
gtest_dep = dependency('gtest', main: true)
|
||||
test_dummy_exe = executable(
|
||||
'dummy',
|
||||
'test_dummy.cc',
|
||||
include_directories: include_dirs,
|
||||
dependencies: [
|
||||
gtest_dep,
|
||||
deps,
|
||||
],
|
||||
)
|
||||
test_BlockSpecial_exe = executable(
|
||||
'BlockSpecial',
|
||||
'../src/BlockSpecial.cc', 'test_BlockSpecial.cc',
|
||||
include_directories: include_dirs,
|
||||
dependencies: [
|
||||
deps,
|
||||
gtest_dep,
|
||||
],
|
||||
)
|
||||
test_PipeCapture_exe = executable(
|
||||
'PipeCapture',
|
||||
'../src/PipeCapture.cc', 'test_PipeCapture.cc',
|
||||
include_directories: include_dirs,
|
||||
dependencies: [
|
||||
deps,
|
||||
gtest_dep,
|
||||
],
|
||||
)
|
||||
test('test_dummy', test_dummy_exe)
|
||||
test('test_BlockSpecial', test_BlockSpecial_exe)
|
||||
test('test_PipeCapture', test_PipeCapture_exe)
|
Loading…
Reference in a new issue