[gnome-boxes/wip/meson: 2/2] Port to meson
- From: Zeeshan Ali <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/meson: 2/2] Port to meson
- Date: Fri, 14 Oct 2016 13:26:44 +0000 (UTC)
commit a8fac2f055c2a0acdfcd5d9aace0c8eabe1a5263
Author: Zeeshan Ali <zeenix gmail com>
Date: Mon Oct 10 15:49:55 2016 +0200
Port to meson
autogen.sh | 13 +++-
configure.ac | 213 -----------------------------------------------------
libgd | 2 +-
meson.build | 66 ++++++++++++++++
meson_options.txt | 21 +++++
5 files changed, 98 insertions(+), 217 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 5b679c9..15fa919 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -8,11 +8,18 @@ test -z "$srcdir" && srcdir=.
olddir=`pwd`
cd "$srcdir"
+mkdir subprojects
+cd subprojects
git submodule update --init --recursive
-autoreconf -v --force --install
-intltoolize -f
cd "$olddir"
+
if [ -z "$NOCONFIGURE" ]; then
- "$srcdir"/configure --enable-maintainer-mode --enable-vala --enable-debug ${1+"$@"}
+ mkdir build
+ cd build
+ meson --enable-debug
+
+ cd "$olddir"
+
+ echo "Now run ninja (or ninja-build) in build director to build Boxes"
fi
diff --git a/libgd b/libgd
index 752f65e..6c7e8e9 160000
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 752f65e91ea0d9a2ee8a2d21343bbd97bd0d038a
+Subproject commit 6c7e8e90f82af621c461e5d869e943dcb3a14f21
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..a8b452e
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2016 Pelagicore AB.
+#
+# Author: Zeeshan Ali <zeeshanak gnome org>
+#
+project('gnome-boxes', 'vala', 'c', version: '3.23.1')
+
+cc = meson.get_compiler('c')
+conf = configuration_data()
+
+#check_headers = [
+# ['HAVE_DLFCN_H', 'dlfcn.h'],
+# ['HAVE_INTTYPES_H', 'inttypes.h'],
+# ['HAVE_MEMORY_H', 'memory.h'],
+# ['HAVE_STDINT_H', 'stdint.h'],
+# ['HAVE_STDLIB_H', 'stdlib.h'],
+# ['HAVE_STRINGS_H', 'strings.h'],
+# ['HAVE_STRING_H', 'string.h'],
+# ['HAVE_SYS_STAT_H', 'sys/stat.h'],
+# ['HAVE_SYS_TYPES_H', 'sys/types.h'],
+# ['HAVE_UNISTD_H', 'unistd.h'],
+#]
+#
+#foreach h : check_headers
+# if cc.has_header(h.get(1))
+# conf.set(h.get(0), 1)
+# endif
+#endforeach
+
+boxes_version = meson.project_version()
+conf.set('VERSION', '"' + boxes_version + '"')
+conf.set('PACKAGE_VERSION', '"' + boxes_version + '"')
+conf.set('PACKAGE_NAME', '"gnome-boxes"')
+conf.set('GETTEXT_PACKAGE', '"gnome-boxes"')
+conf.set('PACKAGE_TARNAME', '"gnome-boxes"')
+conf.set('PACKAGE_STRING', '"gnome-boxes ' + boxes_version + '"')
+conf.set('PACKAGE_URL', '"https://wiki.gnome.org/Apps/Boxes"')
+conf.set('PACKAGE_BUGREPORT', '"https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-boxes"')
+
+if get_option('strict-cc')
+ add_global_arguments('-Wall -Werror', language: 'c')
+endif
+
+if get_option('debug')
+ add_global_arguments('-O0 -ggdb3', language: 'c')
+ add_global_arguments('-g', language: 'vala')
+endif
+
+configure_file(output : 'config.h', configuration : conf)
+
+libgd_gtk_hacks = true
+libgd_main_view = true
+libgd_main_icon_view = true
+libgd_notification = true
+libgd_static = true
+libgd_vapi = true
+subdir('libgd')
+
+#subdir('data')
+#subdir('help')
+subdir('src')
+#subdir('po')
+#subdir('vapi')
+
+# MOVE TO data subdir
+#data/org.gnome.Boxes.desktop.in
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..85f03b7
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,21 @@
+option('strict-cc',
+ type: 'boolean',
+ value: false,
+ description: 'Enable strict C compiler')
+
+option('debug',
+ type: 'boolean',
+ value: false,
+ description: 'Enable debugging')
+
+option('enable-ovirt',
+ type: 'combo',
+ choices: ['yes', 'no', 'auto'],
+ value: 'auto',
+ description: 'Enable oVirt')
+
+option('enable-installed-tests',
+ type: 'boolean',
+ value: true,
+ description: 'Enable installed tests')
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]