[cairo] [patch] pixman: RELEASING instructions and release-publish target
Carl Worth
cworth at cworth.org
Mon Mar 24 15:11:49 PDT 2008
On 31 Jan 2008 00:18:23 +0100, Soeren Sandmann wrote:
> Carl Worth <cworth at cworth.org> writes:
> > Also, I just noticed that pixman seems to do pre-release version
> > bumping. That unfortunately means that my idea of using compile-time
> > macros testing the pixman version won't work for including new
> > features, (at least not until the version bump occurs). Søren, what do
> > you think about doing both pre-and-post version bumps like cairo
> > does?
>
> That's fine with me.
Here's a patchset that does the pre-release version bump to 0.9.7,
documents that process, and also provides a new PIXMAN_VERSION macro
and pixman_version function, (and friends).
I'll push soon unless there are any objections.
-Carl
-------------- next part --------------
From cc6fa4b024bf66388a922f1e0f386ae017ea8374 Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth at cworth.org>
Date: Mon, 24 Mar 2008 11:58:33 -0700
Subject: [PATCH] Document incrementing the micro version immediately after a release
This is a cairo-like scheme where the version number is incremented
both immediately before and immediately after a release.
---
RELEASING | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/RELEASING b/RELEASING
index c72d051..330e5e3 100644
--- a/RELEASING
+++ b/RELEASING
@@ -47,9 +47,21 @@ Here are the steps to follow to create a new pixman release:
change then there is further work to be done, (also described in
configure.in).
-5) Use "git commit" and "git push" to publish any changes made in steps
- 3 and 4.
+5) Use "git commit" record any changes made in steps 3 and 4.
-6) Generate the final tar files with:
+6) Generate the final tar files with
make distcheck
+
+ And publish the tar files to everywhere appropriate.
+
+ Note: There's a "make release-publish" target to help with this
+ step, (creating the tar file and publishing it), but it depends on
+ getting gpg setup first. It's probably the right way to go in the
+ future, though.
+
+7) Increment pixman_micro to the next larger (odd) number in
+ configure.ac. Commit this change, and push all commits created
+ during this process.
+
+8) Send email announcements of the release to everywhere appropriate.
--
1.5.5.rc0.24.g86c30
From 1db53e3a1b2fd609ff01e7ade2cab305074a8940 Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth at cworth.org>
Date: Mon, 24 Mar 2008 12:00:46 -0700
Subject: [PATCH] Increment pixman version to 0.9.7
This represents the in-development state, (so that the next release
will be 0.9.8 with an even-number micro component).
---
configure.ac | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index c416bc8..63ee2c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,10 @@ AC_PREREQ([2.57])
# Pixman versioning scheme
#
# - If the changes don't affect API or ABI, then increment pixman_micro
+# Note: This number is incremented immediately before *and*
+# immediately after a release. This gurantees that the micro
+# component is always an even number in any release.
+#
# - If API is added, then increment PIXMAN_MINOR, and set MICRO to 0
#
# - If you break ABI, then
@@ -42,7 +46,7 @@ AC_PREREQ([2.57])
m4_define([pixman_major], 0)
m4_define([pixman_minor], 9)
-m4_define([pixman_micro], 6)
+m4_define([pixman_micro], 7)
m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
--
1.5.5.rc0.24.g86c30
From c4668b160287875253145b75e24c9060e74ad8dd Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth at cworth.org>
Date: Mon, 24 Mar 2008 14:51:09 -0700
Subject: [PATCH] Add pixman_version function and related macros
The complete new API here makes available compile-tim version checks:
PIXMAN_VERSION
PIXMAN_VERSION_STRING
PIXMAN_VERSION_ENCODE
as well as run-time version checks:
pixman_version()
pixman_version_string()
---
.gitignore | 1 +
configure.ac | 9 ++++-
pixman/Makefile.am | 5 ++-
pixman/pixman-version.c | 73 ++++++++++++++++++++++++++++++++++++++++++++
pixman/pixman-version.h.in | 46 +++++++++++++++++++++++++++
pixman/pixman.h | 8 +++++
6 files changed, 138 insertions(+), 4 deletions(-)
create mode 100644 pixman/pixman-version.c
create mode 100644 pixman/pixman-version.h.in
diff --git a/.gitignore b/.gitignore
index 2c736c1..70b7b64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ stamp-h?
config.h
config.h.in
.*.swp
+pixman/pixman-version.h
test/composite-test
test/fetch-test
test/gradient-test
diff --git a/configure.ac b/configure.ac
index 63ee2c5..e39f4c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,8 +72,12 @@ m4_define([lt_age], [pixman_minor])
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
-PIXMAN_MAJOR=pixman_major
-AC_SUBST(PIXMAN_MAJOR)
+PIXMAN_VERSION_MAJOR=pixman_major()
+AC_SUBST(PIXMAN_VERSION_MAJOR)
+PIXMAN_VERSION_MINOR=pixman_minor()
+AC_SUBST(PIXMAN_VERSION_MINOR)
+PIXMAN_VERSION_MICRO=pixman_micro()
+AC_SUBST(PIXMAN_VERSION_MICRO)
AC_SUBST(LT_VERSION_INFO)
@@ -212,4 +216,5 @@ AC_SUBST(DEP_LIBS)
AC_OUTPUT([pixman-1.pc
Makefile
pixman/Makefile
+ pixman/pixman-version.h
test/Makefile])
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index 37d892b..ff3997b 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -21,10 +21,11 @@ libpixman_1_la_SOURCES = \
pixman-edge-imp.h \
pixman-trap.c \
pixman-compute-region.c \
- pixman-timer.c
+ pixman-timer.c \
+ pixman-version.c
libpixmanincludedir = $(includedir)/pixman-1/
-libpixmaninclude_HEADERS = pixman.h
+libpixmaninclude_HEADERS = pixman.h pixman-version.h
# mmx code
if USE_MMX
diff --git a/pixman/pixman-version.c b/pixman/pixman-version.c
new file mode 100644
index 0000000..58ac057
--- /dev/null
+++ b/pixman/pixman-version.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Carl D. Worth <cworth at cworth.org>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pixman-private.h"
+
+/**
+ * pixman_version:
+ *
+ * Returns the version of the pixman library encoded in a single
+ * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that
+ * later versions compare greater than earlier versions.
+ *
+ * A run-time comparison to check that pixman's version is greater than
+ * or equal to version X.Y.Z could be performed as follows:
+ *
+ * <informalexample><programlisting>
+ * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...}
+ * </programlisting></informalexample>
+ *
+ * See also pixman_version_string() as well as the compile-time
+ * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING.
+ *
+ * Return value: the encoded version.
+ **/
+int
+pixman_version (void)
+{
+ return PIXMAN_VERSION;
+}
+
+/**
+ * pixman_version_string:
+ *
+ * Returns the version of the pixman library as a human-readable string
+ * of the form "X.Y.Z".
+ *
+ * See also pixman_version() as well as the compile-time equivalents
+ * %PIXMAN_VERSION_STRING and %PIXMAN_VERSION.
+ *
+ * Return value: a string containing the version.
+ **/
+const char*
+pixman_version_string (void)
+{
+ return PIXMAN_VERSION_STRING;
+}
diff --git a/pixman/pixman-version.h.in b/pixman/pixman-version.h.in
new file mode 100644
index 0000000..ce86312
--- /dev/null
+++ b/pixman/pixman-version.h.in
@@ -0,0 +1,46 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Carl D. Worth <cworth at cworth.org>
+ */
+
+#ifndef PIXMAN_VERSION_H__
+#define PIXMAN_VERSION_H__
+
+#define PIXMAN_VERSION_MAJOR @PIXMAN_VERSION_MAJOR@
+#define PIXMAN_VERSION_MINOR @PIXMAN_VERSION_MINOR@
+#define PIXMAN_VERSION_MICRO @PIXMAN_VERSION_MICRO@
+
+#define PIXMAN_VERSION_STRING "@PIXMAN_VERSION_MAJOR at .@PIXMAN_VERSION_MINOR at .@PIXMAN_VERSION_MICRO@"
+
+#define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \
+ ((major) * 10000) \
+ + ((minor) * 100) \
+ + ((micro) * 1))
+
+#define PIXMAN_VERSION PIXMAN_VERSION_ENCODE( \
+ PIXMAN_VERSION_MAJOR, \
+ PIXMAN_VERSION_MINOR, \
+ PIXMAN_VERSION_MICRO)
+
+#endif /* PIXMAN_VERSION_H__ */
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 2965acd..c4c5c3b 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -69,6 +69,8 @@ SOFTWARE.
#ifndef PIXMAN_H__
#define PIXMAN_H__
+#include <pixman-version.h>
+
/*
* Standard integers
*/
@@ -272,6 +274,12 @@ typedef enum
PIXMAN_REGION_PART
} pixman_region_overlap_t;
+PIXMAN_EXPORT
+int pixman_version (void);
+
+PIXMAN_EXPORT
+const char* pixman_version_string (void);
+
/* This function exists only to make it possible to preserve the X ABI - it should
* go away at first opportunity.
*/
--
1.5.5.rc0.24.g86c30
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080324/71fea718/attachment.pgp
More information about the cairo
mailing list