Revision: 73043
          http://sourceforge.net/p/brlcad/code/73043
Author:   starseeker
Date:     2019-05-10 21:09:07 +0000 (Fri, 10 May 2019)
Log Message:
-----------
Make it easy to define an errata version of a release if needed.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/include/brlcad_version.h.in

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2019-05-10 20:55:14 UTC (rev 73042)
+++ brlcad/trunk/CMakeLists.txt 2019-05-10 21:09:07 UTC (rev 73043)
@@ -96,6 +96,9 @@
 string(STRIP ${BRLCAD_VERSION_PATCH} BRLCAD_VERSION_PATCH)
 
 set(BRLCAD_VERSION 
"${BRLCAD_VERSION_MAJOR}.${BRLCAD_VERSION_MINOR}.${BRLCAD_VERSION_PATCH}")
+if(DEFINED BRLCAD_VERSION_ERRATA)
+  set(BRLCAD_VERSION "${BRLCAD_VERSION}-${BRLCAD_VERSION_ERRATA}")
+endif(DEFINED BRLCAD_VERSION_ERRATA)
 
 #---------------------------------------------------------------------
 # Let CMake know where to look for our counting file for configuration
@@ -940,6 +943,11 @@
 CONFIG_H_APPEND(BRLCAD "#define BRLCAD_DOC_DIR \"${DOC_DIR}\"\n")
 CONFIG_H_APPEND(BRLCAD "#define BRLCAD_MAN_DIR \"${MAN_DIR}\"\n")
 
+# Define the errata version if we have one
+if(DEFINED BRLCAD_VERSION_ERRATA)
+  CONFIG_H_APPEND(BRLCAD "#define BRLCAD_VERSION_ERRATA 
${BRLCAD_VERSION_ERRATA}\n")
+endif(DEFINED BRLCAD_VERSION_ERRATA)
+
 #----------------------------------------------------------------------
 # If we're not debugging, we want HIDDEN to be defined as static.  Set
 # the NDEBUG flag accordingly, and common.h will take it from there.
@@ -3349,7 +3357,11 @@
     set(CPACK_RPM_SPEC_INSTALL_POST /bin/true)
 
     if(CPACK_RPM_VERSION)
-      set(CPACK_RPM_PACKAGE_NAME 
"brlcad_${BRLCAD_VERSION_MAJOR}_${BRLCAD_VERSION_MINOR}_${BRLCAD_VERSION_PATCH}")
+      if(DEFINED BRLCAD_VERSION_ERRATA)
+       set(CPACK_RPM_PACKAGE_NAME 
"brlcad_${BRLCAD_VERSION_MAJOR}_${BRLCAD_VERSION_MINOR}_${BRLCAD_VERSION_PATCH}_${BRLCAD_VERSION_ERRATA}")
+      else(DEFINED BRLCAD_VERSION_ERRATA)
+       set(CPACK_RPM_PACKAGE_NAME 
"brlcad_${BRLCAD_VERSION_MAJOR}_${BRLCAD_VERSION_MINOR}_${BRLCAD_VERSION_PATCH}")
+      endif(DEFINED BRLCAD_VERSION_ERRATA)
       # If we've got a Redhat release, include some info about the specific 
release in the name.
       # Otherwise, just go generic.
       if(EXISTS /etc/redhat-release)

Modified: brlcad/trunk/include/brlcad_version.h.in
===================================================================
--- brlcad/trunk/include/brlcad_version.h.in    2019-05-10 20:55:14 UTC (rev 
73042)
+++ brlcad/trunk/include/brlcad_version.h.in    2019-05-10 21:09:07 UTC (rev 
73043)
@@ -119,9 +119,12 @@
 /**
  * Run-time string of the "MAJOR.MINOR.PATCH" version number.
  */
+#if !defined(BRLCAD_VERSION_ERRATA)
 static char BRLCAD_VERSION[32] = NUM2STR(BRLCAD_VERSION_MAJOR) "." 
NUM2STR(BRLCAD_VERSION_MINOR) "." NUM2STR(BRLCAD_VERSION_PATCH);
+#else
+static char BRLCAD_VERSION[32] = NUM2STR(BRLCAD_VERSION_MAJOR) "." 
NUM2STR(BRLCAD_VERSION_MINOR) "." NUM2STR(BRLCAD_VERSION_PATCH) "-" 
NUM2STR(BRLCAD_VERSION_ERRATA);
+#endif
 
-
 __BEGIN_DECLS
 
 /**

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to