]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Update shared library version computation for upcoming 3.0.0a release.
authorTim Kientzle <kientzle@gmail.com>
Sun, 6 Nov 2011 20:41:49 +0000 (15:41 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 6 Nov 2011 20:41:49 +0000 (15:41 -0500)
SVN-Revision: 3754

CMakeLists.txt
configure.ac

index e16ff47b00f5949a47ece6bc362d8f4b024a928b..03dbefd5bc5692315bfc66cf492dabfa1d784101 100644 (file)
@@ -34,8 +34,17 @@ SET(BSDCPIO_VERSION_STRING     "${VERSION}")
 SET(BSDTAR_VERSION_STRING      "${VERSION}")
 SET(LIBARCHIVE_VERSION_NUMBER  "${_version_number}")
 SET(LIBARCHIVE_VERSION_STRING  "${VERSION}")
-# Shared library number
-SET(SOVERSION                   8)
+
+# INTERFACE_VERSION increments with every release
+# libarchive 2.7 == interface version 9 = 2 + 7 
+# libarchive 2.8 == interface version 10 = 2 + 8
+# libarchive 3.0 == interface version 11
+# libarchive 3.x == interface version 11 + x
+math(EXPR INTERFACE_VERSION  "11 + ${_minor}")
+
+# Set SOVERSION == Interface version
+# ?? Should there be more here ??
+SET(SOVERSION "${INTERFACE_VERSION}")
 
 # Especially for early development, we want to be a little
 # aggressive about diagnosing build problems; this can get
index 7a67a8303f3e6f75db50e2df40ef77bda98a4b12..14b6290505a53997711207fe0583abdaa8c780ad 100644 (file)
@@ -27,14 +27,19 @@ AC_CONFIG_MACRO_DIR([build/autoconf])
 # Must follow AC_CONFIG macros above...
 AM_INIT_AUTOMAKE()
 
-# Libtool versioning uses different conventions on different
-# platforms.  At least on FreeBSD, libtool uses an overly complex
-# convention that attempts to solve problems that most people just
-# don't have and which just causes confusion for most end users.
-ARCHIVE_MAJOR=$(( LIBARCHIVE_VERSION_N() / 1000000 ))
+# Libtool's "interface version" can be computed from the libarchive version.
+
+# Libtool interface version bumps on any API change, so increments
+# whenever libarchive minor version does.
 ARCHIVE_MINOR=$(( (LIBARCHIVE_VERSION_N() / 1000) % 1000 ))
+# Libarchive 2.7 == libtool interface 9 = 2 + 7
+# Libarchive 2.8 == libtool interface 10 = 2 + 8
+# Libarchive 3.0 == libtool interface 11 (assumes there's no libarchive 2.9)
+# Libarchive 3.x == libtool interface 11 + x
+ARCHIVE_LIBTOOL_MAJOR=`echo $((11 + ${ARCHIVE_MINOR}))`
+# Libarchive revision is bumped on any source change === libtool revision
 ARCHIVE_REVISION=$(( LIBARCHIVE_VERSION_N() % 1000 ))
-ARCHIVE_LIBTOOL_MAJOR=`echo $((${ARCHIVE_MAJOR} + ${ARCHIVE_MINOR}))`
+# Libarchive minor is bumped on any interface addition === libtool age
 ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_LIBTOOL_MAJOR:$ARCHIVE_REVISION:$ARCHIVE_MINOR
 
 # Stick the version numbers into config.h