[baobab/wip/meson] Port to meson
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/meson] Port to meson
- Date: Sun, 16 Oct 2016 12:30:17 +0000 (UTC)
commit 852a60e003288121a0ba7bc99c64e95c86b6735a
Author: Stefano Facchini <stefano facchini gmail com>
Date: Sun Oct 16 11:43:43 2016 +0200
Port to meson
ChangeLog | 2 -
Makefile.am | 29 --
configure.ac | 66 ----
data/Makefile.am | 52 ---
data/meson.build | 35 ++
...gschema.xml.in => org.gnome.baobab.gschema.xml} | 2 +-
data/org.gnome.baobab.service.in | 3 +
git.mk | 350 --------------------
meson.build | 7 +
pixmaps/Makefile.am | 66 ----
.../16x16/apps/baobab.png} | Bin 768 -> 768 bytes
.../22x22/apps/baobab.png} | Bin 1108 -> 1108 bytes
.../24x24/apps/baobab.png} | Bin 1149 -> 1149 bytes
.../256x256/apps/baobab.png} | Bin 56172 -> 56172 bytes
.../32x32/apps/baobab.png} | Bin 1577 -> 1577 bytes
.../48x48/apps/baobab.png} | Bin 2556 -> 2556 bytes
.../scalable/apps/baobab-symbolic.svg} | 0
pixmaps/meson.build | 7 +
po/{POTFILES.in => POTFILES} | 0
po/POTFILES.skip | 8 -
po/meson.build | 5 +
src/Makefile.am | 67 ----
src/config.vapi | 2 +-
src/meson.build | 38 +++
24 files changed, 97 insertions(+), 642 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..d9168f6
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,35 @@
+cdata = configuration_data()
+cdata.set('VERSION', meson.project_version())
+cdata.set('bindir', get_option('prefix') + '/' + get_option('bindir'))
+
+msgfmt = find_program('msgfmt')
+
+desktop_file_in = configure_file(
+ input : 'org.gnome.baobab.desktop.in.in',
+ output : 'org.gnome.baobab.desktop.in',
+ configuration : cdata)
+
+custom_target('org.gnome.baobab.desktop',
+ input : desktop_file_in,
+ output : 'org.gnome.baobab.desktop',
+ command : [msgfmt, '--desktop', '--template', '@INPUT@', '-d', meson.current_source_dir() + '/po', '-o',
'@OUTPUT@'],
+ install : true,
+ install_dir : get_option('datadir') + '/applications')
+
+custom_target('org.gnome.baobab.appdata.xml',
+ input : 'org.gnome.baobab.appdata.xml.in',
+ output : 'org.gnome.baobab.appdata.xml',
+ command : [msgfmt, '--xml', '--template', '@INPUT@', '-d', meson.current_source_dir() + '/po', '-o',
'@OUTPUT@'],
+ install : true,
+ install_dir : get_option('datadir') + '/appdata')
+
+configure_file(
+ input : 'org.gnome.baobab.service.in',
+ output : 'org.gnome.baobab.service',
+ install : true,
+ install_dir : get_option('datadir') + '/dbus-1/services',
+ configuration : cdata)
+
+install_data('org.gnome.baobab.gschema.xml', install_dir : get_option('datadir') + '/glib-2.0/schemas/')
+install_man('baobab.1')
+
diff --git a/data/org.gnome.baobab.gschema.xml.in b/data/org.gnome.baobab.gschema.xml
similarity index 96%
rename from data/org.gnome.baobab.gschema.xml.in
rename to data/org.gnome.baobab.gschema.xml
index b966340..41c100f 100644
--- a/data/org.gnome.baobab.gschema.xml.in
+++ b/data/org.gnome.baobab.gschema.xml
@@ -1,4 +1,4 @@
-<schemalist gettext-domain="@GETTEXT_PACKAGE@">
+<schemalist gettext-domain="baobab">
<schema id="org.gnome.baobab" path="/org/gnome/baobab/">
<child name="preferences" schema="org.gnome.baobab.preferences"/>
<child name="ui" schema="org.gnome.baobab.ui"/>
diff --git a/data/org.gnome.baobab.service.in b/data/org.gnome.baobab.service.in
new file mode 100644
index 0000000..3958bbf
--- /dev/null
+++ b/data/org.gnome.baobab.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.baobab
+Exec=@bindir@/baobab --gapplication-service
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..16306b4
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,7 @@
+project('baobab', ['vala', 'c'], version : '3.22.0')
+
+subdir('data')
+subdir('pixmaps')
+subdir('po')
+subdir('src')
+
diff --git a/pixmaps/hicolor_apps_scalable_baobab-symbolic.svg
b/pixmaps/hicolor/scalable/apps/baobab-symbolic.svg
similarity index 100%
rename from pixmaps/hicolor_apps_scalable_baobab-symbolic.svg
rename to pixmaps/hicolor/scalable/apps/baobab-symbolic.svg
diff --git a/pixmaps/meson.build b/pixmaps/meson.build
new file mode 100644
index 0000000..834e417
--- /dev/null
+++ b/pixmaps/meson.build
@@ -0,0 +1,7 @@
+icon_sizes = ['16x16', '24x24', '32x32', '22x22', '256x256', '48x48']
+icon_themedir = get_option('datadir') + '/icons/hicolor/'
+
+foreach size: icon_sizes
+ install_data('hicolor/' + size + '/apps/baobab.png', install_dir: icon_themedir + size + '/apps/')
+endforeach
+
diff --git a/po/POTFILES.in b/po/POTFILES
similarity index 100%
rename from po/POTFILES.in
rename to po/POTFILES
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000..f7843ff
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,5 @@
+langs = [ 'af', 'am', 'an', 'ar', 'as', 'ast', 'az', 'be@latin', 'be', 'bg', 'bn_IN', 'bn', 'br', 'bs',
'ca', 'ca@valencia', 'crh', 'cs', 'cy', 'da', 'de', 'dz', 'el', 'en_CA', 'en_GB', 'en@shaw', 'eo', 'es',
'et', 'eu', 'fa', 'fi', 'fr', 'fur', 'ga', 'gd', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'id', 'is', 'it', 'ja',
'ka', 'kk', 'km', 'kn', 'ko', 'ku', 'lt', 'lv', 'mai', 'mg', 'mk', 'ml', 'mn', 'mr', 'ms', 'nb', 'nds', 'ne',
'nl', 'nn', 'oc', 'or', 'pa', 'pl', 'ps', 'pt_BR', 'pt', 'ro', 'ru', 'rw', 'si', 'sk', 'sl', 'sq',
'sr@latin', 'sr', 'sv', 'ta', 'te', 'tg', 'th', 'tr', 'ug', 'uk', 'vi', 'wa', 'xh', 'zh_CN', 'zh_HK', 'zh_TW'
]
+
+i18n = import('i18n')
+i18n.gettext('baobab', languages : langs)
+
diff --git a/src/config.vapi b/src/config.vapi
index c08f03c..4be6c01 100644
--- a/src/config.vapi
+++ b/src/config.vapi
@@ -1,4 +1,4 @@
-[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
+[CCode (cprefix = "", lower_case_cprefix = "")]
namespace Config {
public const string VERSION;
public const string GETTEXT_PACKAGE;
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..927a2e3
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,38 @@
+glib_dep = dependency('glib-2.0', version : '>= 2.39.90')
+gio_dep = dependency('gio-2.0', version : '>= 2.30.0')
+gtk_dep = dependency('gtk+-3.0', version : '>= 3.19.1')
+gio_unix_dep = dependency('gio-unix-2.0')
+
+cc = meson.get_compiler('c')
+m_dep = cc.find_library('m', required : false)
+
+gnome = import('gnome')
+resources = gnome.compile_resources('baobab-resources', 'baobab.gresource.xml', source_dir : '.')
+
+sources = [
+ 'baobab-application.vala',
+ 'baobab-cellrenderers.vala',
+ 'baobab-chart.vala',
+ 'baobab-location-list.vala',
+ 'baobab-location.vala',
+ 'baobab-ringschart.vala',
+ 'baobab-scanner.vala',
+ 'baobab-treemap.vala',
+ 'baobab-window.vala',
+ 'config.vapi',
+ 'main.vala',
+ resources
+]
+
+executable(
+ 'baobab',
+ sources : sources,
+ dependencies : [ glib_dep, gio_dep, gio_unix_dep, gtk_dep, m_dep ],
+ c_args : [ '-DVERSION="' + meson.project_version() + '"',
+ '-DGETTEXT_PACKAGE="baobab"',
+ '-DGNOMELOCALEDIR="' + get_option('prefix') + '/' + get_option('localedir') + '"' ],
+ vala_args : [ '--gresources=' + meson.current_source_dir() + '/baobab.gresource.xml' ],
+ link_args : [ '-rdynamic' ],
+ install : true
+)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]