Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2006:
[Freeciv-Dev] (PR#17710) put capstring into version.in
Home

[Freeciv-Dev] (PR#17710) put capstring into version.in

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#17710) put capstring into version.in
From: "Jason Dorje Short" <jdorje@xxxxxxxxx>
Date: Wed, 7 Jun 2006 14:00:40 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17710 >

This patch adds the capstring to version.in.

This is needed because, at least for GGZ, the capstring needs to be part 
of the configuration files.  This will most likely be useful for publite 
as well.

This is for 2.1 but a similar patch will apply to the dev version.

-jason

Index: m4/version.m4
===================================================================
--- m4/version.m4       (revision 12012)
+++ m4/version.m4       (working copy)
@@ -19,3 +19,4 @@
 AC_DEFUN([FREECIV_BETA_VERSION], [IS_BETA_VERSION="$1"])
 AC_DEFUN([FREECIV_NEXT_VERSION], [NEXT_STABLE_VERSION="$1"])
 AC_DEFUN([FREECIV_RELEASE_MONTH], [RELEASE_MONTH="$1"])
+AC_DEFUN([FREECIV_NETWORK_CAPSTRING], [NETWORK_CAPSTRING="$1"])
Index: version.in
===================================================================
--- version.in  (revision 12012)
+++ version.in  (working copy)
@@ -13,3 +13,15 @@
 
 FREECIV_NEXT_VERSION("2.1.0")
 FREECIV_RELEASE_MONTH(6)
+
+# Freeciv network capstring: see documentation in common/capstr.c
+#
+# +2.1b is the base capability string.
+#
+#   - No new manditory capabilities can be added to the release branch; doing
+#     so would break network capability of supposedly "compatible" releases.
+#
+#   - Avoid adding a new manditory capbility to the development branch for
+#     as long as possible.  We want to maintain network compatibility with
+#     the stable branch for as long as possible.
+FREECIV_NETWORK_CAPSTRING("+2.1b")
Index: configure.ac
===================================================================
--- configure.ac        (revision 12012)
+++ configure.ac        (working copy)
@@ -38,6 +38,10 @@
 AC_SUBST(MAJOR_VERSION)
 AC_SUBST(MINOR_VERSION)
 
+AC_DEFINE_UNQUOTED(NETWORK_CAPSTRING, "$NETWORK_CAPSTRING",
+                  [Network capability string])
+AC_SUBST(NETWORK_CAPSTRING)
+
 dnl Initialize automake stuff
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
 
Index: data/civserver.dsc.in
===================================================================
--- data/civserver.dsc.in       (revision 12012)
+++ data/civserver.dsc.in       (working copy)
@@ -12,7 +12,7 @@
 
 [Protocol]
 Engine = Freeciv
-Version = @MAJOR_VERSION@.@MINOR_VERSION@
+Version = @NETWORK_CAPSTRING@
 
 [TableOptions]
 AllowLeave = 1
Index: data/civclient.dsc.in
===================================================================
--- data/civclient.dsc.in       (revision 12012)
+++ data/civclient.dsc.in       (working copy)
@@ -7,5 +7,5 @@
 Homepage = http://www.freeciv.org/
 Name = Freeciv
 ProtocolEngine = Freeciv
-ProtocolVersion = @MAJOR_VERSION@.@MINOR_VERSION@
+ProtocolVersion = @NETWORK_CAPSTRING@
 Version = @VERSION@
Index: common/capstr.c
===================================================================
--- common/capstr.c     (revision 12012)
+++ common/capstr.c     (working copy)
@@ -71,18 +71,9 @@
  * (The savefile and ruleset files have strings which are used similarly,
  * and checked by the same has_capability function, but the strings there
  * are not directly related to the capability strings discussed here.)
- */
-
-/* +2.1b is the base capability string.
  *
- *   - No new manditory capabilities can be added to the release branch; doing
- *     so would break network capability of supposedly "compatible" releases.
- *
- *   - Avoid adding a new manditory capbility to the development branch for
- *     as long as possible.  We want to maintain network compatibility with
- *     the stable branch for as long as possible.
+ * The actual capability string is now defined in version.in.
  */
-#define CAPABILITY "+2.1b"
 
 void init_our_capability(void)
 {
@@ -90,7 +81,7 @@
 
   s = getenv("FREECIV_CAPS");
   if (!s) {
-    s = CAPABILITY;
+    s = NETWORK_CAPSTRING;
   }
   sz_strlcpy(our_capability_internal, s);
 }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#17710) put capstring into version.in, Jason Dorje Short <=