diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index cfe8408972909dc4eea24253fe10cc919f826c44..0000000000000000000000000000000000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-NULL =
-
-SUBDIRS = src games data po
-
-if ENABLE_CARD_THEME_FORMAT_SVG
-SUBDIRS += cards
-endif
-
-if BUILD_HELP
-SUBDIRS += help
-endif
-
-DISTCHECK_CONFIGURE_FLAGS = \
- --with-platform=gnome \
- --with-card-theme-formats=all \
- --disable-schemas-install \
- --disable-scrollkeeper \
- --disable-silent-rules
-
-EXTRA_DIST = \
- aisleriot.doap \
- autogen.sh \
- COPYING.GFDL \
- COPYING.GFDL1.3 \
- COPYING.GPL3 \
- COPYING.LGPL3 \
- ChangeLog \
- $(NULL)
-
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update \
- $(NULL)
-
-MAINTAINERCLEANFILES = \
- ChangeLog \
- $(srcdir)/INSTALL \
- $(srcdir)/aclocal.m4 \
- $(srcdir)/autoscan.log \
- $(srcdir)/compile \
- $(srcdir)/py-compile \
- $(srcdir)/config.guess \
- $(srcdir)/config.h.in \
- $(srcdir)/config.sub \
- $(srcdir)/configure \
- $(srcdir)/configure.scan \
- $(srcdir)/depcomp \
- $(srcdir)/install-sh \
- $(srcdir)/ltmain.sh \
- $(srcdir)/missing \
- $(srcdir)/mkinstalldirs \
- $(srcdir)/po/Makefile.in.in \
- `find "$(srcdir)" -type f -name Makefile.in -print` \
- $(NULL)
-
-# Build ChangeLog from git log
-ChangeLog:
- $(AM_V_GEN) if test -e $(top_srcdir)/.git; then \
- git log --stat --no-color --since=2008-06-21 > $@; \
- fi
-
-dist: ChangeLog
-
-.PHONY: ChangeLog
-
--include $(top_srcdir)/git.mk
diff --git a/Makefile.meson b/Makefile.meson
new file mode 100644
index 0000000000000000000000000000000000000000..4e92f6f85aba6203fa098d1fd999be5750a3e27e
--- /dev/null
+++ b/Makefile.meson
@@ -0,0 +1,43 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this library. If not, see .
+
+srcdir=@srcdir@
+builddir=@builddir@
+
+#
+
+NTHREADS = 1
+NJOBS = -j$(NTHREADS)
+NINJA = ninja $(NJOBS)
+
+#
+
+all:
+ $(NINJA)
+
+check:
+ MESON_TESTTHREADS=$(NTHREADS) $(NINJA) test
+
+clean:
+ $(NINJA) clean
+
+coverage:
+ $(NINJA) coverage
+
+install:
+ $(NINJA) install
+
+uninstall:
+ $(NINJA) uninstall
diff --git a/NEWS b/NEWS
deleted file mode 100644
index e3eb7203af950ac2b41f81107a4ae6423ba75086..0000000000000000000000000000000000000000
--- a/NEWS
+++ /dev/null
@@ -1,106 +0,0 @@
-Aisleriot 3.18.0
-================
-* New games: Hamilton, Wall
-* Translation updates
-
-Aisleriot 3.12.0
-================
-
-* Build fixes (#715120, #726780)
-* Games fixes (#677197, Vincent Povirk)
-* Translation updates
-
-Aisleriot 3.10.0
-================
-- Build fixes
-- Translation updates
-
-Aisleriot 3.9.90
-================
-- Many game improvements (Vincent Povirk)
-- New card decks (Mario Frasca)
-- Build fixes
-- Translation updates
-
-Aisleriot 3.6.2
-===============
-- translation updates
-
-Aisleriot 3.6.1
-===============
-- translation updates
-
-Aisleriot 3.6.0
-===============
-- fix help link
-- translation updates
-
-Aisleriot 3.5.90
-================
-- many games fixes (Vincent Povirk)
-- translation updates
-
-Aisleriot 3.5.0
-===============
-- build fixes
-- many games fixes (Vincent Povirk)
-- many translation updates
-
-Aisleriot 3.3.2
-===============
-- Misc improvements and bug fixes
-- Translation updates
-
-Aisleriot 3.3.1
-===============
-- Aisleriot now requires guile >= 2.0
-- Many improvements and bug fixes
-- Translation updates
-
-Aisleriot 3.3.0
-===============
-- Change card theme format
-- Many game fixes (Vincent Povirk)
-- Translation updates
-
-Aisleriot 3.2.2
-===============
-- Dist missing sound files
-
-Aisleriot 3.2.1
-===============
-- Minor bug fixes
-- Translation updates
-
-Aisleriot 3.2.0
-===============
-- Update card theme install info for debian (#659997, Josselin Mouette)
-- Translation updates
-
-Aisleriot 3.1.92
-================
-- Distribute a copy of the LGPL
-- Update card theme install info for opensuse and ubuntu (#648601, Vincent Untz)
-- Update card theme install info for ubuntu (#648601)
-- Fix the build with the 'file' help method (#656967, Alexandre Rostovtsev)
-- Build ghelp with yelp-tools instead of gnome-doc-utils (#657683, Jeremy Bicha)
-- Fix game restart (#657735)
-- Translation updates
-
-Aisleriot 3.1.1
-===============
-
-* New game "Aunt Mary" (bug #325039)
-* Translation updates
-
-Aisleriot 3.1.0
-===============
-
-* Translation updates
-
-Aisleriot 3.0.0
-===============
-
-Initial standalone release. Identical to Aisleriot from
-GNOME Games 3.0.0.
-
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644
index d1515961128f73e0677c872a66baeab639e8e5df..0000000000000000000000000000000000000000
--- a/acinclude.m4
+++ /dev/null
@@ -1,319 +0,0 @@
-dnl Macros to check the presence of generic (non-typed) symbols.
-dnl Copyright (c) 2006-2008 Diego Pettenò
-dnl Copyright (c) 2006-2008 xine project
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-dnl 02110-1301, USA.
-dnl
-dnl As a special exception, the copyright owners of the
-dnl macro gives unlimited permission to copy, distribute and modify the
-dnl configure scripts that are the output of Autoconf when processing the
-dnl Macro. You need not follow the terms of the GNU General Public
-dnl License when using or distributing such scripts, even though portions
-dnl of the text of the Macro appear in them. The GNU General Public
-dnl License (GPL) does govern all other use of the material that
-dnl constitutes the Autoconf Macro.
-dnl
-dnl This special exception to the GPL applies to versions of the
-dnl Autoconf Macro released by this project. When you make and
-dnl distribute a modified version of the Autoconf Macro, you may extend
-dnl this special exception to the GPL to apply to your modified version as
-dnl well.
-
-dnl Check if the flag is supported by compiler
-dnl CC_CHECK_CFLAGS_SILENT([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [
- AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]),
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $1"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])],
- [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl Check if the flag is supported by compiler (cacheable)
-dnl CC_CHECK_CFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_CFLAGS], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_cflags_$1]),
- CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
- )
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl CC_CHECK_CFLAG_APPEND(FLAG, [action-if-found], [action-if-not-found])
-dnl Check for CFLAG and appends them to CFLAGS if supported
-AC_DEFUN([CC_CHECK_CFLAG_APPEND], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_cflags_$1]),
- CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here!
- )
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_cflags_$1])[ = xyes],
- [CFLAGS="$CFLAGS $1"; DEBUG_CFLAGS="$DEBUG_CFLAGS $1"; $2], [$3])
-])
-
-dnl CC_CHECK_CFLAGS_APPEND([FLAG1 FLAG2], [action-if-found], [action-if-not])
-AC_DEFUN([CC_CHECK_CFLAGS_APPEND], [
- for flag in $1; do
- CC_CHECK_CFLAG_APPEND($flag, [$2], [$3])
- done
-])
-
-dnl Check if the flag is supported by linker (cacheable)
-dnl CC_CHECK_LDFLAGS([FLAG], [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
-
-AC_DEFUN([CC_CHECK_LDFLAGS], [
- AC_CACHE_CHECK([if $CC supports $1 flag],
- AS_TR_SH([cc_cv_ldflags_$1]),
- [ac_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $1"
- AC_LANG_PUSH([C])
- AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 1; }])],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_ldflags_$1])="])
- AC_LANG_POP([C])
- LDFLAGS="$ac_save_LDFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_ldflags_$1])[ = xyes],
- [$2], [$3])
-])
-
-dnl define the LDFLAGS_NOUNDEFINED variable with the correct value for
-dnl the current linker to avoid undefined references in a shared object.
-AC_DEFUN([CC_NOUNDEFINED], [
- dnl We check $host for which systems to enable this for.
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- case $host in
- dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
- dnl are requested, as different implementations are present; to avoid problems
- dnl use -Wl,-z,defs only for those platform not behaving this way.
- *-freebsd* | *-openbsd*) ;;
- *)
- dnl First of all check for the --no-undefined variant of GNU ld. This allows
- dnl for a much more readable commandline, so that people can understand what
- dnl it does without going to look for what the heck -z defs does.
- for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do
- CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"])
- break
- done
- ;;
- esac
-
- AC_SUBST([LDFLAGS_NOUNDEFINED])
-])
-
-dnl Check for a -Werror flag or equivalent. -Werror is the GCC
-dnl and ICC flag that tells the compiler to treat all the warnings
-dnl as fatal. We usually need this option to make sure that some
-dnl constructs (like attributes) are not simply ignored.
-dnl
-dnl Other compilers don't support -Werror per se, but they support
-dnl an equivalent flag:
-dnl - Sun Studio compiler supports -errwarn=%all
-AC_DEFUN([CC_CHECK_WERROR], [
- AC_CACHE_CHECK(
- [for $CC way to treat warnings as errors],
- [cc_cv_werror],
- [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror],
- [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])])
- ])
-])
-
-AC_DEFUN([CC_CHECK_ATTRIBUTE], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports __attribute__(( ifelse([$2], , [$1], [$2]) ))],
- AS_TR_SH([cc_cv_attribute_$1]),
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([$3])],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='yes'"],
- [eval "AS_TR_SH([cc_cv_attribute_$1])='no'"])
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([eval test x$]AS_TR_SH([cc_cv_attribute_$1])[ = xyes],
- [AC_DEFINE(
- AS_TR_CPP([SUPPORT_ATTRIBUTE_$1]), 1,
- [Define this if the compiler supports __attribute__(( ifelse([$2], , [$1], [$2]) ))]
- )
- $4],
- [$5])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
- CC_CHECK_ATTRIBUTE(
- [constructor],,
- [void __attribute__((constructor)) ctor() { int a; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
- CC_CHECK_ATTRIBUTE(
- [format], [format(printf, n, n)],
- [void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_FORMAT_ARG], [
- CC_CHECK_ATTRIBUTE(
- [format_arg], [format_arg(printf)],
- [char *__attribute__((format_arg(1))) gettextlike(const char *fmt) { fmt = (void *)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
- CC_CHECK_ATTRIBUTE(
- [visibility_$1], [visibility("$1")],
- [void __attribute__((visibility("$1"))) $1_function() { }],
- [$2], [$3])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
- CC_CHECK_ATTRIBUTE(
- [nonnull], [nonnull()],
- [void __attribute__((nonnull())) some_function(void *foo, void *bar) { foo = (void*)0; bar = (void*)0; }],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
- CC_CHECK_ATTRIBUTE(
- [unused], ,
- [void some_function(void *foo, __attribute__((unused)) void *bar);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_SENTINEL], [
- CC_CHECK_ATTRIBUTE(
- [sentinel], ,
- [void some_function(void *foo, ...) __attribute__((sentinel));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_DEPRECATED], [
- CC_CHECK_ATTRIBUTE(
- [deprecated], ,
- [void some_function(void *foo, ...) __attribute__((deprecated));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
- CC_CHECK_ATTRIBUTE(
- [alias], [weak, alias],
- [void other_function(void *foo) { }
- void some_function(void *foo) __attribute__((weak, alias("other_function")));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
- CC_CHECK_ATTRIBUTE(
- [malloc], ,
- [void * __attribute__((malloc)) my_alloc(int n);],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_PACKED], [
- CC_CHECK_ATTRIBUTE(
- [packed], ,
- [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_CONST], [
- CC_CHECK_ATTRIBUTE(
- [const], ,
- [int __attribute__((const)) twopow(int n) { return 1 << n; } ],
- [$1], [$2])
-])
-
-AC_DEFUN([CC_FLAG_VISIBILITY], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if $CC supports -fvisibility=hidden],
- [cc_cv_flag_visibility],
- [cc_flag_visibility_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden],
- cc_cv_flag_visibility='yes',
- cc_cv_flag_visibility='no')
- CFLAGS="$cc_flag_visibility_save_CFLAGS"])
-
- AS_IF([test "x$cc_cv_flag_visibility" = "xyes"],
- [AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1,
- [Define this if the compiler supports the -fvisibility flag])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_FUNC_EXPECT], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([if compiler has __builtin_expect function],
- [cc_cv_func_expect],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [int some_function() {
- int a = 3;
- return (int)__builtin_expect(a, 3);
- }])],
- [cc_cv_func_expect=yes],
- [cc_cv_func_expect=no])
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- AS_IF([test "x$cc_cv_func_expect" = "xyes"],
- [AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1,
- [Define this if the compiler supports __builtin_expect() function])
- $1],
- [$2])
-])
-
-AC_DEFUN([CC_ATTRIBUTE_ALIGNED], [
- AC_REQUIRE([CC_CHECK_WERROR])
- AC_CACHE_CHECK([highest __attribute__ ((aligned ())) supported],
- [cc_cv_attribute_aligned],
- [ac_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $cc_cv_werror"
- AC_LANG_PUSH([C])
- for cc_attribute_align_try in 64 32 16 8 4 2; do
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
- int main() {
- static char c __attribute__ ((aligned($cc_attribute_align_try))) = 0;
- return c;
- }])], [cc_cv_attribute_aligned=$cc_attribute_align_try; break])
- done
- AC_LANG_POP([C])
- CFLAGS="$ac_save_CFLAGS"
- ])
-
- if test "x$cc_cv_attribute_aligned" != "x"; then
- AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], [$cc_cv_attribute_aligned],
- [Define the highest alignment supported])
- fi
-])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index dcb8e837b016bb255922a26694bd64bdcd714edd..0000000000000000000000000000000000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-set -e
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-cd "$srcdir"
-mkdir -p m4 >/dev/null 2>&1 || true
-autoreconf --verbose --force --install
-intltoolize --force
-cd -
-
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/cards/Makefile.am b/cards/Makefile.am
deleted file mode 100644
index 2cd0cd6e6ca3c04867a1fdc3a099ab2b6a46db84..0000000000000000000000000000000000000000
--- a/cards/Makefile.am
+++ /dev/null
@@ -1,52 +0,0 @@
-NULL =
-
-XMLLINT_FLAGS = --nonet --noblanks
-GZIP_FLAGS = -9 -n
-
-SVGS = \
- anglo.svg \
- anglo_bitmap.svg \
- bellot.svg \
- bonded.svg \
- dondorf.svg \
- gnomangelo.svg \
- gnomangelo_bitmap.svg \
- guyenne-classic.svg \
- ornamental.svg \
- paris.svg \
- swiss-xvii.svg \
- tango.svg \
- $(NULL)
-
-carddir = $(pkgdatadir)/cards
-nodist_card_DATA = $(SVGS:.svg=.svgz)
-
-EXTRA_DIST = \
- README.bellot \
- README.dondorf \
- README.ornamental \
- README.paris \
- $(SVGS)
- $(NULL)
-
-CLEANFILES = \
- $(nodist_card_DATA) \
- $(NULL)
-
-DISTCLEANFILES = \
- $(nodist_card_DATA) \
- $(NULL)
-
-%.svgz: %.svg
- $(AM_V_GEN)$(XMLLINT) $(XMLLINT_FLAGS) $< | $(GZIP) $(GZIP_FLAGS) > $@
-
-# SVG crush utility
-
-svgcrush: svgcrush.c Makefile
- $(AM_V_GEN) $(CC) `$(PKG_CONFIG) --libs --cflags glib-2.0 libxml-2.0` $(AM_CPPFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $<
-
-EXTRA_DIST += svgcrush.c
-
-# .gitignore
-
--include $(top_srcdir)/git.mk
diff --git a/cards/meson.build b/cards/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..e865f1003ce5d358f54034973b28a84a721f2f6a
--- /dev/null
+++ b/cards/meson.build
@@ -0,0 +1,84 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+# Cards
+
+xmllint_flags = [
+ '--nonet',
+ '--noblanks',
+]
+
+gzip_flags = [
+ '-9',
+ '-n',
+]
+
+cards_sources = [
+ 'anglo.svg',
+ 'anglo_bitmap.svg',
+ 'bellot.svg',
+ 'bonded.svg',
+ 'dondorf.svg',
+ 'gnomangelo.svg',
+ 'gnomangelo_bitmap.svg',
+ 'guyenne-classic.svg',
+ 'ornamental.svg',
+ 'paris.svg',
+ 'swiss-xvii.svg',
+ 'tango.svg',
+]
+
+cardsdir = ar_pkgdatadir / 'cards'
+
+# FIXME: this should use files('...') (allowed as per docs),
+# but that crashes meson, see https://gitlab.gnome.org/chpe/meson/issues/2
+compress_svg = find_program('meson_svgz.sh')
+
+cards_svgz = []
+foreach svg : cards_sources
+ svgz = svg.split('.')[0] + '.svgz'
+ cards_svgz += custom_target(
+ svgz,
+ command: [
+ compress_svg,
+ xmllint,
+ ' '.join(xmllint_flags),
+ gzip,
+ ' '.join(gzip_flags),
+ '@INPUT@',
+ '@OUTPUT@'
+ ],
+ input: svg,
+ install: true,
+ install_dir: cardsdir,
+ output: svgz,
+ )
+endforeach
+
+# SVGcrush
+
+libxml_dep = dependency('libxml-2.0')
+
+svgcrush_sources = files(
+ 'svgcrush.c',
+)
+
+svgcrush = executable(
+ 'svgcrush',
+ svgcrush_sources,
+ dependencies: [glib_dep, libxml_dep,],
+ include_directories: [top_inc,],
+ install: false,
+)
diff --git a/cards/meson_svgz.sh b/cards/meson_svgz.sh
new file mode 100755
index 0000000000000000000000000000000000000000..20f0de96e16c926242c3c46611d3c76dbcd552db
--- /dev/null
+++ b/cards/meson_svgz.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/bash
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+# Really sucks that meson has no simple way to just chain a few commands
+# together in a pipe to produce an output file.
+
+set -e
+
+xmllint="$1"
+xmllint_flags="$2"
+gzip="$3"
+gzip_flags="$4"
+infile="$5"
+outfile="$6"
+
+cat "${infile}" | "${xmllint}" ${xmllint_flags} - | "${gzip}" ${gzip_flags} > "${outfile}"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 484b815dedb7b8071630e7dd15eb3116f3a988ed..0000000000000000000000000000000000000000
--- a/configure.ac
+++ /dev/null
@@ -1,609 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.53])
-AC_INIT([AisleRiot], [3.22.10],
- [http://bugzilla.gnome.org/enter_bug.cgi?product=aisleriot],
- [aisleriot])
-
-# Must run under bash; see bug 726780
-if test -z "$BASH_VERSION"; then
- AC_MSG_ERROR([Set CONFIG_SHELL to bash and try again.])
-fi
-
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR([src/sol.c])
-AC_CONFIG_HEADERS([config.h])
-
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 foreign -Wno-portability])
-
-m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-
-if test -z "$enable_maintainer_mode"; then
- enable_maintainer_mode=yes
-fi
-AM_MAINTAINER_MODE([enable])
-
-# *****************************************************************************
-
-GNOME_DEBUG_CHECK
-
-PKG_PROG_PKG_CONFIG([0.15])
-PKGS=
-
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXX
-AC_PROG_LN_S
-AC_PROG_MKDIR_P
-AC_PROG_SED
-AM_PROG_CC_C_O
-
-LT_PREREQ([2.2])
-LT_INIT
-LT_LANG([C])
-LT_LANG([C++])
-
-# ************
-# Dependencies
-# ************
-
-# Check which platform to use
-
-AC_MSG_CHECKING([for which platform to build])
-AC_ARG_WITH([platform],
- [AS_HELP_STRING([--with-platform=gnome|gtk-only (default: gnome)])],
- [case "$withval" in
- gnome|gtk-only) ;;
- *) AC_MSG_ERROR([invalid argument "$withval" for --with-platform]) ;;
- esac],
- [with_platform=gnome])
-AC_MSG_RESULT([$with_platform])
-
-AM_CONDITIONAL([HAVE_GNOME],[test "$with_platform" = "gnome"])
-
-if test "$with_platform" = "gnome"; then
- AC_DEFINE([HAVE_GNOME],[1],[Define if GNOME support is enabled])
-fi
-
-# Check which gtk+ major version to use
-
-AC_MSG_CHECKING([which gtk+ version to compile against])
-AC_ARG_WITH([gtk],
- [AS_HELP_STRING([--with-gtk=3.0],[which gtk+ version to compile against (default: 3.0)])],
- [case "$with_gtk" in
- 3.0) ;;
- [0-9].0) AC_MSG_ERROR([unsupported gtk version $with_gtk specified]) ;;
- *) AC_MSG_ERROR([invalid gtk version specified]) ;;
- esac],
- [with_gtk=3.0])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
- 3.0) GTK_API_VERSION=3.0
- GTK_API_MAJOR_VERSION=3
- ;;
-esac
-
-AC_SUBST([GTK_API_VERSION])
-AC_SUBST([GTK_API_MAJOR_VERSION])
-
-# **************
-# Win32 platform
-# **************
-
-AC_CANONICAL_HOST
-
-AC_MSG_CHECKING([for some Win32 platform])
-case "$host" in
- *-*-cygwin*|*-*-mingw*)
- platform_win32=yes
- ;;
- *)
- platform_win32=no
- ;;
-esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL([PLATFORM_WIN32],[test "$platform_win32" = "yes"])
-
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
- *-*-mingw*)
- os_win32=yes
- ;;
- *)
- os_win32=no
- ;;
-esac
-AC_MSG_RESULT([$os_win32])
-AM_CONDITIONAL([PLATFORM_WIN32_NATIVE],[test "$os_win32" = "yes"])
-
-# ******************
-# Card theme formats
-# ******************
-
-AC_MSG_CHECKING([for requested card theme formats])
-AC_ARG_WITH([card-theme-formats],
- [AS_HELP_STRING([--with-card-theme-formats],[which card theme formats to support (svg,fixed,kde,pysol|default|all)])],
- [],[with_card_theme_formats=default])
-
-case "$with_card_theme_formats" in
- default) with_card_theme_formats="svg,pysol" ;;
- all) with_card_theme_formats="svg,kde,fixed,native,pysol" ;;
-esac
-
-enable_card_theme_format_svg=no
-enable_card_theme_format_kde=no
-enable_card_theme_format_fixed=no
-enable_card_theme_format_native=no
-enable_card_theme_format_pysol=no
-need_svg=no
-need_rsvg=no
-need_qtsvg=no
-
-IFS="${IFS= }"; gg_saved_ifs="$IFS"; IFS=","
-for format in $with_card_theme_formats; do
- case "$format" in
- svg) enable_card_theme_format_svg=yes ;;
- kde) enable_card_theme_format_kde=yes ;;
- fixed) enable_card_theme_format_fixed=yes ;;
- native) enable_card_theme_format_native=yes ;;
- pysol) enable_card_theme_format_pysol=yes ;;
- *) IFS="$gg_saved_ifs" AC_MSG_ERROR([unknown card theme format $format requested]) ;;
- esac
-done
-IFS="$gg_saved_ifs"
-
-AC_MSG_RESULT([$with_card_theme_formats])
-
-if test "$enable_card_theme_format_svg" = "yes"; then
- AC_DEFINE([ENABLE_CARD_THEME_FORMAT_SVG],[1],[Define to enable SVG card theme format support])
- need_svg=yes
- need_rsvg=yes
-fi
-if test "$enable_card_theme_format_kde" = "yes"; then
- AC_DEFINE([ENABLE_CARD_THEME_FORMAT_KDE],[1],[Define to enable KDE card theme format support])
- need_svg=yes
- need_qtsvg=yes
-fi
-if test "$enable_card_theme_format_fixed" = "yes"; then
- AC_DEFINE([ENABLE_CARD_THEME_FORMAT_FIXED],[1],[Define to enable prerendered card theme format support])
-fi
-if test "$enable_card_theme_format_native" = "yes"; then
- AC_DEFINE([ENABLE_CARD_THEME_FORMAT_NATIVE],[1],[Define to enable native SVG rendering with QtSvg])
- need_svg=yes
- need_qtsvg=yes
-fi
-if test "$enable_card_theme_format_pysol" = "yes"; then
- AC_DEFINE([ENABLE_CARD_THEME_FORMAT_PYSOL],[1],[Define to enable PySol card theme format support])
-fi
-
-AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_SVG],[test "$enable_card_theme_format_svg" = "yes"])
-AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_KDE],[test "$enable_card_theme_format_kde" = "yes"])
-AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_FIXED],[test "$enable_card_theme_format_fixed" = "yes"])
-AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_NATIVE],[test "$enable_card_theme_format_native" = "yes"])
-AM_CONDITIONAL([ENABLE_CARD_THEME_FORMAT_PYSOL],[test "$enable_card_theme_format_pysol" = "yes"])
-
-# Card theme paths
-
-AC_MSG_CHECKING([distribution])
-if test -f /etc/os-release; then
- DISTRO="$(source /etc/os-release && echo $ID)"
-else
- DISTRO="unknown"
-fi
-AC_MSG_RESULT([$DISTRO])
-
-if test "$enable_card_theme_format_kde" = "yes"; then
- AC_MSG_CHECKING([for KDE card themes base path])
- AC_ARG_WITH([kde-card-theme-path],
- [AS_HELP_STRING([--with-kde-card-theme-path],[The base path to the KDE card themes])],
- [],[case "$DISTRO" in
- debian|opensuse|ubuntu) with_kde_card_theme_path="/usr/share/kde4/apps/carddecks" ;;
- fedora|rhel|centos) with_kde_card_theme_path="/usr/share/carddecks" ;;
- *) AC_MSG_ERROR([When enabling the KDE card theme format, you must specify the KDE card themes base path.]) ;;
- esac])
- AC_MSG_RESULT([$with_kde_card_theme_path])
-
- AC_DEFINE_UNQUOTED([KDE_CARD_THEME_PATH],["$with_kde_card_theme_path"],[The base path to the KDE card themes])
-fi
-
-if test "$enable_card_theme_format_pysol" = "yes"; then
- AC_MSG_CHECKING([for PySol card themes base path])
- AC_ARG_WITH([pysol-card-theme-path],
- [AS_HELP_STRING([--with-pysol-card-theme-path],[The base path to the PySol card themes])],
- [],[case "$DISTRO" in
- debian|ubuntu) with_pysol_card_theme_path="/usr/share/games/pysol" ;;
- fedora|rhel|centos) with_pysol_card_theme_path="/usr/share/PySolFC" ;;
- opensuse) with_pysol_card_theme_path="/usr/share/games/pysol/data" ;;
- *) AC_MSG_ERROR([When enabling the PySol card theme format, you must specify the PySol card themes base path.]) ;;
- esac])
- AC_MSG_RESULT([$with_pysol_card_theme_path])
-
- AC_DEFINE_UNQUOTED([PYSOL_CARD_THEME_PATH],["$with_pysol_card_theme_path"],[The base path to the PySol card themes])
-fi
-
-# Default card theme
-
-AC_MSG_CHECKING([which card theme to use by default])
-AC_ARG_WITH([default-card-theme],
- [AS_HELP_STRING([--with-default-card-theme=NAME],[Which card theme to use by default (default: gnomangelo_bitmap.svgz)])],
- [],[with_default_card_theme="gnomangelo_bitmap.svgz"])
-AC_MSG_RESULT([$with_default_card_theme])
-
-AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT],["$with_default_card_theme"],[The default card theme])
-
-AC_MSG_CHECKING([which card theme format to use by default])
-AC_ARG_WITH([default-card-theme-format],
- [AS_HELP_STRING([--with-default-card-theme-format=NAME],[Which card theme format to use by default (default: platform dependent)])],
- [],[with_default_card_theme_format=svg])
-AC_MSG_RESULT([$with_default_card_theme_format])
-
-case "$with_default_card_theme_format" in
- svg|kde|fixed|native|pysol) ;;
- *) AC_MSG_ERROR([card theme format $with_default_card_theme_format unknown])
-esac
-
-AC_DEFINE_UNQUOTED([AR_CARD_THEME_DEFAULT_FORMAT_STRING],["$with_default_card_theme_format"],[The default card theme format type string])
-
-# ******************
-# Extra Debugging UI
-# ******************
-
-AC_MSG_CHECKING([whether extra debugging UI in Aisleriot is requested])
-AC_ARG_ENABLE([debug-ui],
- [AS_HELP_STRING([--enable-debug-ui],[Enable extra debugging UI in Aisleriot (default: disabled)])],
- [],[enable_debug_ui=no])
-AC_MSG_RESULT([$enable_debug_ui])
-
-if test "$enable_debug_ui" = "yes"; then
- AC_DEFINE([ENABLE_DEBUG_UI],[1],[Define extra debugging UI in Aisleriot is enabled])
-fi
-
-AM_CONDITIONAL([ENABLE_DEBUG_UI],[test "$enable_debug_ui" = "yes"])
-
-# ********************
-# Checks for libraries
-# ********************
-
-case "$with_gtk" in
- 3.0) GTK_REQUIRED=3.18.0
- RSVG_REQUIRED=2.32.0
- LIBCANBERRA_GTK_REQUIRED=0.26
- LIBCANBERRA_GTK_PKGS="libcanberra-gtk3 >= $LIBCANBERRA_GTK_REQUIRED"
- ;;
-esac
-
-GCONF_REQUIRED=2.0
-GLIB_REQUIRED=2.32.0
-GIO_REQUIRED=2.32.0
-
-# Check for common modules
-
-PKGS="$PKGS gtk+-$GTK_API_VERSION >= $GTK_REQUIRED"
-
-# *****
-# Sound
-# *****
-
-AC_MSG_CHECKING([whether to enable sound support])
-AC_ARG_ENABLE([sound],
- [AS_HELP_STRING([--enable-sound],[Enable sound using libcanberra])],
- [],[enable_sound=yes])
-AC_MSG_RESULT([$enable_sound])
-
-if test "$enable_sound" = "yes"; then
- PKGS="$PKGS $LIBCANBERRA_GTK_PKGS"
-
- AC_DEFINE([ENABLE_SOUND],[1],[Define if sound support is enabled])
-fi
-
-AM_CONDITIONAL([ENABLE_SOUND],[test "$enable_sound" = "yes"])
-
-# *********
-# GSettings
-# *********
-
-GLIB_GSETTINGS
-
-# Check for GNOME modules
-
-m4_ifdef([AM_GCONF_SOURCE_2],
- [AM_GCONF_SOURCE_2
- AC_PATH_PROG([GCONFTOOL],[gconftool-2])
- ],
- [AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL],[false])
- with_platform=gtk-only]
-)
-
-if test "$with_platform" = "gnome"; then
- PKGS="$PKGS gconf-2.0 >= $GCONF_REQUIRED"
-fi
-
-# Check for librsvg
-
-have_rsvg=no
-if test "$need_rsvg" = "yes"; then
- CAIRO_REQUIRED=1.10.0
-
- PKG_CHECK_EXISTS([librsvg-2.0 >= $RSVG_REQUIRED],[have_rsvg=yes],[have_rsvg=no])
-
- PKGS="$PKGS librsvg-2.0 >= $RSVG_REQUIRED cairo >= $CAIRO_REQUIRED"
-
- AC_DEFINE([HAVE_RSVG],[1],[Refine if librsvg is available])
-fi
-
-AM_CONDITIONAL([HAVE_RSVG],[test "$have_rsvg" = "yes"])
-
-# Check for QtSvg
-
-have_qtsvg=no
-if test "$need_qtsvg" = "yes"; then
- QT_SVG_REQUIRED=5.0.0
-
- PKG_CHECK_EXISTS([Qt5Svg >= $QT_SVG_REQUIRED],[have_qtsvg=yes],[have_qtsvg=no])
-
- PKGS="$PKGS Qt5Svg >= $QT_SVG_REQUIRED"
- EXTRA_CXX_LIBS="$EXTRA_CXX_LIBS -lstdc++"
-
- AC_DEFINE([HAVE_QTSVG],[1],[Refine if QtSvg is available])
-fi
-
-AM_CONDITIONAL([HAVE_QTSVG],[test "$have_qtsvg" = "yes"])
-
-if test "$need_svg" = "yes" -a "$have_rsvg" = "no" -a "$have_qtsvg" = "no"; then
- AC_MSG_ERROR([One of librsvg or Qt5Svg are required])
-fi
-
-# *****************
-# Extra build tools
-# *****************
-
-AC_ARG_VAR([GLIB_GENMARSHAL],[the glib-genmarshal programme])
-if test -z "$GLIB_GENMARSHAL"; then
- AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal],[])
- if test -z "$GLIB_GENMARSHAL"; then
- AC_MSG_ERROR([glib-genmarshal not found])
- fi
-fi
-
-AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[the glib-compile-resources programme])
-if test -z "$GLIB_COMPILE_RESOURCES"; then
- AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[])
- if test -z "$GLIB_COMPILE_RESOURCES"; then
- AC_MSG_ERROR([glib-compile-resources not found])
- fi
-fi
-
-AC_ARG_VAR([GZIP],[the gzip programme])
-if test -z "$GZIP"; then
- AC_PATH_PROG([GZIP],[gzip],[])
- if test -z "$GZIP"; then
- AC_MSG_ERROR([gzip not found])
- fi
-fi
-
-AC_ARG_VAR([XMLLINT],[the xmllint programme])
-if test -z "$XMLLINT"; then
- AC_PATH_PROG([XMLLINT],[xmllint],[])
- if test -z "$XMLLINT"; then
- AC_MSG_ERROR([xmllint not found])
- fi
-fi
-
-AC_ARG_VAR([DESKTOP_FILE_VALIDATE],[the desktop-file-validate programme])
-if test -z "$DESKTOP_FILE_VALIDATE"; then
- AC_PATH_PROG([DESKTOP_FILE_VALIDATE],[desktop-file-validate],[])
- if test -z "$DESKTOP_FILE_VALIDATE"; then
- AC_MSG_ERROR([desktop-file-validate not found])
- fi
-fi
-
-if test "$platform_win32" = "yes" -a "$os_win32" = "yes"; then
- AC_CHECK_TOOL([WINDRES],[windres],[no])
- if test "$WINDRES" = "no"; then
- AC_MSG_ERROR([windres is required for native win32])
- fi
-fi
-
-# ********
-# Binreloc
-# ********
-
-AC_MSG_CHECKING([whether to enable binary relocation support])
-AC_ARG_ENABLE([binreloc],
- [AS_HELP_STRING([--enable-binreloc],[enable binary relocation support (default: disabled)])],
- [],
- [enable_binreloc="$platform_win32"])
-AC_MSG_RESULT([$enable_binreloc])
-
-if test "$enable_binreloc" = "yes"; then
-
- # Check that all variables use the same prefix
- # Note: datarootdir exists only since autoconf 2.60, so we have to
- # check for the old and the new form of datadir.
- if test "$exec_prefix" != '${prefix}' -o \
- "$bindir" != '${exec_prefix}/bin' -o \
- "$sbindir" != '${exec_prefix}/sbin' -o \
- "$libdir" != '${exec_prefix}/lib' -o \
- "$libexecdir" != '${exec_prefix}/libexec' -o \
- "$sysconfdir" != '${prefix}/etc' -o \
- "$localstatedir" != '${prefix}/var' -o \
- \( -n "$datarootdir" -a "$datarootdir" != '${prefix}/share' \) -o \
- \( "$datadir" != '${datarootdir}' -a "$datadir" != '${prefix}/share' \) -o \
- \( "$localedir" != '${datarootdir}/locale' -a "$localedir" != '${datadir}/locale' \) -o \
- \( "$mandir" != '${datarootdir}/man' -a "$mandir" != '${datadir}/man' \); then
- AC_MSG_ERROR([cannot use binary relocation with different prefixes])
- fi
-
- AC_DEFINE([ENABLE_BINRELOC],[1],[Define for binary relocation support])
-fi
-
-# ***********
-# Compilation
-# ***********
-
-save_CFLAGS="$CFLAGS"
-CFLAGS=
-CC_CHECK_CFLAGS_APPEND([ \
- -Wall -Wextra \
- -Wformat-nonliteral -Werror=format-security \
- -Wsign-compare -Werror=implicit-function-declaration \
- -Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
- -Waggregate-return -Wcast-align -Wimplicit -Wuninitialized \
- -Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
- -Wpacked -Wmissing-format-attribute -Wshadow -Wlogical-op \
- -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
- -Wdeclaration-after-statement -Wold-style-definition \
- -Wno-missing-field-initializers -Wno-unused-parameter \
- -Wempty-body -Wformat-signedness \
- -fno-common -fno-strict-aliasing -Wno-switch-enum])
-AM_CFLAGS="$AM_CFLAGS $CFLAGS"
-CFLAGS="$save_CFLAGS"
-
-# ****
-# i18n
-# ****
-
-GETTEXT_PACKAGE=aisleriot
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext package name])
-AM_GLIB_GNU_GETTEXT
-
-IT_PROG_INTLTOOL([0.35.0])
-
-# *****
-# Guile
-# *****
-
-guile_versions_all="2.2 2.0"
-AC_MSG_CHECKING([which guile version to use])
-AC_ARG_WITH([guile],
- [AS_HELP_STRING([--with-guile=2.2|2.0|auto],[Which guile version to use (default: auto)])],
- [case "$with_guile" in
- 1.8) AC_MSG_ERROR([unsupported guile version $with_guile requested]) ;;
- 2.0|2.2) guile_versions="$withval" ;;
- auto) guile_versions="$guile_versions_all" ;;
- *) AC_MSG_ERROR([unsupported guile version $with_guile requested]) ;;
- esac],
- [guile_versions="$guile_versions_all" with_guile=auto])
-AC_MSG_RESULT([$with_guile])
-
-GUILE_PKG([$guile_versions])
-# not using GUILE_FLAGS due to config.rpath issue
-PKGS="$PKGS guile-$GUILE_EFFECTIVE_VERSION"
-
-GUILE_PROGS
-
-# ************
-# Dependencies
-# ************
-
-PKG_CHECK_MODULES([AISLERIOT],[$PKGS])
-AC_SUBST([AISLERIOT_CFLAGS])
-AC_SUBST([AISLERIOT_LIBS])
-
-# *************
-# Documentation
-# *************
-
-# We support various ways to present help to the user:
-# ghelp: using the ghelp: protocol, most likely displaying in Yelp
-# file: showing html or xhtml files in the web browser
-# library: in the web browser loaded remotedly from library.gnome.org
-#
-# Note that for help using [x]html files, we can't use gnome-doc-utils.make
-# since it doesn't currently support this. The packager will have to use
-# gnome-doc-tool directly to build the documentation in the right format.
-# The help files must be installed in $(pkgdatadir)/$(DOC_MODULE)/$(LOCALE) .
-
-AC_MSG_CHECKING([which help method to use])
-AC_ARG_WITH([help-method],
- [AS_HELP_STRING([--with-help-method],[which help method to use (ghelp|file|library; default: ghelp)])],
- [],
- [if test "$platform_win32" = "yes"; then
- with_help_method=file
- else
- with_help_method=ghelp
- fi])
-AC_MSG_RESULT([$with_help_method])
-
-case "$with_help_method" in
- ghelp) AC_DEFINE([WITH_HELP_METHOD_GHELP],[1],[Define to use help using ghelp]) ;;
- file) AC_DEFINE([WITH_HELP_METHOD_FILE],[1],[Define to use help using file]) ;;
- library) AC_DEFINE([WITH_HELP_METHOD_LIBRARY],[1],[Define to use help using library.gnome.org]) ;;
- *) AC_MSG_ERROR([unknown help method "$with_help_method"]) ;;
-esac
-
-if test "$with_help_method" = "file"; then
- AC_MSG_CHECKING([for help file format])
- AC_ARG_WITH([help-file-format],
- [AS_HELP_STRING([--with-help-file-format],[which file format to use for help (html|xhtml; default: html)])],
- [case "$with_help_file_format" in
- html|xhtml) ;;
- *) AC_MSG_ERROR([unknown help file format "$with_help_file_format"]) ;;
- esac],
- [with_help_file_format=html])
- AC_MSG_RESULT([$with_help_file_format])
-
- AC_DEFINE_UNQUOTED([HELP_FILE_FORMAT],["$with_help_file_format"],[The help file format])
-fi
-
-YELP_HELP_INIT([no-lc-media-links no-lc-dist])
-
-AM_CONDITIONAL([BUILD_HELP],[test "$with_help_method" = "ghelp"])
-
-# ********
-# Valgrind
-# ********
-
-AC_ARG_WITH([valgrind-dir],
- [AC_HELP_STRING([--with-valgrind-dir=PATH],[directory to install Valgrind suppressions to])],
- [],[with_valgrind_dir='${libdir}/valgrind'])
-AC_SUBST([valgrinddir],[$with_valgrind_dir])
-
-##############################################
-
-AC_SUBST([AM_CPPFLAGS])
-AC_SUBST([AM_CFLAGS])
-AC_SUBST([AM_CXXFLAGS])
-AC_SUBST([AM_LDFLAGS])
-AC_SUBST([EXTRA_CXX_LIBS])
-
-##############################################
-##############################################
-
-AC_CONFIG_FILES([
-Makefile
-cards/Makefile
-data/Makefile
-data/icons/Makefile
-data/sounds/Makefile
-data/sol.desktop.in
-games/Makefile
-help/Makefile
-po/Makefile.in
-src/Makefile
-src/lib/Makefile
-src/aisleriot.gresource.xml
-])
-AC_OUTPUT
-
-echo "
-Configuration:
-
- Source code location: ${srcdir}
- Compiler: ${CC}
-
- Guile version: ${GUILE_EFFECTIVE_VERSION}
- GTK+ API version: ${GTK_API_VERSION}
- Platform: ${with_platform}
- Help method: ${with_help_method} ${with_help_file_format}
- Using RSVG: ${have_rsvg}
- Using QtSvg: ${have_qtsvg}
- Card theme formats: ${with_card_theme_formats}
- Default theme format: ${with_default_card_theme_format}
- Default theme: ${with_default_card_theme}
- Sound support: ${with_sound}
- Binreloc: ${enable_binreloc}
-"
diff --git a/data/Makefile.am b/data/Makefile.am
deleted file mode 100644
index e342337baa483185ea1654ef99172a81ca210cc0..0000000000000000000000000000000000000000
--- a/data/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-NULL =
-
-SUBDIRS = icons
-
-if ENABLE_SOUND
-SUBDIRS += sounds
-endif
-
-dist_noinst_DATA = \
- baize.png \
- baize.xcf \
- slot.svg \
- $(NULL)
-
-desktop_in_files = \
- sol.desktop.in.in \
- $(NULL)
-
-desktopdir = $(datadir)/applications
-nodist_desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
-
-appdatadir = $(datadir)/metainfo
-appdata_in_files = sol.appdata.xml.in
-nodist_appdata_DATA = $(appdata_in_files:.xml.in=.xml)
-
-desktop-file-validate: $(nodist_desktop_DATA)
- for f in $^; do \
- $(DESKTOP_FILE_VALIDATE) $$f; \
- done
-
-
-check-local: desktop-file-validate
-
-dist_valgrind_DATA = \
- aisleriot.supp \
- $(NULL)
-
-EXTRA_DIST = \
- $(appdata_in_files) \
- $(NULL)
-
-CLEANFILES = \
- $(nodist_appdata_DATA) \
- $(nodist_desktop_DATA) \
- $(NULL)
-
-DISTCLEANFILES = \
- $(nodist_appdata_DATA) \
- $(nodist_desktop_DATA) \
- $(NULL)
-
-@INTLTOOL_DESKTOP_RULE@
-@INTLTOOL_XML_RULE@
-
--include $(top_srcdir)/git.mk
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
deleted file mode 100644
index 01f42e8683d294ef1a136ca642e5cd479472f63d..0000000000000000000000000000000000000000
--- a/data/icons/Makefile.am
+++ /dev/null
@@ -1,95 +0,0 @@
-NULL =
-
-public_icons_themes = hicolor
-
-dist_noinst_DATA = \
- hicolor_apps_16x16_gnome-aisleriot.png \
- hicolor_apps_22x22_gnome-aisleriot.png \
- hicolor_apps_24x24_gnome-aisleriot.png \
- hicolor_apps_32x32_gnome-aisleriot.png \
- hicolor_apps_48x48_gnome-aisleriot.png \
- hicolor_apps_256x256_gnome-aisleriot.png \
- hicolor_apps_16x16_gnome-freecell.png \
- hicolor_apps_22x22_gnome-freecell.png \
- hicolor_apps_24x24_gnome-freecell.png \
- hicolor_apps_32x32_gnome-freecell.png \
- hicolor_apps_48x48_gnome-freecell.png \
- hicolor_apps_256x256_gnome-freecell.png \
- hicolor_apps_symbolic_gnome-aisleriot-symbolic.svg \
- $(NULL)
-
-private_icons = \
- hicolor_actions_16x16_cards-deal.png \
- hicolor_actions_22x22_cards-deal.png \
- hicolor_actions_24x24_cards-deal.png \
- hicolor_actions_32x32_cards-deal.png \
- hicolor_actions_48x48_cards-deal.png \
- hicolor_actions_scalable_cards-deal.svg \
- $(NULL)
-
-EXTRA_DIST = \
- gnome-aisleriot.svg \
- hicolor_apps_scalable_gnome-freecell.svg \
- $(private_icons) \
- $(NULL)
-
-install-public-icons:
- for icon in $(dist_noinst_DATA); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- $(MKDIR_P) $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
- $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-install-private-icons:
- for icon in $(private_icons); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
- $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-uninstall-public-icons:
- -for icon in $(dist_noinst_DATA); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-uninstall-private-icons:
- for icon in $(private_icons); do \
- THEME=`echo $$icon | cut -d_ -f1`; \
- CONTEXT=`echo $$icon | cut -d_ -f2`; \
- SIZE=`echo $$icon | cut -d_ -f3`; \
- ICONFILE=`echo $$icon | cut -d_ -f4`; \
- rm -f $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
- done
-
-install-data-local: install-public-icons install-private-icons
-uninstall-local: uninstall-public-icons uninstall-private-icons
-
-install-data-hook: update-icon-cache
-uninstall-hook: update-icon-cache
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t
-
-update-icon-cache:
- @-if test -z "$(DESTDIR)"; then \
- echo "Updating Gtk icon cache."; \
- for theme in $(public_icons_themes); do \
- $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
- done; \
- else \
- echo "*** Icon cache not updated. After (un)install, run this:"; \
- for theme in $(public_icons_themes); do \
- echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
- done; \
- fi
-
--include $(top_srcdir)/git.mk
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..72e09f76b7b7d778e98e6e974eaa3e54b6c38471
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,78 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+public_icons_themes = [
+ 'hicolor',
+]
+
+public_icons_sources = [
+ 'hicolor_apps_16x16_gnome-aisleriot.png',
+ 'hicolor_apps_16x16_gnome-freecell.png',
+ 'hicolor_apps_22x22_gnome-aisleriot.png',
+ 'hicolor_apps_22x22_gnome-freecell.png',
+ 'hicolor_apps_24x24_gnome-aisleriot.png',
+ 'hicolor_apps_24x24_gnome-freecell.png',
+ 'hicolor_apps_256x256_gnome-aisleriot.png',
+ 'hicolor_apps_256x256_gnome-freecell.png',
+ 'hicolor_apps_32x32_gnome-aisleriot.png',
+ 'hicolor_apps_32x32_gnome-freecell.png',
+ 'hicolor_apps_48x48_gnome-aisleriot.png',
+ 'hicolor_apps_48x48_gnome-freecell.png',
+ 'hicolor_apps_symbolic_gnome-aisleriot-symbolic.svg',
+]
+
+private_icons_sources = [
+ 'hicolor_actions_16x16_cards-deal.png',
+ 'hicolor_actions_22x22_cards-deal.png',
+ 'hicolor_actions_24x24_cards-deal.png',
+ 'hicolor_actions_32x32_cards-deal.png',
+ 'hicolor_actions_48x48_cards-deal.png',
+ 'hicolor_actions_scalable_cards-deal.svg',
+]
+
+public_icons_renames = []
+private_icons_renames = []
+
+foreach icon : public_icons_sources
+ components = icon.split('_')
+ public_icons_renames += components[0] / components[2] / components[1] / components[3]
+endforeach
+
+foreach icon : private_icons_sources
+ components = icon.split('_')
+ private_icons_renames += components[0] / components[2] / components[1] / components[3]
+endforeach
+
+icondir = ar_datadir / 'icons'
+pkgicondir = ar_pkgdatadir / 'icons'
+
+install_data(
+ sources: public_icons_sources,
+ rename: public_icons_renames,
+ install_dir: icondir,
+)
+
+install_data(
+ sources: private_icons_sources,
+ rename: private_icons_renames,
+ install_dir: pkgicondir,
+)
+
+foreach theme : public_icons_themes
+ meson.add_install_script(
+ 'meson_updateiconcache.py',
+ icondir / theme,
+ )
+endforeach
diff --git a/data/icons/meson_updateiconcache.py b/data/icons/meson_updateiconcache.py
new file mode 100755
index 0000000000000000000000000000000000000000..b625d073e13a32dadef300578317a335102f72a9
--- /dev/null
+++ b/data/icons/meson_updateiconcache.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+import os
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ sys.exit(0)
+
+prefix = os.environ['MESON_INSTALL_PREFIX']
+icondir = os.path.join(prefix, sys.argv[1])
+
+rv = subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+sys.exit(0)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..9f88c2f3a3f0dd3cac4155aa775a9830e4a6b077
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,69 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+# Appstream data
+
+metainfodir = ar_prefix / ar_datadir / 'metainfo'
+
+i18n.merge_file(
+ 'sol.metainfo.xml',
+ input: 'sol.metainfo.xml.in',
+ output: '@BASENAME@',
+ po_dir: po_dir,
+ install: true,
+ install_dir: metainfodir,
+)
+
+# Desktop file
+
+desktopdatadir = ar_prefix / ar_datadir / 'applications'
+
+desktop_in = files(
+ 'sol.desktop.in',
+)
+
+i18n.merge_file(
+ 'sol.desktop',
+ input: desktop_in,
+ output: '@BASENAME@',
+ type: 'desktop',
+ po_dir: po_dir,
+ install: true,
+ install_dir: desktopdatadir,
+)
+
+meson.add_install_script(
+ 'meson_desktopfile.py',
+ desktopdatadir,
+ 'sol.desktop',
+)
+
+# Valgrind suppressions
+
+valgrinddir = ar_prefix / ar_libdir / 'valgrind'
+
+valgrind_data = [
+ 'aisleriot.supp',
+]
+
+install_data(
+ sources: valgrind_data,
+ install_dir: valgrinddir,
+)
+
+# Subdirs
+
+subdir('icons')
+subdir('sounds')
diff --git a/data/meson_desktopfile.py b/data/meson_desktopfile.py
new file mode 100755
index 0000000000000000000000000000000000000000..ced926f1230947737677addded1acfb4ac94f2cb
--- /dev/null
+++ b/data/meson_desktopfile.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+import os
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ sys.exit(0)
+
+prefix = os.environ['MESON_INSTALL_PREFIX']
+desktopfile = os.path.join(prefix, sys.argv[1], sys.argv[2])
+
+rv = subprocess.call(['desktop-file-validate', desktopfile])
+sys.exit(rv)
diff --git a/data/sol.desktop.in b/data/sol.desktop.in
new file mode 100644
index 0000000000000000000000000000000000000000..4956acd029822c2f6fc06e24bd3807e879447e47
--- /dev/null
+++ b/data/sol.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=AisleRiot Solitaire
+Comment=Play many different solitaire games
+Exec=sol
+Icon=gnome-aisleriot
+Terminal=false
+Type=Application
+Categories=GNOME;GTK;Game;CardGame;
+Keywords=solitaire;cards;klondike;spider;freecell;patience;
+StartupNotify=true
diff --git a/data/sol.desktop.in.in b/data/sol.desktop.in.in
deleted file mode 100644
index 0f676b2896ca54e11c0723a178281f639adfd827..0000000000000000000000000000000000000000
--- a/data/sol.desktop.in.in
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-_Name=AisleRiot Solitaire
-_Comment=Play many different solitaire games
-Exec=sol
-Icon=gnome-aisleriot
-Terminal=false
-Type=Application
-Categories=GNOME;GTK;Game;CardGame;
-_Keywords=solitaire;cards;klondike;spider;freecell;patience;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=aisleriot
-X-GNOME-Bugzilla-Component=Zwischenlager
-X-GNOME-Bugzilla-Version=@VERSION@
-StartupNotify=true
diff --git a/data/sol.appdata.xml.in b/data/sol.metainfo.xml.in
similarity index 100%
rename from data/sol.appdata.xml.in
rename to data/sol.metainfo.xml.in
diff --git a/data/sounds/Makefile.am b/data/sounds/Makefile.am
deleted file mode 100644
index 5d32fe916fbe5396a8dec84814df1ce2a7289eec..0000000000000000000000000000000000000000
--- a/data/sounds/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-NULL =
-
-sounddir = $(pkgdatadir)/sounds
-
-sound_DATA = \
- click.ogg \
- slide.ogg \
- splat.ogg \
- victory.ogg \
- $(NULL)
-
-EXTRA_DIST = $(sound_DATA)
-
--include $(top_srcdir)/git.mk
diff --git a/data/sounds/meson.build b/data/sounds/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..29793a31c2ba01adf46ccce3384085fb8f78592b
--- /dev/null
+++ b/data/sounds/meson.build
@@ -0,0 +1,26 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+sounds_sources = [
+ 'click.ogg',
+ 'slide.ogg',
+ 'splat.ogg',
+ 'victory.ogg',
+]
+
+install_data(
+ sources: sounds_sources,
+ install_dir: ar_pkgdatadir / 'sounds',
+)
diff --git a/games/Makefile.am b/games/Makefile.am
deleted file mode 100644
index 04d895edc5945395f5f71b566d3b60749743702c..0000000000000000000000000000000000000000
--- a/games/Makefile.am
+++ /dev/null
@@ -1,126 +0,0 @@
-NULL =
-
-module_GUILE = \
- api.scm \
- $(NULL)
-
-games_GUILE = \
- accordion.scm \
- agnes.scm \
- athena.scm \
- auld-lang-syne.scm \
- aunt-mary.scm \
- backbone.scm \
- bakers-dozen.scm \
- bakers-game.scm \
- bear-river.scm \
- beleaguered-castle.scm \
- block-ten.scm \
- bristol.scm \
- camelot.scm \
- canfield.scm \
- carpet.scm \
- chessboard.scm \
- clock.scm \
- cover.scm \
- cruel.scm \
- diamond-mine.scm \
- doublets.scm \
- eagle-wing.scm \
- easthaven.scm \
- eight-off.scm \
- elevator.scm \
- eliminator.scm \
- escalator.scm \
- first-law.scm \
- fortress.scm \
- fortunes.scm \
- forty-thieves.scm \
- fourteen.scm \
- freecell.scm \
- gaps.scm \
- gay-gordons.scm \
- giant.scm \
- glenwood.scm \
- gold-mine.scm \
- golf.scm \
- gypsy.scm \
- hamilton.scm \
- helsinki.scm \
- hopscotch.scm \
- isabel.scm \
- jamestown.scm \
- jumbo.scm \
- kansas.scm \
- king-albert.scm \
- kings-audience.scm \
- klondike.scm \
- labyrinth.scm \
- lady-jane.scm \
- maze.scm \
- monte-carlo.scm \
- napoleons-tomb.scm \
- neighbor.scm \
- odessa.scm \
- osmosis.scm \
- peek.scm \
- pileon.scm \
- plait.scm \
- poker.scm \
- quatorze.scm \
- royal-east.scm \
- saratoga.scm \
- scorpion.scm \
- scuffle.scm \
- seahaven.scm \
- sir-tommy.scm \
- spider.scm \
- spider-three-decks.scm \
- spiderette.scm \
- straight-up.scm \
- streets-and-alleys.scm \
- ten-across.scm \
- terrace.scm \
- thieves.scm \
- thirteen.scm \
- thumb-and-pouch.scm \
- treize.scm \
- triple-peaks.scm \
- union-square.scm \
- valentine.scm \
- wall.scm \
- westhaven.scm \
- whitehead.scm \
- will-o-the-wisp.scm \
- yield.scm \
- yukon.scm \
- zebra.scm \
- $(NULL)
-
-pkglibguiledir = $(pkglibdir)/guile/$(GUILE_EFFECTIVE_VERSION)
-compiledmoduledir = $(pkglibguiledir)/aisleriot
-
-nodist_pkglibguile_DATA = $(games_GUILE:.scm=.go)
-nodist_compiledmodule_DATA = $(module_GUILE:.scm=.go)
-
-CLEANFILES = $(nodist_pkglibguile_DATA) $(nodist_compiledmodule_DATA)
-
-AM_V_GUILEC = $(AM_V_GUILEC_$(V))
-AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
-AM_V_GUILEC_0 = @echo " GUILEC" $@;
-
-GUILE_FLAGS =
-# GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
-
-%.go: %.scm
- $(AM_V_GUILEC) GUILE=$(GUILE) GUILE_FLAGS=$(GUILE_FLAGS) GUILE_AUTO_COMPILE=0 GUILE_LOAD_PATH=.:$(srcdir) GUILE_LOAD_COMPILED_PATH=. $(srcdir)/guile-compile compile $(GUILE_WARNINGS) -o "$@" "$<"
-
-EXTRA_DIST = \
- $(games_GUILE) \
- $(module_GUILE) \
- guile-compile \
- template.scm \
- Rules.HOWTO \
- $(NULL)
-
--include $(top_srcdir)/git.mk
diff --git a/games/guile-compile b/games/guile-compile
index 32dedfc86e9debfc0c661a64915382ba1d4075ba..1164f67052ae74aa921d48afd73cede364df9a0f 100755
--- a/games/guile-compile
+++ b/games/guile-compile
@@ -1,6 +1,17 @@
#!/bin/sh
# -*- scheme -*-
-exec $GUILE $GUILE_FLAGS -e '(@@ (guild) main)' -s "$0" "$@"
+this="$0"
+srcdir="$1"
+builddir="$2"
+GUILE="$3"
+
+shift 3
+
+export GUILE_AUTO_COMPILE=0
+export GUILE_LOAD_PATH=".:${srcdir}"
+export GUILE_LOAD_COMPILED_PATH=.
+
+exec ${GUILE:-/bin/false} -e '(@@ (guild) main)' -s "$this" "$@"
!#
;;;; guild --- running scripts bundled with Guile
diff --git a/games/meson.build b/games/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..afbd003e1eb4aca9c7751b773096629078b348e5
--- /dev/null
+++ b/games/meson.build
@@ -0,0 +1,165 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+games_sources = [
+ 'accordion.scm',
+ 'agnes.scm',
+ 'athena.scm',
+ 'auld-lang-syne.scm',
+ 'aunt-mary.scm',
+ 'backbone.scm',
+ 'bakers-dozen.scm',
+ 'bakers-game.scm',
+ 'bear-river.scm',
+ 'beleaguered-castle.scm',
+ 'block-ten.scm',
+ 'bristol.scm',
+ 'camelot.scm',
+ 'canfield.scm',
+ 'carpet.scm',
+ 'chessboard.scm',
+ 'clock.scm',
+ 'cover.scm',
+ 'cruel.scm',
+ 'diamond-mine.scm',
+ 'doublets.scm',
+ 'eagle-wing.scm',
+ 'easthaven.scm',
+ 'eight-off.scm',
+ 'elevator.scm',
+ 'eliminator.scm',
+ 'escalator.scm',
+ 'first-law.scm',
+ 'fortress.scm',
+ 'fortunes.scm',
+ 'forty-thieves.scm',
+ 'fourteen.scm',
+ 'freecell.scm',
+ 'gaps.scm',
+ 'gay-gordons.scm',
+ 'giant.scm',
+ 'glenwood.scm',
+ 'gold-mine.scm',
+ 'golf.scm',
+ 'gypsy.scm',
+ 'hamilton.scm',
+ 'helsinki.scm',
+ 'hopscotch.scm',
+ 'isabel.scm',
+ 'jamestown.scm',
+ 'jumbo.scm',
+ 'kansas.scm',
+ 'king-albert.scm',
+ 'kings-audience.scm',
+ 'klondike.scm',
+ 'labyrinth.scm',
+ 'lady-jane.scm',
+ 'maze.scm',
+ 'monte-carlo.scm',
+ 'napoleons-tomb.scm',
+ 'neighbor.scm',
+ 'odessa.scm',
+ 'osmosis.scm',
+ 'peek.scm',
+ 'pileon.scm',
+ 'plait.scm',
+ 'poker.scm',
+ 'quatorze.scm',
+ 'royal-east.scm',
+ 'saratoga.scm',
+ 'scorpion.scm',
+ 'scuffle.scm',
+ 'seahaven.scm',
+ 'sir-tommy.scm',
+ 'spider-three-decks.scm',
+ 'spider.scm',
+ 'spiderette.scm',
+ 'straight-up.scm',
+ 'streets-and-alleys.scm',
+ 'ten-across.scm',
+ 'terrace.scm',
+ 'thieves.scm',
+ 'thirteen.scm',
+ 'thumb-and-pouch.scm',
+ 'treize.scm',
+ 'triple-peaks.scm',
+ 'union-square.scm',
+ 'valentine.scm',
+ 'wall.scm',
+ 'westhaven.scm',
+ 'whitehead.scm',
+ 'will-o-the-wisp.scm',
+ 'yield.scm',
+ 'yukon.scm',
+ 'zebra.scm',
+]
+
+module_sources = [
+ 'api.scm',
+]
+
+guile_warnings = [
+ '-Warity-mismatch',
+ '-Wbad-case-datum',
+ '-Wduplicate-case-datum',
+ '-Wformat',
+ '-Wunbound-variable',
+ '-Wunsupported-warning',
+ '-Wunused-toplevel',
+ '-Wunused-variable',
+]
+
+# FIXME: this should use files('...') (allowed as per docs),
+# but that crashes meson, see https://gitlab.gnome.org/chpe/meson/issues/2
+guile_compile_prog = find_program('guile-compile')
+
+guile_compile = [
+ guile_compile_prog,
+ meson.current_source_dir(),
+ meson.current_build_dir(),
+ guile,
+ 'compile',
+ guile_warnings,
+ '-o',
+ '@OUTPUT@',
+ '@INPUT@',
+]
+
+games_objects = []
+modules_objects = []
+
+foreach src : games_sources
+ obj = src.split('.')[0] + '.go'
+ games_objects += custom_target(
+ obj,
+ command: guile_compile,
+ input: src,
+ install: true,
+ install_dir: ar_prefix / ar_pkgguiledir,
+ output: obj,
+)
+endforeach
+
+foreach src : module_sources
+ obj = src.split('.')[0] + '.go'
+ modules_objects += custom_target(
+ obj,
+ command: guile_compile,
+ input: src,
+ install: true,
+ install_dir: ar_prefix / ar_pkgguiledir / 'aisleriot',
+ output: obj,
+)
+endforeach
diff --git a/git.mk b/git.mk
deleted file mode 100644
index abd6c0a28ce8715fb0e228afabec01cc9fbfe77a..0000000000000000000000000000000000000000
--- a/git.mk
+++ /dev/null
@@ -1,200 +0,0 @@
-# git.mk
-#
-# Copyright 2009, Red Hat, Inc.
-# Written by Behdad Esfahbod
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.
-#
-# The canonical source for this file is pango/git.mk, or whereever the
-# header of pango/git.mk suggests in the future.
-#
-# To use in your project, import this file in your git repo's toplevel,
-# then do "make -f git.mk". This modifies all Makefile.am files in
-# your project to include git.mk.
-#
-# This enables automatic .gitignore generation. If you need to ignore
-# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
-# But think twice before doing that. If a file has to be in .gitignore,
-# chances are very high that it's a generated file and should be in one
-# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
-#
-# The only case that you need to manually add a file to GITIGNOREFILES is
-# when remove files in one of mostlyclean-local, clean-local, distclean-local,
-# or maintainer-clean-local.
-#
-# Note that for files like editor backup, etc, there are better places to
-# ignore them. See "man gitignore".
-#
-# If "make maintainer-clean" removes the files but they are not recognized
-# by this script (that is, if "git status" shows untracked files still), send
-# me the output of "git status" as well as your Makefile.am and Makefile for
-# the directories involved.
-#
-# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
-# pango/Makefile.am.
-#
-# Don't EXTRA_DIST this file. It is supposed to only live in git clones,
-# not tarballs. It serves no useful purpose in tarballs and clutters the
-# build dir.
-#
-# This file knows how to handle autoconf, automake, libtool, gtk-doc,
-# gnome-doc-utils, mallard, intltool, gsettings.
-#
-#
-# KNOWN ISSUES:
-#
-# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
-# submodule doesn't find us. If you have configure.{in,ac} files in
-# subdirs, add a proxy git.mk file in those dirs that simply does:
-# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste.
-# And add those files to git. See vte/gnome-pty-helper/git.mk for
-# example.
-#
-# ChangeLog
-#
-# - 2010-12-06 Add support for Mallard docs
-# - 2010-12-06 Start this change log
-
-git-all: git-mk-install
-
-git-mk-install:
- @echo Installing git makefile
- @any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
- if grep 'include .*/git.mk' $$x >/dev/null; then \
- echo $$x already includes git.mk; \
- else \
- failed=; \
- echo "Updating $$x"; \
- { cat $$x; \
- echo ''; \
- echo '-include $$(top_srcdir)/git.mk'; \
- } > $$x.tmp || failed=1; \
- if test x$$failed = x; then \
- mv $$x.tmp $$x || failed=1; \
- fi; \
- if test x$$failed = x; then : else \
- echo Failed updating $$x; >&2 \
- any_failed=1; \
- fi; \
- fi; done; test -z "$$any_failed"
-
-.PHONY: git-all git-mk-install
-
-
-### .gitignore generation
-
-$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
- $(AM_V_GEN) \
- { \
- if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
- for x in \
- $(DOC_MODULE)-decl-list.txt \
- $(DOC_MODULE)-decl.txt \
- tmpl/$(DOC_MODULE)-unused.sgml \
- "tmpl/*.bak" \
- xml html \
- ; do echo /$$x; done; \
- fi; \
- if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
- for x in \
- $(_DOC_C_DOCS) \
- $(_DOC_LC_DOCS) \
- $(_DOC_OMF_ALL) \
- $(_DOC_DSK_ALL) \
- $(_DOC_HTML_ALL) \
- $(_DOC_MOFILES) \
- $(_DOC_POFILES) \
- $(DOC_H_FILE) \
- "*/.xml2po.mo" \
- "*/*.omf.out" \
- ; do echo /$$x; done; \
- fi; \
- if test "x$(gsettings_SCHEMAS)" = x; then :; else \
- for x in \
- $(gsettings_SCHEMAS:.xml=.valid) \
- $(gsettings__enum_file) \
- ; do echo /$$x; done; \
- fi; \
- if test -f $(srcdir)/po/Makefile.in.in; then \
- for x in \
- po/Makefile.in.in \
- po/Makefile.in \
- po/Makefile \
- po/POTFILES \
- po/stamp-it \
- po/.intltool-merge-cache \
- "po/*.gmo" \
- "po/*.mo" \
- po/$(GETTEXT_PACKAGE).pot \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- ; do echo /$$x; done; \
- fi; \
- if test -f $(srcdir)/configure; then \
- for x in \
- autom4te.cache \
- configure \
- config.h \
- stamp-h1 \
- libtool \
- config.lt \
- ; do echo /$$x; done; \
- fi; \
- for x in \
- .gitignore \
- $(GITIGNOREFILES) \
- $(CLEANFILES) \
- $(PROGRAMS) \
- $(check_PROGRAMS) \
- $(EXTRA_PROGRAMS) \
- $(LTLIBRARIES) \
- so_locations \
- .libs _libs \
- $(MOSTLYCLEANFILES) \
- "*.$(OBJEXT)" \
- "*.lo" \
- $(DISTCLEANFILES) \
- $(am__CONFIG_DISTCLEAN_FILES) \
- $(CONFIG_CLEAN_FILES) \
- TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
- "*.tab.c" \
- $(MAINTAINERCLEANFILES) \
- $(BUILT_SOURCES) \
- $(DEPDIR) \
- Makefile \
- Makefile.in \
- "*.orig" \
- "*.rej" \
- "*.bak" \
- "*~" \
- ".*.sw[nop]" \
- ".dirstamp" \
- ; do echo /$$x; done; \
- } | \
- sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
- sed 's@/[.]/@/@g' | \
- LC_ALL=C sort | uniq > $@.tmp && \
- mv $@.tmp $@;
-
-all: $(srcdir)/.gitignore gitignore-recurse-maybe
-gitignore-recurse-maybe:
- @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
- $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
- fi;
-gitignore-recurse:
- @for subdir in $(DIST_SUBDIRS); do \
- case " $(SUBDIRS) " in \
- *" $$subdir "*) :;; \
- *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \
- esac; \
- done
-gitignore: $(srcdir)/.gitignore gitignore-recurse
-
-maintainer-clean: gitignore-clean
-gitignore-clean:
- -rm -f $(srcdir)/.gitignore
-
-.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/help/LINGUAS b/help/LINGUAS
new file mode 100644
index 0000000000000000000000000000000000000000..6feccbd29bdc3b52fec1b9fe5cba35d444f2abea
--- /dev/null
+++ b/help/LINGUAS
@@ -0,0 +1,18 @@
+ca
+cs
+de
+el
+en_GB
+es
+eu
+fr
+gl
+hu
+oc
+pt_BR
+ru
+sl
+sr
+sr@latin
+sv
+zh_CN
diff --git a/help/Makefile.am b/help/Makefile.am
deleted file mode 100644
index f95573b4561e2887cb57319e8d9a874f90507c56..0000000000000000000000000000000000000000
--- a/help/Makefile.am
+++ /dev/null
@@ -1,112 +0,0 @@
-@YELP_HELP_RULES@
-
-NULL =
-
-HELP_LINGUAS = ca cs de el en_GB es eu fr gl hu oc pt_BR ru sl sr sr@latin sv zh_CN
-
-HELP_ID = aisleriot
-
-HELP_FILES = \
- index.docbook \
- accordion.xml \
- agnes.xml \
- athena.xml \
- auld_lang_syne.xml \
- aunt_mary.xml \
- backbone.xml \
- bakers_dozen.xml \
- bakers_game.xml \
- bear_river.xml \
- beleaguered_castle.xml \
- block_ten.xml \
- bristol.xml \
- camelot.xml \
- canfield.xml \
- carpet.xml \
- chessboard.xml \
- clock.xml \
- cover.xml \
- cruel.xml \
- definitions.xml \
- diamond_mine.xml \
- doublets.xml \
- eagle-wing.xml \
- easthaven.xml \
- eight_off.xml \
- elevator.xml \
- eliminator.xml \
- escalator.xml \
- first_law.xml \
- fortress.xml \
- fortunes.xml \
- forty_thieves.xml \
- fourteen.xml \
- freecell.xml \
- gaps.xml \
- gold_mine.xml \
- gay_gordons.xml \
- giant.xml \
- glenwood.xml \
- golf.xml \
- gypsy.xml \
- hamilton.xml \
- helsinki.xml \
- hopscotch.xml \
- isabel.xml \
- jamestown.xml \
- jumbo.xml \
- kansas.xml \
- king_albert.xml \
- kings_audience.xml \
- klondike.xml \
- labyrinth.xml \
- lady_jane.xml \
- legal.xml \
- maze.xml \
- monte_carlo.xml \
- napoleons_tomb.xml \
- neighbor.xml \
- odessa.xml \
- osmosis.xml \
- peek.xml \
- pileon.xml \
- plait.xml \
- poker.xml \
- quatorze.xml \
- royal_east.xml \
- saratoga.xml \
- scorpion.xml \
- scuffle.xml \
- seahaven.xml \
- sir_tommy.xml \
- spiderette.xml \
- spider.xml \
- spider_three_decks.xml \
- straight_up.xml \
- streets_and_alleys.xml \
- ten_across.xml \
- terrace.xml \
- thieves.xml \
- thirteen.xml \
- thumb_and_pouch.xml \
- treize.xml \
- triple_peaks.xml \
- union_square.xml \
- valentine.xml \
- wall.xml \
- westhaven.xml \
- whitehead.xml \
- will_o_the_wisp.xml \
- yield.xml \
- yukon.xml \
- zebra.xml \
- $(NULL)
-
-HELP_MEDIA = \
- figures/camelot-goal.png \
- figures/clock-rules.png \
- $(NULL)
-
-dist_man_MANS = sol.6
-
--include $(top_srcdir)/git.mk
diff --git a/help/meson.build b/help/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..cc202fe2c1d956e1b84610a94046c792fbc32456
--- /dev/null
+++ b/help/meson.build
@@ -0,0 +1,130 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+# Documentation
+
+help_media = [
+ 'figures/camelot-goal.png',
+ 'figures/clock-rules.png',
+]
+
+help_pages = [
+ 'accordion.xml',
+ 'agnes.xml',
+ 'athena.xml',
+ 'auld_lang_syne.xml',
+ 'aunt_mary.xml',
+ 'backbone.xml',
+ 'bakers_dozen.xml',
+ 'bakers_game.xml',
+ 'bear_river.xml',
+ 'beleaguered_castle.xml',
+ 'block_ten.xml',
+ 'bristol.xml',
+ 'camelot.xml',
+ 'canfield.xml',
+ 'carpet.xml',
+ 'chessboard.xml',
+ 'clock.xml',
+ 'cover.xml',
+ 'cruel.xml',
+ 'definitions.xml',
+ 'diamond_mine.xml',
+ 'doublets.xml',
+ 'eagle-wing.xml',
+ 'easthaven.xml',
+ 'eight_off.xml',
+ 'elevator.xml',
+ 'eliminator.xml',
+ 'escalator.xml',
+ 'first_law.xml',
+ 'fortress.xml',
+ 'fortunes.xml',
+ 'forty_thieves.xml',
+ 'fourteen.xml',
+ 'freecell.xml',
+ 'gaps.xml',
+ 'gay_gordons.xml',
+ 'giant.xml',
+ 'glenwood.xml',
+ 'gold_mine.xml',
+ 'golf.xml',
+ 'gypsy.xml',
+ 'hamilton.xml',
+ 'helsinki.xml',
+ 'hopscotch.xml',
+ 'index.docbook',
+ 'isabel.xml',
+ 'jamestown.xml',
+ 'jumbo.xml',
+ 'kansas.xml',
+ 'king_albert.xml',
+ 'kings_audience.xml',
+ 'klondike.xml',
+ 'labyrinth.xml',
+ 'lady_jane.xml',
+ 'legal.xml',
+ 'maze.xml',
+ 'monte_carlo.xml',
+ 'napoleons_tomb.xml',
+ 'neighbor.xml',
+ 'odessa.xml',
+ 'osmosis.xml',
+ 'peek.xml',
+ 'pileon.xml',
+ 'plait.xml',
+ 'poker.xml',
+ 'quatorze.xml',
+ 'royal_east.xml',
+ 'saratoga.xml',
+ 'scorpion.xml',
+ 'scuffle.xml',
+ 'seahaven.xml',
+ 'sir_tommy.xml',
+ 'spider.xml',
+ 'spider_three_decks.xml',
+ 'spiderette.xml',
+ 'straight_up.xml',
+ 'streets_and_alleys.xml',
+ 'ten_across.xml',
+ 'terrace.xml',
+ 'thieves.xml',
+ 'thirteen.xml',
+ 'thumb_and_pouch.xml',
+ 'treize.xml',
+ 'triple_peaks.xml',
+ 'union_square.xml',
+ 'valentine.xml',
+ 'wall.xml',
+ 'westhaven.xml',
+ 'whitehead.xml',
+ 'will_o_the_wisp.xml',
+ 'yield.xml',
+ 'yukon.xml',
+ 'zebra.xml',
+]
+
+gnome.yelp(
+ 'aisleriot',
+ media: help_media,
+ sources: help_pages,
+)
+
+# Man page
+
+install_data(
+ 'sol.6',
+ install_dir: ar_mandir / 'man6',
+)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..01009b94cc5c902342d8b64c6c87c527ce4d546a
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,499 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+project(
+ 'aisleriot',
+ ['c', 'cpp',],
+ default_options: [
+ 'buildtype=release',
+ 'c_std=gnu11',
+ 'cpp_std=gnu++11',
+ 'warning_level=' + (meson.version().version_compare('>= 0.50.0') ? '0' : '1'),
+ 'b_ndebug=false',
+ ],
+ license: [
+ 'GPL-3.0-or-later',
+ 'LGPL-3.0-or-later',
+ 'GFDL-1.1-or-later',
+ 'GFDL-1.3-only',
+ ],
+ meson_version: '>= 0.49.0',
+ version: '3.22.10',
+)
+
+# Naming
+
+ar_name = 'aisleriot'
+
+# Requirements
+
+cairo_req_version = '1.10.0'
+gconf_req_version = '2.0'
+gio_req_version = '2.32.0'
+glib_req_version = '2.32.0'
+gtk_req_version = '3.18.0'
+guile_2_0_req_version = '2.0.0'
+guile_2_2_req_version = '2.2.0'
+libcanberra_gtk_req_version = '0.26'
+qt5svg_req_version = '5.0.0'
+rsvg_req_version = '2.32.0'
+
+# Versioning
+
+ar_version = meson.project_version()
+
+version_split = meson.project_version().split('.')
+ar_major_version = version_split[0].to_int()
+ar_minor_version = version_split[1].to_int()
+ar_micro_version = version_split[2].to_int()
+
+# i18n
+
+ar_gettext_domain = ar_name
+po_dir = meson.current_source_dir() / 'po'
+
+# Directories
+
+ar_prefix = get_option('prefix')
+
+ar_bindir = get_option('bindir')
+ar_datadir = get_option('datadir')
+ar_includedir = get_option('includedir')
+ar_libdir = get_option('libdir')
+ar_libexecdir = get_option('libexecdir')
+ar_localedir = get_option('localedir')
+ar_mandir = get_option('mandir')
+ar_sysconfdir = get_option('sysconfdir')
+
+ar_pkgdatadir = ar_datadir / ar_name
+ar_pkglibdir = ar_libdir / ar_name
+ar_pkglibexecdir = ar_libexecdir / ar_name
+
+# Debug
+
+enable_debug = get_option('dbg') or get_option('debug') or get_option('buildtype').contains('debug')
+enable_debug_ui = get_option('dbgui') and enable_debug
+
+# Meson modules
+
+gnome = import('gnome')
+i18n = import('i18n')
+pkg = import('pkgconfig')
+
+# Compilers
+
+cc = meson.get_compiler('c')
+cxx = meson.get_compiler('cpp')
+
+# Meson has a misfeature where it allows the user to override the -std option
+# for the C/C++ compiler. Disallow that.
+
+assert(get_option('c_std') == 'gnu11', 'cannot override C std version')
+assert(get_option('cpp_std') == 'gnu++11', 'cannot override C++ std version')
+
+# Asserts must not be disabled
+
+assert(get_option('b_ndebug') == 'false', 'assertions may not be disabled')
+
+# Start config.h
+
+config_h = configuration_data()
+
+config_h.set_quoted('GETTEXT_PACKAGE', ar_gettext_domain)
+config_h.set_quoted('PACKAGE', ar_name)
+config_h.set_quoted('VERSION', ar_version)
+config_h.set('ENABLE_DEBUG', enable_debug)
+config_h.set('ENABLE_DEBUG_UI', enable_debug_ui)
+config_h.set('GNOME_ENABLE_DEBUG', enable_debug)
+
+# FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems
+config_h.set10('_GNU_SOURCE', true)
+
+# Options
+
+config_h.set('ENABLE_CARD_THEME_FORMAT_FIXED', get_option('theme_fixed'))
+config_h.set('ENABLE_CARD_THEME_FORMAT_KDE', get_option('theme_kde'))
+config_h.set('ENABLE_CARD_THEME_FORMAT_NATIVE', get_option('theme_svg_qtsvg'))
+config_h.set('ENABLE_CARD_THEME_FORMAT_PYSOL', get_option('theme_pysol'))
+config_h.set('ENABLE_CARD_THEME_FORMAT_SVG', get_option('theme_svg_rsvg'))
+
+config_h.set_quoted('AR_CARD_THEME_DEFAULT', get_option('default_theme'))
+
+if get_option('default_theme_format') == 'svg-rsvg'
+ default_theme_format='svg'
+elif get_option('default_theme_format') == 'svg-qtsvg'
+ default_teme_format='native'
+else
+ default_theme_format = get_option('default_theme_format')
+endif
+
+config_h.set_quoted('AR_CARD_THEME_DEFAULT_FORMAT_STRING', default_theme_format)
+
+# Compiler flags
+
+compiler_flags_common = [
+ '-Wall',
+ '-Wcast-align',
+ '-Wempty-body',
+ '-Wformat-signedness',
+ '-Werror=implicit-function-declaration',
+ '-Wextra',
+ '-Wformat-nonliteral',
+ '-Winit-self',
+ '-Wlogical-op',
+ '-Wmissing-declarations',
+ '-Wmissing-format-attribute',
+ '-Wno-missing-field-initializers',
+ '-Wno-switch-enum',
+ '-Wno-unused-parameter',
+ '-Wpacked',
+ '-Wpointer-arith',
+ '-Wshadow',
+ '-Wstrict-aliasing=2',
+ '-Wundef',
+ '-Wuninitialized',
+ '-Wunsafe-loop-optimizations',
+ '-Wwrite-strings',
+ '-fno-common',
+]
+
+compiler_flags_c_only = [
+ '-Waggregate-return',
+ '-Wimplicit',
+ '-Wmissing-prototypes',
+ '-Wnested-externs',
+ '-Wold-style-definition',
+ '-Wsign-compare',
+ '-Wstrict-prototypes',
+]
+
+compiler_flags_cxx_only = [
+]
+
+if enable_debug
+ compiler_flags_common += [
+ '-ggdb3',
+ ]
+endif
+
+# These are currently needed but the code should be fixed instead
+compiler_flags_common_undesirable = [
+ '-fno-strict-aliasing'
+]
+
+compiler_flags_c_required = [
+]
+
+compiler_flags_cxx_required = [
+]
+
+global_cflags = cc.get_supported_arguments(compiler_flags_common +
+ compiler_flags_common_undesirable +
+ compiler_flags_c_only +
+ compiler_flags_c_required)
+
+global_cxxflags = cxx.get_supported_arguments(compiler_flags_common +
+ compiler_flags_common_undesirable +
+ compiler_flags_cxx_only +
+ compiler_flags_cxx_required)
+
+foreach flag : compiler_flags_c_required
+ assert(cc.has_argument(flag), flag + ' is required but not supported')
+endforeach
+
+foreach flag : compiler_flags_cxx_required
+ assert(cxx.has_argument(flag), flag + ' is required but not supported')
+endforeach
+
+# Meson problem: GCC only accepts the latter 2 options of the 3 below
+# if the first is *also* passed, which doesn't work with get_supported_arguments()
+# above. So just add these unconditionally, since all compilers we support
+# accept these flags.
+
+compiler_flags_format_warnings = [
+# '-Werror=format=2',
+# '-Werror=format-nonliteral',
+# '-Werror=format-security',
+]
+
+global_cflags += compiler_flags_format_warnings
+global_cxxflags += compiler_flags_format_warnings
+
+# ... and now make these flags the default
+
+add_project_arguments(global_cflags, language: 'c',)
+add_project_arguments(global_cxxflags, language: 'cpp',)
+
+# Linker flags
+
+linker_flags = [
+]
+
+foreach flag: linker_flags
+ assert(cc.has_link_argument(flag), flag + ' is required but not supported')
+ add_project_link_arguments(flag, language: 'c',)
+ add_project_link_arguments(flag, language: 'cpp',)
+endforeach
+
+# Distribution
+
+distro = run_command(
+ 'bash',
+ '-c',
+ 'source /etc/os-release && echo $ID || echo unknown; exit 0'
+).stdout().strip()
+
+# Options
+
+theme_kde_base_paths = {
+ 'centos': '/usr/share/carddecks',
+ 'debian': '/usr/share/kde4/apps/carddecks',
+ 'fedora': '/usr/share/carddecks',
+ 'opensuse': '/usr/share/kde4/apps/carddecks',
+ 'rhel': '/usr/share/carddecks',
+ 'ubuntu': '/usr/share/kde4/apps/carddecks',
+}
+
+theme_pysol_base_paths = {
+ 'centos': '/usr/share/PySolFC',
+ 'debian': '/usr/share/games/pysol',
+ 'fedora': '/usr/share/PySolFC',
+ 'opensuse': '/usr/share/games/pysol/data',
+ 'rhel': '/usr/share/PySolFC',
+ 'ubuntu': '/usr/share/games/pysol',
+}
+
+theme_kde_path = get_option('theme_kde_path')
+if get_option('theme_kde')
+ if theme_kde_path == ''
+ foreach id, path : theme_kde_base_paths
+ if distro == id
+ theme_kde_path = path
+ break
+ endif
+ endforeach
+ endif
+
+ assert(theme_kde_path != '', 'Must specify base path to KDE card themes',)
+endif
+
+theme_pysol_path = get_option('theme_pysol_path')
+if get_option('theme_pysol')
+ if theme_pysol_path == ''
+ foreach id, path : theme_pysol_base_paths
+ if distro == id
+ theme_pysol_path = path
+ break
+ endif
+ endforeach
+ endif
+
+ assert(theme_pysol_path != '', 'Must specify base path to PySolFC card themes',)
+endif
+
+config_h.set_quoted('KDE_CARD_THEME_PATH', theme_kde_path,)
+config_h.set_quoted('PYSOL_CARD_THEME_PATH', theme_pysol_path,)
+
+# Guile
+
+if get_option('guile') == 'auto'
+ if dependency('guile-2.2', required: false,).found()
+ guile_version = '2.2'
+ elif dependency('guile-2.0', required: false,).found()
+ guile_version = '2.0'
+ else
+ assert(false, 'Guile not found')
+ endif
+else
+ guile_version = get_option('guile').to_string()
+endif
+
+guile_req = 'guile-' + guile_version
+
+if guile_version == '2.2'
+ guile_req_version = guile_2_2_req_version
+elif guile_version == '2.0'
+ guile_req_version = guile_2_0_req_version
+else
+ assert(false, 'unsupported guile version')
+endif
+
+ar_pkgguiledir = ar_pkglibdir / 'guile' / guile_version
+
+# Dependencies
+
+cairo_dep = dependency('cairo', version: '>=' + cairo_req_version,)
+gio_dep = dependency('gio-2.0', version: '>=' + gio_req_version,)
+glib_dep = dependency('glib-2.0', version: '>=' + glib_req_version,)
+gtk_dep = dependency('gtk+-3.0', version: '>=' + gtk_req_version,)
+guile_dep = dependency(guile_req, version: '>=' + guile_req_version,)
+
+if get_option('gconf')
+ gconf_dep = dependency('gconf-2.0', version: '>=' + gconf_req_version, required: true,)
+ config_h.set('HAVE_GNOME', true)
+else
+ gconf_dep = dependency('', required: false,)
+ config_h.set('HAVE_GNOME', false)
+endif
+
+if get_option('sound')
+ libcanberra_gtk_dep = dependency('libcanberra-gtk3', version: '>=' + libcanberra_gtk_req_version, required: true,)
+ config_h.set('ENABLE_SOUND', true,)
+else
+ libcanberra_gtk_dep = dependency('', required: false,)
+ config_h.set('ENABLE_SOUND', false,)
+endif
+
+if get_option('theme_svg_rsvg')
+ rsvg_dep = dependency('librsvg-2.0', version: '>=' + rsvg_req_version, required: true,)
+ config_h.set('HAVE_RSVG', true)
+else
+ rsvg_dep = dependency('', required: false,)
+ config_h.set('HAVE_RSVG', false)
+endif
+
+if get_option('theme_svg_qtsvg') or get_option('theme_kde')
+ qt5 = import('qt5')
+ qtsvg_dep = dependency('qt5', modules: ['Svg',],)
+
+# qtsvg_dep = dependency('Qt5Svg', version: '>=' + qt5svg_req_version, required: true,)
+ config_h.set('HAVE_QTSVG', true)
+else
+ qtsvg_dep = dependency('', required: false,)
+ config_h.set('HAVE_QTSVG', false)
+endif
+
+libm_dep = cc.find_library('m')
+
+# Binreloc
+
+config_h.set('ENABLE_BINRELOC', get_option('binreloc'))
+
+# Auxiliary programmes
+
+guild = guile_dep.get_pkgconfig_variable('guild')
+guile = guile_dep.get_pkgconfig_variable('guile')
+gzip = find_program('gzip', required: true,)
+xmllint = find_program('xmllint', required: true,)
+
+if get_option('gconf')
+ gconftool = find_program('gconftool-2', required: true,)
+endif
+
+# Documentation
+
+# We support various ways to present help to the user:
+# ghelp: using the ghelp: protocol, most likely displaying in Yelp
+# file: showing html or xhtml files in the web browser
+# library: in the web browser loaded remotedly from library.gnome.org
+#
+# Note that for help using [x]html files, we can't use gnome-doc-utils.make
+# since it doesn't currently support this. The packager will have to use
+# gnome-doc-tool directly to build the documentation in the right format.
+# The help files must be installed in $(pkgdatadir)/$(DOC_MODULE)/$(LOCALE) .
+
+config_h.set('WITH_HELP_METHOD_GHELP', get_option('help_method') == 'ghelp')
+config_h.set('WITH_HELP_METHOD_FILE', get_option('help_method') == 'file')
+config_h.set('WITH_HELP_METHOD_LIBRARY', get_option('help_method') == 'library')
+config_h.set_quoted('HELP_FILE_FORMAT', get_option('help_format'))
+
+# Write config.h
+
+configure_file(
+ output: 'config.h',
+ configuration: config_h,
+)
+
+# Subdirs
+
+top_inc = include_directories('.')
+
+subdir('data')
+subdir('games')
+subdir('src')
+subdir('po')
+
+if get_option('docs')
+ subdir('help')
+endif
+
+if get_option('theme_svg_rsvg') or get_option('theme_svg_qtsvg')
+ subdir('cards')
+endif
+
+# Simple compat Makefile
+
+makefile_conf = configuration_data()
+makefile_conf.set('srcdir', meson.current_source_dir())
+makefile_conf.set('builddir', meson.current_build_dir())
+
+configure_file(
+ input: 'Makefile.meson',
+ output: '@BASENAME@',
+ configuration: makefile_conf,
+)
+
+# .gitignore everything in the build directory
+
+configure_file(
+ output: '.gitignore',
+ command: ['echo', '**/**',],
+ capture: true,
+ install: false,
+)
+
+# Summary
+
+output = '\n'
+output += 'Configuration for Aisleriot Solitaire:\n\n'
+output += ' Version: ' + ar_version + '\n'
+output += '\n'
+output += ' C compiler: ' + cc.get_id() + ' (version ' + cc.version() + ')\n'
+output += ' C++ compiler: ' + cxx.get_id() + ' (version ' + cxx.version() + ')\n'
+output += ' GUILE compiler: ' + guile + ' (version ' + guile_version + ')\n'
+output += '\n'
+output += ' Coverage: ' + get_option('b_coverage').to_string() + '\n'
+output += ' Debug: ' + enable_debug.to_string() + '\n'
+output += ' Debug UI: ' + enable_debug_ui.to_string() + '\n'
+output += '\n'
+output += ' Distribution: ' + distro + '\n'
+output += ' Prefix: ' + get_option('prefix') + '\n'
+output += ' Desktop data dir: ' + desktopdatadir + '\n'
+output += ' Schemas dir: ' + schemadir + '\n'
+output += '\n'
+output += ' Card themes support:\n'
+output += ' Prerendered: ' + get_option('theme_fixed').to_string() + '\n'
+output += ' KDE: ' + get_option('theme_kde').to_string() + '\n'
+if get_option('theme_kde')
+ output += ' Base path: ' + theme_kde_path + '\n'
+endif
+output += ' PySolFC: ' + get_option('theme_pysol').to_string() + '\n'
+if get_option('theme_pysol')
+ output += ' Base path: ' + theme_pysol_path + '\n'
+endif
+output += ' SVG using Rsvg: ' + get_option('theme_svg_rsvg').to_string() + '\n'
+output += ' SVG using Qt5Svg: ' + get_option('theme_svg_qtsvg').to_string() + '\n'
+output += '\n'
+output += ' Documentation: ' + get_option('docs').to_string() + '\n'
+output += ' Method: ' + get_option('help_method') + '\n'
+if get_option('help_method') == 'file'
+output += ' Format: ' + get_option('help_format') + '\n'
+endif
+output += '\n'
+output += ' Binreloc: ' + get_option('binreloc').to_string() + '\n'
+
+message(output)
+
+# Done
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9dc4d283e24dbf6eb21f2b6d2ef0215e4f917e52
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,144 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+option(
+ 'binreloc',
+ type: 'boolean',
+ value: false,
+ description: 'Binary relocation',
+)
+
+option(
+ 'dbg',
+ type: 'boolean',
+ value: false,
+ description: 'Enable extra debugging functionality',
+)
+
+option(
+ 'dbgui',
+ type: 'boolean',
+ value: false,
+ description: 'Enable extra debugging functionality UI',
+)
+
+option(
+ 'default_theme_format',
+ type: 'combo',
+ choices: ['fixed', 'kde', 'pysol', 'svg-rsvg', 'svg-qtsvg',],
+ value: 'svg-rsvg',
+ description: 'The default card theme format',
+)
+
+option(
+ 'default_theme',
+ type: 'string',
+ value: 'gnomangelo_bitmap.svgz',
+ description: 'The default card theme',
+)
+
+option(
+ 'docs',
+ type: 'boolean',
+ value: true,
+ description: 'Enable documentation',
+)
+
+option(
+ 'gconf',
+ type: 'boolean',
+ value: false,
+ description: 'Enable GConf support',
+)
+
+option(
+ 'guile',
+ type: 'combo',
+ choices: ['2.2', '2.0', 'auto',],
+ value: 'auto',
+ description: 'Which guile version to use',
+)
+
+option(
+ 'help_format',
+ type: 'combo',
+ choices: ['html', 'xhtml',],
+ value: 'html',
+ description: 'Which help format to use for file method',
+)
+
+option(
+ 'help_method',
+ type: 'combo',
+ choices: ['ghelp', 'file', 'library',],
+ value: 'ghelp', # FIXME: this may need to be different per platform
+ description: 'Which help method to use',
+)
+
+option(
+ 'sound',
+ type: 'boolean',
+ value: true,
+ description: 'Enable sound support',
+)
+
+option(
+ 'theme_fixed',
+ type: 'boolean',
+ value: true,
+ description: 'Enable support for prerendered card themes',
+)
+
+option(
+ 'theme_kde',
+ type: 'boolean',
+ value: true,
+ description: 'Enable support for KDE card themes',
+)
+
+option(
+ 'theme_kde_path',
+ type: 'string',
+ value: '',
+ description: 'Base path to KDE card themes',
+)
+
+option(
+ 'theme_pysol',
+ type: 'boolean',
+ value: false,
+ description: 'Enable support for PySolFC card themes',
+)
+
+option(
+ 'theme_pysol_path',
+ type: 'string',
+ value: '',
+ description: 'Base path to PySolFC card themes',
+)
+
+option(
+ 'theme_svg_qtsvg',
+ type: 'boolean',
+ value: false,
+ description: 'Enable support for SVG card themes (using QtSvg)',
+)
+
+option(
+ 'theme_svg_rsvg',
+ type: 'boolean',
+ value: true,
+ description: 'Enable support for SVG card themes (using Rsvg)',
+)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a19df2371912178bf8b239a2cc48827020f77221..67434d2abbc675ddff86e7c0e9b98ca0d6d7083b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,22 +1,20 @@
# List of source files containing translatable strings.
# Please keep this file in alphabetical order.
-[encoding: UTF-8]
-data/sol.appdata.xml.in
-data/sol.desktop.in.in
-src/aisleriot.schemas.in
+data/sol.desktop.in
+data/sol.metainfo.xml.in
src/ar-application.c
src/ar-game-chooser.c
src/ar-stock.c
src/board-noclutter.c
src/conf.c
-src/game.c
src/game-names.h
-[type: gettext/glade]src/help-overlay.ui
+src/game.c
+src/help-overlay.ui
src/lib/ar-card.c
src/lib/ar-help.c
src/lib/ar-runtime.c
src/lib/ar-show.c
-src/lib/org.gnome.Patience.WindowState.gschema.xml.in
+src/lib/org.gnome.Patience.WindowState.gschema.xml
src/sol.c
src/stats-dialog.c
src/util.c
@@ -91,9 +89,9 @@ games/scorpion.scm
games/scuffle.scm
games/seahaven.scm
games/sir-tommy.scm
-games/spiderette.scm
-games/spider.scm
games/spider-three-decks.scm
+games/spider.scm
+games/spiderette.scm
games/straight-up.scm
games/streets-and-alleys.scm
games/ten-across.scm
diff --git a/po/meson.build b/po/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..4da2cdaeedb3592015e9f9690c97858550490226
--- /dev/null
+++ b/po/meson.build
@@ -0,0 +1,19 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+i18n.gettext(
+ ar_gettext_domain,
+ preset: 'glib',
+)
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 1a82bec2eb91368953204b3f1dbd698200c6b8e5..0000000000000000000000000000000000000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,120 +0,0 @@
-SUBDIRS = lib
-
-NULL =
-
-# Same as in help/Makefile.am
-DOC_MODULE = aisleriot
-
-bin_PROGRAMS = sol
-
-sol_SOURCES = \
- ar-application.c \
- ar-application.h \
- ar-clock.c \
- ar-clock.h \
- ar-cursor.c \
- ar-cursor.h \
- ar-game-chooser.c \
- ar-game-chooser.h \
- ar-resources.c \
- ar-resources.h \
- ar-stock.c \
- ar-stock.h \
- ar-style.c \
- ar-style.h \
- ar-style-private.h \
- ar-style-gtk.c \
- ar-style-gtk.h \
- board-noclutter.c \
- board-noclutter.h \
- conf.c \
- conf.h \
- game.c \
- game.h \
- sol.c \
- stats-dialog.c \
- stats-dialog.h \
- util.c \
- util.h \
- window.c \
- window.h \
- $(NULL)
-
-sol_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/src/lib \
- -Ilib \
- -DDOC_MODULE=\"$(DOC_MODULE)\" \
- -DGDK_DISABLE_DEPRECATION_WARNINGS \
- $(AM_CPPFLAGS)
-
-sol_CFLAGS = \
- $(AISLERIOT_CFLAGS) \
- $(AM_CFLAGS)
-
-sol_LDFLAGS = \
- $(EXTRA_CXX_LIBS) \
- $(AM_LDFLAGS)
-
-sol_LDADD = \
- lib/libaisleriot.la \
- $(AISLERIOT_LIBS) \
- -lm
-
-if PLATFORM_WIN32_NATIVE
-sol_LDFLAGS += -mwindows
-endif
-
-BUILT_SOURCES = \
- ar-resources.c \
- ar-resources.h \
- $(NULL)
-
-ar-resources.h ar-resources.c: aisleriot.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies aisleriot.gresource.xml)
- $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir . --generate --c-name aisleriot $<
-
-schema_in_files = aisleriot.schemas.in
-if HAVE_GNOME
-schemadir = $(GCONF_SCHEMA_FILE_DIR)
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-endif
-
-%.service: %.service.in Makefile
- $(AM_V_GEN) $(SED) -e "s|%bindir%|$(bindir)|" $< > $@
-
-install-schemas-local: $(schema_DATA)
-if GCONF_SCHEMAS_INSTALL
- if test -z "$(DESTDIR)" ; then \
- for p in $^ ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
- done \
- fi
-endif
-
-install-data-local: install-schemas-local
-
-EXTRA_DIST = \
- AUTHORS \
- README \
- TODO \
- $(cardimage_DATA) \
- $(icon_DATA) \
- $(allicons) \
- $(schema_in_files) \
- aisleriot-ui.xml \
- aisleriot-debug-ui.xml \
- game-names.h \
- help-overlay.ui
-
-CLEANFILES = \
- $(BUILT_SOURCES) \
- $(schema_DATA) \
- $(service_DATA)
-
-DISTCLEANFILES = \
- $(schema_DATA) \
- $(service_DATA)
-
-@INTLTOOL_SCHEMAS_RULE@
-
--include $(top_srcdir)/git.mk
diff --git a/src/aisleriot.gresource.xml.in b/src/aisleriot.gresource.xml
similarity index 75%
rename from src/aisleriot.gresource.xml.in
rename to src/aisleriot.gresource.xml
index f19bf19a65d328d43837683dc61d7fbb77a02fd1..d862ce490bd8d91c815be277a83888cc078513dd 100644
--- a/src/aisleriot.gresource.xml.in
+++ b/src/aisleriot.gresource.xml
@@ -17,10 +17,10 @@
-->
- @top_srcdir@/data/slot.svg
- @top_srcdir@/data/baize.png
- @srcdir@/help-overlay.ui
- @srcdir@/aisleriot-ui.xml
- @srcdir@/aisleriot-debug-ui.xml
+ data/slot.svg
+ data/baize.png
+ help-overlay.ui
+ aisleriot-ui.xml
+ aisleriot-debug-ui.xml
diff --git a/src/aisleriot.schemas.in b/src/aisleriot.schemas
similarity index 99%
rename from src/aisleriot.schemas.in
rename to src/aisleriot.schemas
index 3edeb24301d25820ba7243fb68f3f11b20d4a990..69416f42f1ba29912ca2ca7236e4d1c5f0d30061 100644
--- a/src/aisleriot.schemas.in
+++ b/src/aisleriot.schemas
@@ -97,7 +97,7 @@
A list of strings that come in the form of a quintuple: name, wins, total games played, best time (in seconds) and worst time (also in seconds). Unplayed games do not need to be represented.
-
+
/schemas/apps/aisleriot/recent_games_list
/apps/aisleriot/recent_games_list
diff --git a/src/ar-stock.c b/src/ar-stock.c
index 8883c45d997d0da07675f50534e9890e8875bc46..f46eda1706a1e371d9b339a087bbb204a0658d4b 100644
--- a/src/ar-stock.c
+++ b/src/ar-stock.c
@@ -278,8 +278,13 @@ ar_get_licence (const gchar *game_name)
"along with this program. If not, see .");
license_trans = g_strjoin ("\n\n", _(license0), _(license1), _(license3), NULL);
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
license_str =
g_strdup_printf (license_trans, game_name, version, game_name, game_name);
+#pragma GCC diagnostic pop
+
g_free (license_trans);
return license_str;
diff --git a/data/baize.png b/src/data/baize.png
similarity index 100%
rename from data/baize.png
rename to src/data/baize.png
diff --git a/data/baize.xcf b/src/data/baize.xcf
similarity index 100%
rename from data/baize.xcf
rename to src/data/baize.xcf
diff --git a/data/slot.svg b/src/data/slot.svg
similarity index 100%
rename from data/slot.svg
rename to src/data/slot.svg
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
deleted file mode 100644
index 3624b7bfce057c043f149cdfd6270e1babf16c3d..0000000000000000000000000000000000000000
--- a/src/lib/Makefile.am
+++ /dev/null
@@ -1,176 +0,0 @@
-NULL =
-
-noinst_LTLIBRARIES = libaisleriot.la
-
-BUILT_SOURCES = \
- ar-marshal.c \
- ar-marshal.h \
- $(NULL)
-
-libaisleriot_la_SOURCES = \
- ar-card.c \
- ar-card.h \
- ar-card-private.h \
- ar-card-surface-cache.c \
- ar-card-surface-cache.h \
- ar-card-theme.c \
- ar-card-theme.h \
- ar-card-theme-private.h \
- ar-card-themes.c \
- ar-card-themes.h \
- ar-conf.c \
- ar-conf.h \
- ar-debug.c \
- ar-debug.h \
- ar-gsettings.c \
- ar-gsettings.h \
- ar-help.c \
- ar-help.h \
- ar-profile.c \
- ar-profile.h \
- ar-runtime.c \
- ar-runtime.h \
- ar-show.c \
- ar-show.h \
- ar-sound.c \
- ar-sound.h \
- ar-string-utils.c \
- ar-string-utils.h \
- $(NULL)
-
-nodist_libaisleriot_la_SOURCES = \
- $(BUILT_SOURCES) \
- $(NULL)
-
-if HAVE_RSVG
-libaisleriot_la_SOURCES += \
- ar-svg.c \
- ar-svg.h \
- ar-card-theme-preimage.c \
- $(NULL)
-
-if ENABLE_CARD_THEME_FORMAT_SVG
-libaisleriot_la_SOURCES += ar-card-theme-svg.c
-endif
-
-endif # HAVE_RSVG
-
-if HAVE_QTSVG
-
-libaisleriot_la_SOURCES += \
- ar-card-theme-qsvg.cpp \
- ar-card-theme-qsvg-private.h \
- $(NULL)
-
-if ENABLE_CARD_THEME_FORMAT_KDE
-libaisleriot_la_SOURCES += ar-card-theme-kde.cpp
-endif
-if ENABLE_CARD_THEME_FORMAT_NATIVE
-libaisleriot_la_SOURCES += ar-card-theme-native.cpp
-endif
-
-endif # HAVE_QTSVG
-
-if ENABLE_CARD_THEME_FORMAT_PYSOL
-libaisleriot_la_SOURCES += ar-card-theme-pysol.c
-endif
-
-if ENABLE_CARD_THEME_FORMAT_FIXED
-libaisleriot_la_SOURCES += ar-card-theme-fixed.c
-endif
-
-libaisleriot_la_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- -DPKGLIBDIR="\"$(pkglibdir)\"" \
- -DPKGDATADIR="\"$(pkgdatadir)\"" \
- -DPREFIX="\"$(prefix)\"" \
- -DLIBDIR="\"$(libdir)\"" \
- -DDATADIR="\"$(datadir)\"" \
- -DCOMMON_DATADIR="\"$(datadir)/gnome-games-common\"" \
- -DSCORESDIR="\"$(scoredir)\"" \
- -DGDK_DISABLE_DEPRECATION_WARNINGS \
- $(AM_CPPFLAGS)
-
-libaisleriot_la_CFLAGS = \
- $(AISLERIOT_CFLAGS) \
- -fPIC \
- $(AM_CFLAGS)
-
-libaisleriot_la_CXXFLAGS = \
- $(AISLERIOT_CFLAGS) \
- -fPIC \
- $(AM_CXXFLAGS)
-
-libaisleriot_la_LIBADD = \
- $(AISLERIOT_LIBS)
-
-gsettingsschema_in_files = org.gnome.Patience.WindowState.gschema.xml.in
-gsettings_SCHEMAS = $(gsettingsschema_in_files:.gschema.xml.in=.gschema.xml)
-
-ar-marshal.c: stamp-ar-marshal.c
- @true
-stamp-ar-marshal.c: ar-marshal.list Makefile
- $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=ar_marshal $< --header --body --internal > ar-marshal.c \
- && echo timestamp > $(@F)
-
-ar-marshal.h: stamp-ar-marshal.h
- @true
-stamp-ar-marshal.h: ar-marshal.list Makefile
- $(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=ar_marshal $< --header --internal > ar-marshal.h \
- && echo timestamp > $(@F)
-
-# Auxiliary programme to prerender card images
-
-if HAVE_RSVG
-
-pkglibexec_PROGRAMS = ar-cards-renderer
-
-ar_cards_renderer_SOURCES = \
- render-cards.c
-
-ar_cards_renderer_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_builddir) \
- $(AM_CPPFLAGS)
-
-ar_cards_renderer_CFLAGS = \
- $(AISLERIOT_CFLAGS) \
- $(AM_CFLAGS)
-
-ar_cards_renderer_LDFLAGS = \
- $(EXTRA_CXX_LIBS) \
- $(AM_LDFLAGS)
-
-ar_cards_renderer_LDADD = \
- libaisleriot.la \
- $(AISLERIOT_LIBS)
-
-endif # HAVE_RSVG
-
-stamp_files = \
- stamp-ar-marshal.c \
- stamp-ar-marshal.h \
- $(NULL)
-
-EXTRA_DIST = \
- ar-marshal.list \
- $(gsettingsschema_in_files) \
- $(NULL)
-
-CLEANFILES = \
- $(BUILT_SOURCES) \
- $(gsettings_SCHEMAS) \
- $(stamp_files) \
- $(NULL)
-
-DISTCLEANFILES = \
- $(BUILT_SOURCES) \
- $(gsettings_SCHEMAS) \
- $(stamp_files) \
- $(NULL)
-
-@INTLTOOL_XML_NOMERGE_RULE@
-@GSETTINGS_RULES@
-
--include $(top_srcdir)/git.mk
diff --git a/src/lib/ar-card-theme-private.h b/src/lib/ar-card-theme-private.h
index ebaaf39594e4edec7e7ac136c9a529af9f51b649..426ab7323aa7a0eb14092a1288194d9d37ae51d9 100644
--- a/src/lib/ar-card-theme-private.h
+++ b/src/lib/ar-card-theme-private.h
@@ -187,9 +187,9 @@ ArCardTheme* ar_card_theme_svg_new (void);
#endif /* HAVE_RSVG */
-#if 1 //def HAVE_QTSVG
+#ifdef HAVE_QTSVG
-/* ArCardThemeQSvg (abstract) */
+/* ArCardThemeQSvg */
#define AR_TYPE_CARD_THEME_QSVG (ar_card_theme_qsvg_get_type ())
#define AR_CARD_THEME_QSVG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AR_TYPE_CARD_THEME_QSVG, ArCardThemeQSvg))
@@ -203,6 +203,8 @@ typedef struct _ArCardThemeQSvg ArCardThemeQSvg;
GType ar_card_theme_qsvg_get_type (void);
+ArCardTheme* ar_card_theme_qsvg_new (void);
+
/* ArCardThemeNative */
#define AR_TYPE_CARD_THEME_NATIVE (ar_card_theme_native_get_type ())
diff --git a/src/lib/ar-card-themes.c b/src/lib/ar-card-themes.c
index db51a1964dc9f3ea406c16e1ef0ab6d2f87622eb..31282195d61e7fa4e9e35b17f9368c0c27c27b76 100644
--- a/src/lib/ar-card-themes.c
+++ b/src/lib/ar-card-themes.c
@@ -74,22 +74,26 @@ theme_type_from_string (const char *type_str,
GType type;
} type_strings[] = {
#ifdef HAVE_QTSVG
-#if defined(ENABLE_CARD_THEME_NATIVE) && !defined(ENABLE_CARD_THEME_FORMAT_SVG)
+#if defined(ENABLE_CARD_THEME_FORMAT_NATIVE) && !defined(ENABLE_CARD_THEME_FORMAT_SVG)
{ "svg", AR_TYPE_CARD_THEME_NATIVE },
-#endif /* HAVE_QTSVG */
-#else
+#endif
+#endif /* HAVE_QTSVG */
+
#ifdef HAVE_RSVG
#ifdef ENABLE_CARD_THEME_FORMAT_SVG
{ "svg", AR_TYPE_CARD_THEME_SVG },
#endif
#endif /* HAVE_RSVG */
-#endif /* HAVE_QTSVG */
+
#ifdef HAVE_QTSVG
+#ifdef ENABLE_CARD_THEME_FORMAT_NATIVE
{ "native", AR_TYPE_CARD_THEME_NATIVE },
+#endif
#ifdef ENABLE_CARD_THEME_FORMAT_KDE
{ "kde", AR_TYPE_CARD_THEME_KDE },
#endif
#endif /* HAVE_QTSVG */
+
#ifdef ENABLE_CARD_THEME_FORMAT_PYSOL
{ "pysol", AR_TYPE_CARD_THEME_PYSOL },
#endif
@@ -217,7 +221,7 @@ ar_card_themes_foreach_theme_type_and_dir (ArCardThemes *theme_manager,
const GType types[] = {
/* List of supported theme types, in order of decreasing precedence */
#ifdef HAVE_QTSVG
-#ifdef ENABLE_CARD_THEME_NATIVE
+#if defined(ENABLE_CARD_THEME_FORMAT_NATIVE) && !defined(ENABLE_CARD_THEME_FORMAT_SVG)
AR_TYPE_CARD_THEME_NATIVE,
#endif
#endif /* HAVE_QTSVG */
@@ -230,7 +234,7 @@ ar_card_themes_foreach_theme_type_and_dir (ArCardThemes *theme_manager,
#ifdef ENABLE_CARD_THEME_FORMAT_KDE
AR_TYPE_CARD_THEME_KDE,
#endif
-#if !defined(ENABLE_CARD_THEME_SVG) && !defined(ENABLE_CARD_THEME_NATIVE)
+#ifdef ENABLE_CARD_THEME_NATIVE
AR_TYPE_CARD_THEME_NATIVE,
#endif
#endif /* HAVE_QTSVG */
diff --git a/src/lib/meson.build b/src/lib/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..03f90e592a92d059bc36a8ee282b9667b5936be8
--- /dev/null
+++ b/src/lib/meson.build
@@ -0,0 +1,149 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+lib_inc = include_directories('.')
+
+# Library
+
+libaisleriot_deps = [
+ cairo_dep,
+ gconf_dep,
+ glib_dep,
+ gtk_dep,
+ libcanberra_gtk_dep,
+ libm_dep,
+ qtsvg_dep,
+ rsvg_dep,
+]
+
+libaisleriot_sources = files(
+ 'ar-card-private.h',
+ 'ar-card-surface-cache.c',
+ 'ar-card-surface-cache.h',
+ 'ar-card-theme-private.h',
+ 'ar-card-theme.c',
+ 'ar-card-theme.h',
+ 'ar-card-themes.c',
+ 'ar-card-themes.h',
+ 'ar-card.c',
+ 'ar-card.h',
+ 'ar-conf.c',
+ 'ar-conf.h',
+ 'ar-debug.c',
+ 'ar-debug.h',
+ 'ar-gsettings.c',
+ 'ar-gsettings.h',
+ 'ar-help.c',
+ 'ar-help.h',
+ 'ar-profile.c',
+ 'ar-profile.h',
+ 'ar-runtime.c',
+ 'ar-runtime.h',
+ 'ar-show.c',
+ 'ar-show.h',
+ 'ar-sound.c',
+ 'ar-sound.h',
+ 'ar-string-utils.c',
+ 'ar-string-utils.h',
+)
+
+if get_option('theme_fixed')
+ libaisleriot_sources += files(
+ 'ar-card-theme-fixed.c',
+ )
+endif
+
+if get_option('theme_kde')
+ libaisleriot_sources += files(
+ 'ar-card-theme-kde.cpp',
+ )
+endif
+
+if get_option('theme_svg_rsvg')
+ libaisleriot_sources += files(
+ 'ar-card-theme-preimage.c',
+ 'ar-card-theme-svg.c',
+ 'ar-svg.c',
+ 'ar-svg.h',
+ )
+endif
+
+if get_option('theme_pysol')
+ libaisleriot_sources += files(
+ 'ar-card-theme-pysol.c',
+ )
+endif
+
+if get_option('theme_svg_qtsvg')
+ libaisleriot_sources += files(
+ 'ar-card-theme-native.cpp',
+ )
+endif
+
+if get_option('theme_svg_qtsvg') or get_option('theme_kde')
+ libaisleriot_sources += files(
+ 'ar-card-theme-qsvg-private.h',
+ 'ar-card-theme-qsvg.cpp',
+ )
+endif
+
+libaisleriot_sources += gnome.genmarshal(
+ 'ar-marshal',
+ internal: true,
+ prefix: 'ar_marshal',
+ sources: 'ar-marshal.list',
+)
+
+libaisleriot_cflags = [
+ '-DDATADIR="@0@"'.format(ar_prefix / ar_datadir),
+ '-DLIBDIR="@0@"'.format(ar_prefix / ar_libdir),
+ '-DPKGDATADIR="@0@"'.format(ar_prefix / ar_pkgdatadir),
+ '-DPKGLIBDIR="@0@"'.format(ar_prefix / ar_pkglibdir),
+ '-DPREFIX="@0@"'.format(ar_prefix),
+ '-DGDK_DISABLE_DEPRECATION_WARNINGS',
+]
+
+# Auxiliary programme to prerender card images
+
+if get_option('theme_svg_rsvg')
+ render_cards_sources = libaisleriot_sources + files(
+ 'render-cards.c',
+ )
+
+ render_cards = executable(
+ 'ar-cards-renderer',
+ c_args: libaisleriot_cflags,
+ cpp_args: libaisleriot_cflags,
+ dependencies: libaisleriot_deps,
+ include_directories: [top_inc, lib_inc,],
+ install: true,
+ install_dir: ar_pkglibexecdir,
+ sources: render_cards_sources,
+ )
+endif
+
+# Settings schemas
+
+schemadir = ar_prefix / ar_datadir / 'glib-2.0' / 'schemas'
+
+install_data(
+ 'org.gnome.Patience.WindowState.gschema.xml',
+ install_dir: schemadir,
+)
+
+meson.add_install_script(
+ 'meson_compileschemas.py',
+ schemadir,
+)
diff --git a/src/lib/meson_compileschemas.py b/src/lib/meson_compileschemas.py
new file mode 100755
index 0000000000000000000000000000000000000000..3268ddc04ab978b04016dc8bb9c5298516fdbc4b
--- /dev/null
+++ b/src/lib/meson_compileschemas.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+import os
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ sys.exit(0)
+
+prefix = os.environ['MESON_INSTALL_PREFIX']
+schemasdir = os.path.join(prefix, sys.argv[1])
+
+rv = subprocess.call(['glib-compile-schemas', schemasdir])
+sys.exit(rv)
diff --git a/src/lib/org.gnome.Patience.WindowState.gschema.xml.in b/src/lib/org.gnome.Patience.WindowState.gschema.xml
similarity index 86%
rename from src/lib/org.gnome.Patience.WindowState.gschema.xml.in
rename to src/lib/org.gnome.Patience.WindowState.gschema.xml
index 63088e8c071e60fd375477e0b2d280c8465df3be..ec4fc64d148fdfe39d3899d76052e875a796c517 100644
--- a/src/lib/org.gnome.Patience.WindowState.gschema.xml.in
+++ b/src/lib/org.gnome.Patience.WindowState.gschema.xml
@@ -21,21 +21,21 @@
false
- <_summary>Whether the window is maximized
+ Whether the window is maximized
false
- <_summary>Whether the window is fullscreen
+ Whether the window is fullscreen
-1
- <_summary>Window width
+ Window width
-1
- <_summary>Window height
+ Window height
diff --git a/src/lib/render-cards.c b/src/lib/render-cards.c
index 4709844fe92eb127388abdf5ead13ca8d47ff1d0..00cd3997cb9880a0c998efa4b27e506b6eec380b 100644
--- a/src/lib/render-cards.c
+++ b/src/lib/render-cards.c
@@ -184,7 +184,7 @@ main (int argc, char *argv[])
ar_card_theme_set_size (theme, size, -1, 1.0);
- g_snprintf (sizestr, sizeof (sizestr), "%d", size);
+ g_snprintf (sizestr, sizeof (sizestr), "%u", size);
sizepath = g_build_filename (basepath, sizestr, NULL);
if (g_mkdir_with_parents (sizepath, 0755) < 0) {
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000000000000000000000000000000000000..7475ed1efa06c7aedff8f506e927a06e712bf3af
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,99 @@
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+src_inc = include_directories('.')
+
+subdir('lib')
+
+# Aisleriot Solitaire
+
+sol_help_id = 'aisleriot'
+
+sol_sources = libaisleriot_sources + files(
+ 'ar-application.c',
+ 'ar-application.h',
+ 'ar-clock.c',
+ 'ar-clock.h',
+ 'ar-cursor.c',
+ 'ar-cursor.h',
+ 'ar-game-chooser.c',
+ 'ar-game-chooser.h',
+ 'ar-stock.c',
+ 'ar-stock.h',
+ 'ar-style-gtk.c',
+ 'ar-style-gtk.h',
+ 'ar-style-private.h',
+ 'ar-style.c',
+ 'ar-style.h',
+ 'board-noclutter.c',
+ 'board-noclutter.h',
+ 'conf.c',
+ 'conf.h',
+ 'game.c',
+ 'game.h',
+ 'sol.c',
+ 'stats-dialog.c',
+ 'stats-dialog.h',
+ 'util.c',
+ 'util.h',
+ 'window.c',
+ 'window.h',
+)
+
+sol_sources += gnome.compile_resources(
+ 'ar-resources',
+ 'aisleriot.gresource.xml',
+ c_name: 'aisleriot',
+ export: true,
+)
+
+sol_cflags = libaisleriot_cflags + [
+ '-DDOC_MODULE="@0@"'.format(sol_help_id)
+]
+
+sol_deps = libaisleriot_deps + [
+ guile_dep,
+]
+
+sol = executable(
+ 'sol',
+ c_args: sol_cflags,
+ cpp_args: sol_cflags,
+ dependencies: sol_deps,
+ include_directories: [top_inc, src_inc, lib_inc,],
+ install: true,
+ sources: sol_sources,
+)
+
+# Install gconf schemas
+
+if get_option('gconf')
+ gconfschemadir = ar_sysconfdir / 'gconf' / 'schemas'
+
+ gconf_schema_sources = [
+ 'aisleriot.schemas',
+ ]
+
+ install_data(
+ gconf_schema_sources,
+ install_dir: gconfschemadir,
+ )
+
+ meson.add_install_script(
+ 'meson_gconf.py',
+ gconfschemadir,
+ gconf_schema_sources,
+ )
+endif
diff --git a/src/meson_gconf.py b/src/meson_gconf.py
new file mode 100755
index 0000000000000000000000000000000000000000..e3b9d96cdcc90b954ca455d90e739370379c57c4
--- /dev/null
+++ b/src/meson_gconf.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+# Copyright © 2019 Christian Persch
+#
+# This programme is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This programme is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this programme. If not, see .
+
+import os
+import subprocess
+import sys
+
+if os.environ.get('DESTDIR'):
+ sys.exit(0)
+
+prefix = os.environ['MESON_INSTALL_PREFIX']
+schemasdir = os.path.join(prefix, sys.argv[1])
+
+rv = subprocess.call(['gconftool-2', '--install-schema-file', os.path.join(schemasdir, sys.argv[2])])
+sys.exit(rv)