[gnome-sudoku/wip/ernestask/meson] Port to Meson
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sudoku/wip/ernestask/meson] Port to Meson
- Date: Mon, 4 Dec 2017 14:52:12 +0000 (UTC)
commit 043cc2c2aa7426e40058324a1f457ae398421b1a
Author: Ernestas Kulik <ernestask gnome org>
Date: Sat Dec 2 20:41:25 2017 +0200
Port to Meson
.gitignore | 2 +
Makefile.am | 14 --
autogen.sh | 46 ------
config.h.meson | 3 +
configure.ac | 98 -------------
data/icons/Makefile.am | 3 -
data/icons/hicolor/Makefile.am | 19 ---
data/meson.build | 35 +++++
git.mk | 305 ----------------------------------------
help/LINGUAS | 22 +++
help/Makefile.am | 38 -----
help/meson.build | 37 +++++
lib/Makefile.am | 46 ------
lib/meson.build | 29 ++++
meson.build | 55 +++++++
po/Makevars | 78 ----------
po/{POTFILES.in => POTFILES} | 0
po/POTFILES.skip | 6 -
po/meson.build | 1 +
src/Makefile.am | 46 ------
src/meson.build | 27 ++++
21 files changed, 211 insertions(+), 699 deletions(-)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..923ec84
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/build
+/data/gschemas.compiled
diff --git a/config.h.meson b/config.h.meson
new file mode 100644
index 0000000..5204e2c
--- /dev/null
+++ b/config.h.meson
@@ -0,0 +1,3 @@
+#mesondefine GETTEXT_PACKAGE
+#mesondefine LOCALEDIR
+#mesondefine VERSION
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000..295847b
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,35 @@
+resource_files = files('gnome-sudoku.gresource.xml')
+
+resources = gnome.compile_resources('gnome-sudoku', resource_files)
+
+desktop = i18n.merge_file('desktop',
+ input: 'gnome-sudoku.desktop.in',
+ output: 'gnome-sudoku.desktop',
+ install: true,
+ install_dir: desktopdir,
+ po_dir: '../po',
+ type: 'desktop')
+
+appdata = i18n.merge_file('appdata',
+ input: 'gnome-sudoku.appdata.xml.in',
+ output: 'gnome-sudoku.appdata.xml',
+ install: true,
+ install_dir: appdatadir,
+ po_dir: '../po')
+
+install_data('footprints.png',
+ install_dir: pixmapdir)
+
+install_data('org.gnome.sudoku.gschema.xml',
+ install_dir: schemadir)
+
+install_man('gnome-sudoku.6')
+
+foreach icon_size: ['16x16', '22x22', '24x24', '32x32', '48x48']
+ install_data('icons/hicolor/@0@/gnome-sudoku.png'.format(icon_size),
+ install_dir: join_paths(icondir, icon_size, 'apps'))
+endforeach
+
+install_data('icons/hicolor/scalable/gnome-sudoku.svg',
+ 'icons/hicolor/scalable/gnome-sudoku-symbolic.svg',
+ install_dir: join_paths(icondir, 'scalable', 'apps'))
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 0000000..7b8c3ad
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,22 @@
+ca
+cs
+da
+de
+en_GB
+el
+es
+eu
+fr
+gl
+hu
+it
+ko
+oc
+pl
+pt_BR
+ru
+sl
+sr
+sr@latin
+sv
+zh_CN
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000..7f69e64
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,37 @@
+help_media = [
+ 'figures/logo32.png',
+ 'figures/logo.png',
+ 'figures/possible-numbers.png',
+ 'figures/resuming.png',
+ 'figures/rowcolumnbox.png',
+ 'figures/strategy1.png',
+ 'figures/strategy2.png',
+ 'figures/trackers.webm',
+]
+
+help_sources = [
+ 'basics.page',
+ 'bug-filing.page',
+ 'commandline.page',
+ 'develop.page',
+ 'documentation.page',
+ 'highlighting.page',
+ 'hints.page',
+ 'index.page',
+ 'keyboard-shortcuts.page',
+ 'legal.xml',
+ 'license.page',
+ 'notes.page',
+ 'print-blank-puzzles.page',
+ 'print-inprogress-game.page',
+ 'rules.page',
+ 'save-resume.page',
+ 'strategy.page',
+ 'toolbar.page',
+ 'trackers.page',
+ 'translate.page'
+]
+
+gnome.yelp('gnome-sudoku',
+ media: help_media,
+ sources: help_sources)
diff --git a/lib/meson.build b/lib/meson.build
new file mode 100644
index 0000000..38d9e05
--- /dev/null
+++ b/lib/meson.build
@@ -0,0 +1,29 @@
+libsudoku_sources = [
+ 'sudoku-board.vala',
+ 'sudoku-game.vala',
+ 'sudoku-generator.vala',
+ 'sudoku-saver.vala',
+ 'qqwing-wrapper.cpp',
+ 'qqwing-wrapper.h'
+]
+
+libsudoku_c_args = [
+ '-include', 'config.h'
+]
+
+libsudoku_dependencies = [
+ gee,
+ json_glib,
+ threads,
+ qqwing
+]
+
+libsudoku = static_library('sudoku', libsudoku_sources,
+ c_args: libsudoku_c_args,
+ dependencies: libsudoku_dependencies,
+ vala_header: 'libsudoku.h',
+ vala_vapi: 'libsudoku.vapi')
+
+libsudoku_dep = declare_dependency(dependencies: libsudoku_dependencies,
+ include_directories: include_directories('.'),
+ link_with: libsudoku)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..4470752
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,55 @@
+project('gnome-sudoku', ['c', 'cpp', 'vala'],
+ default_options: [
+ 'cpp_std=c++11'
+ ],
+ license: 'GPL3+',
+ meson_version: '>= 0.44.0',
+ version: '3.26.0')
+
+add_project_arguments([
+ '--vapidir', join_paths(meson.current_source_dir(), 'lib')
+ ],
+ language: 'vala')
+
+gnome = import('gnome')
+i18n = import('i18n')
+
+datadir = get_option('datadir')
+localedir = get_option('localedir')
+prefix = get_option('prefix')
+
+appdatadir = join_paths(datadir, 'appdata')
+desktopdir = join_paths(datadir, 'applications')
+icondir = join_paths(datadir, 'icons', 'hicolor')
+pixmapdir = join_paths(datadir, meson.project_name(), 'images')
+schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
+
+glib_version = '2.40.0'
+gtk_version = '3.19.0'
+qqwing_version = '1.3.4'
+
+gee = dependency('gee-0.8')
+gio = dependency('gio-2.0', version: '>= @0@'.format(glib_version))
+glib = dependency('glib-2.0', version: '>= @0@'.format(glib_version))
+gtk = dependency('gtk+-3.0', version: '>= @0@'.format(gtk_version))
+json_glib = dependency('json-glib-1.0')
+qqwing = dependency('qqwing', version: '>= @0@'.format(qqwing_version))
+threads = dependency('threads')
+
+config_include_dir = include_directories('.')
+
+conf = configuration_data()
+
+conf.set_quoted('GETTEXT_PACKAGE', 'gnome-sudoku')
+conf.set_quoted('LOCALEDIR', join_paths(prefix, localedir))
+conf.set_quoted('VERSION', meson.project_version())
+
+configure_file(input: 'config.h.meson',
+ output: 'config.h',
+ configuration: conf)
+
+subdir('data')
+subdir('help')
+subdir('lib')
+subdir('po')
+subdir('src')
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..90b3ab2
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1 @@
+i18n.gettext('gnome-sudoku')
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..fcc15e3
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,27 @@
+gnome_sudoku_c_args = [
+ '-include', 'config.h'
+]
+
+gnome_sudoku_vala_args = [
+ '--gresources', resource_files,
+ '--pkg', 'posix'
+]
+
+gnome_sudoku_sources = [
+ 'config.vapi',
+ 'gnome-sudoku.vala',
+ 'number-picker.vala',
+ 'print-dialog.vala',
+ 'sudoku-printer.vala',
+ 'sudoku-view.vala',
+ resources
+]
+
+gnome_sudoku_dependencies = [gtk, libsudoku_dep, threads]
+
+gnome_sudoku = executable('gnome-sudoku', gnome_sudoku_sources,
+ c_args: gnome_sudoku_c_args,
+ vala_args: gnome_sudoku_vala_args,
+ dependencies: gnome_sudoku_dependencies,
+ link_with: [libsudoku],
+ install: true)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]