pidgin/pidgin

67692039e5a7
Parents 9b97fe2dcdac
Children 3eb76681f7d3
Move the libpurple enums to gnome.mkenums_simple

Testing Done:
Compiled and ran the unit tests

Reviewed at https://reviews.imfreedom.org/r/858/
--- a/libpurple/enums.c.in Mon Aug 02 18:54:25 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*** BEGIN file-header ***/
-/* purple
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
- */
-
-#include "enums.h"
-
-/*** END file-header ***/
-/*** BEGIN file-production ***/
-
-/* enumerations from "@filename@" */
-#include "@filename@"
-
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType
-@enum_name@_get_type(void) {
- static gsize static_g_define_type_id = 0;
-
- if(g_once_init_enter(&static_g_define_type_id)) {
- 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(&static_g_define_type_id, g_define_type_id);
- }
-
- return static_g_define_type_id;
-}
-
-/*** END value-tail ***/
-
-/*** BEGIN file-tail ***/
-/*** END file-tail ***/
--- a/libpurple/enums.h.in Mon Aug 02 18:54:25 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*** BEGIN file-header ***/
-/* purple
- *
- * Purple is the legal property of its developers, whose names are too numerous
- * to list here. Please refer to the COPYRIGHT file distributed with this
- * source distribution.
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
- */
-
-#if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
-# error "only <purple.h> may be included directly"
-#endif
-
-#ifndef PURPLE_ENUMS_H
-#define PURPLE_ENUMS_H
-/**
- * SECTION:enums
- * @section_id: libpurple-enums
- * @short_description: <filename>enums.h</filename>
- * @title: GEnums and GFlags
- *
- * This file contains all the #GEnum and #GFlags type definitions of libpurple.
- */
-
-#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 /* PURPLE_ENUMS_H */
-/*** END file-tail ***/
--- a/libpurple/meson.build Mon Aug 02 18:54:25 2021 -0500
+++ b/libpurple/meson.build Mon Aug 02 21:47:33 2021 -0500
@@ -246,10 +246,8 @@
]
-enums = gnome.mkenums('enums',
+enums = gnome.mkenums_simple('purpleenums',
sources : purple_enumheaders,
- h_template : 'enums.h.in',
- c_template : 'enums.c.in',
install_header : true,
install_dir : get_option('includedir') / purple_include_base)
enums_c = enums[0]