diff options
author | Gary Kramlich <grim@reaperworld.com> | 2019-11-17 00:42:12 -0600 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2019-11-17 00:42:12 -0600 |
commit | bc155b37b08ca4ca90bea364469b687f4df8cc89 (patch) | |
tree | 44308cda27e90e1cdb5db051852d5ef7ca00010f | |
parent | cf6da5f07b9ce333f36d795abff155f562d47055 (diff) | |
download | pidgin-bc155b37b08ca4ca90bea364469b687f4df8cc89.tar.gz |
Add PURPLE_VERSION and PURPLE_EXTRA_VERSION to libpurple/version.h and clean up some other related stuff
-rw-r--r-- | libpurple/version.h.in | 34 | ||||
-rw-r--r-- | meson.build | 18 |
2 files changed, 37 insertions, 15 deletions
diff --git a/libpurple/version.h.in b/libpurple/version.h.in index 946a641962..ec1f645597 100644 --- a/libpurple/version.h.in +++ b/libpurple/version.h.in @@ -22,6 +22,7 @@ #ifndef PURPLE_VERSION_H #define PURPLE_VERSION_H + /** * SECTION:version * @section_id: libpurple-version @@ -50,9 +51,36 @@ */ #define PURPLE_MICRO_VERSION (@PURPLE_MICRO_VERSION@) -#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && \ - ((y) < PURPLE_MINOR_VERSION || \ - ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION))) +/** + * PURPLE_EXTRA_VERSION: + * + * The "extra" part of the version number if anything. Typical values are + * "devel", "beta1", "rc2", etc. + */ +#define PURPLE_EXTRA_VERSION ("@PURPLE_EXTRA_VERSION@") + +/** + * PURPLE_VERSION + * + * The entire version as a string. + */ +#define PURPLE_VERSION ("@PURPLE_VERSION@") + +/** + * PURPLE_VERSION_CHECK: + * @major: The major version to check for. + * @minor: The minor version to check for. + * @micro: The micro version to check for. + * + * Checks the version of libpurple being compiled against. See + * #purple_version_check for a runtime check. + * + * Returns: %TRUE if the version of libpurple is the same or newer than the + * passed-in version. + */ +#define PURPLE_VERSION_CHECK(major, minor, micro) ((major) == PURPLE_MAJOR_VERSION && \ + ((minor) < PURPLE_MINOR_VERSION || \ + ((minor) == PURPLE_MINOR_VERSION && (micro) <= PURPLE_MICRO_VERSION))) G_BEGIN_DECLS diff --git a/meson.build b/meson.build index 0f53c7299e..f54bb3aac9 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ # UPDATING VERSION NUMBERS FOR RELEASES # # The version number is: -# <major>.<minor>.<micro><suffix> +# <major>.<minor>.<micro><extra> # # micro += 1 # @@ -15,7 +15,7 @@ # major += 1 # purple_soversion += 1 # -# suffix should be similar to one of the following: +# extra should be similar to one of the following: # For beta releases: '-beta2' # For code under development: '-devel' # For production releases: '' @@ -27,9 +27,9 @@ purple_soversion = 20 parts = meson.project_version().split('-') if parts.length() > 1 - purple_version_suffix = parts[1] + purple_extra_version = parts[1] else - purple_version_suffix = '' + purple_extra_version = '' endif parts = parts[0].split('.') @@ -46,10 +46,12 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) conf.set_quoted('PACKAGE', meson.project_name()) conf.set_quoted('PACKAGE_NAME', meson.project_name()) conf.set_quoted('VERSION', meson.project_version()) +conf.set_quoted('DISPLAY_VERSION', meson.project_version()) version_conf.set('PURPLE_MAJOR_VERSION', purple_major_version) version_conf.set('PURPLE_MINOR_VERSION', purple_minor_version) version_conf.set('PURPLE_MICRO_VERSION', purple_micro_version) +version_conf.set('PURPLE_EXTRA_VERSION', purple_extra_version) version_conf.set('PURPLE_VERSION', meson.project_version()) version_conf.set('PURPLE_API_VERSION', purple_soversion) @@ -280,14 +282,6 @@ gobject = dependency('gobject-2.0') gthread = dependency('gthread-2.0') gnome = import('gnome') -if get_option('extraversion') != '' - DISPLAY_VERSION = '@0@-@1@'.format(meson.project_version(), - get_option('extraversion')) -else - DISPLAY_VERSION = meson.project_version() -endif -conf.set_quoted('DISPLAY_VERSION', DISPLAY_VERSION) - ####################################################################### # Check for GObject Introspection ####################################################################### |