gplugin/gplugin

Merged in feature/mkenums-simple (pull request #24)
develop
2019-07-23, Gary Kramlich
8d95ebfc4688
Merged in feature/mkenums-simple (pull request #24)

Move from gnome.mkenums to gnome.mkenums_simple

Approved-by: Elliott Sales de Andrade
--- a/gplugin/gplugin-enums.c.tmpl Mon Jul 22 07:01:06 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*** BEGIN file-header ***/
-/*
- * vi:syntax=c
- *
- * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com>
- *
- * This program 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 program 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 program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <gplugin/gplugin-enums.h>
-
-/*** END file-header ***/
-
-/**
- * SECTION:gplugin-enums
- * @Title: Enumerations
- * @Short_description: common enumerations
- *
- * The enums defined here are used throughout %GPlugin.
- */
-
-/*** BEGIN file-production ***/
-
-/* enumerations from "@filename@" */
-#include "gplugin/@basename@"
-
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType
-@enum_name@_get_type(void) {
- static volatile gsize g_define_type_id__volatile = 0;
-
- if(g_once_init_enter(&g_define_type_id__volatile)) {
- static const G@Type@Value values [] = {
-/*** END value-header ***/
-
-/*** BEGIN value-production ***/
- { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
-/*** END value-production ***/
-
-/*** BEGIN value-tail ***/
- { 0, NULL, NULL }
- };
-
- GType g_define_type_id =
- g_@type@_register_static(g_intern_static_string("@EnumName@"), values);
- g_once_init_leave(&g_define_type_id__volatile, g_define_type_id);
- }
-
- return g_define_type_id__volatile;
-}
-
-/*** END value-tail ***/
-
-/*** BEGIN file-tail ***/
-/*** END file-tail ***/
-
--- a/gplugin/gplugin-enums.h.tmpl Mon Jul 22 07:01:06 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*** BEGIN file-header ***/
-/*
- * vi:syntax=c
- *
- * Copyright (C) 2011-2013 Gary Kramlich <grim@reaperworld.com>
- *
- * This program 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 program 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 program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef GPLUGIN_ENUM_H
-#define GPLUGIN_ENUM_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-
-/* enumerations from "@basename@" */
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType @enum_name@_get_type(void) G_GNUC_CONST;
-#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
-/*** END value-header ***/
-
-/*** BEGIN file-tail ***/
-
-G_END_DECLS
-
-#endif /* GPLUGIN_ENUM_H */
-/*** END file-tail ***/
-
--- a/gplugin/meson.build Mon Jul 22 07:01:06 2019 +0000
+++ b/gplugin/meson.build Tue Jul 23 16:34:45 2019 +0000
@@ -65,13 +65,12 @@
'gplugin-plugin.h',
]
-enums = gnome.mkenums('gplugin-enums',
+enums = gnome.mkenums_simple(
+ 'gplugin-enums',
sources : ENUM_HEADERS,
- c_template : 'gplugin-enums.c.tmpl',
- h_template : 'gplugin-enums.h.tmpl',
- identifier_prefix : 'GPlugin',
install_header : true,
install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin'))
+
enums_c = enums[0]
enums_h = enums[1]
@@ -103,7 +102,6 @@
gplugin_version_h
]
-
gplugin_inc = include_directories('.')
# Build gplugin.h
--- a/meson.build Mon Jul 22 07:01:06 2019 +0000
+++ b/meson.build Tue Jul 23 16:34:45 2019 +0000
@@ -2,7 +2,7 @@
# Project Info
###############################################################################
project('gplugin', 'c', version : '0.28.1-dev',
- meson_version : '>=0.37.0',
+ meson_version : '>=0.42.0',
default_options : ['c_std=c99'])
parts = meson.project_version().split('-')