httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+apa...@sunstarsys.com>
Subject Re: [PATCH] Re: apr-related ABI issues for apreq2 packagers
Date Tue, 01 Feb 2005 08:50:07 GMT
Joe Schaefer <joe+gmane@sunstarsys.com> writes:

[...]

> I'd like to commit this patch to trunk, but first am looking 
> for feedback on the general concept.

Oops, looks like some of the build/get-version.sh 
sections of the patch are missing. I'm not sure how 
that happened.  Here's the full patch again; sorry 
for the inconvenience.

Index: build/get-version.sh
===================================================================
--- build/get-version.sh	(revision 125283)
+++ build/get-version.sh	(working copy)
@@ -8,12 +8,13 @@
 #
 #   get-version.sh all returns a dotted version number
 #   get-version.sh major returns just the major version number
-#   get-version.sh libtool returns a version "libtool -version-info" format
+#   get-version.sh minor returns just the minor version number
+#   get-version.sh patch returns just the match version number
 #
 
 if test $# != 3; then
   echo "USAGE: $0 CMD INCLUDEDIR PREFIX"
-  echo "  where CMD is one of: all, major, libtool"
+  echo "  where CMD is one of: all, major, minor, patch"
   exit 1
 fi
 
@@ -23,14 +24,15 @@
 major="`sed -n $major_sed $2`"
 minor="`sed -n $minor_sed $2`"
 patch="`sed -n $patch_sed $2`"
-ltmaj="`expr $major + $minor`"
 
 if test "$1" = "all"; then
   echo ${major}.${minor}.${patch}
 elif test "$1" = "major"; then
   echo ${major}
-elif test "$1" = "libtool"; then
-  echo ${ltmaj}:${patch}:${minor}
+elif test "$1" = "minor"; then
+  echo ${minor}
+elif test "$1" = "patch"; then
+  echo ${patch}
 else
   echo "ERROR: unknown version CMD ($1)"
   exit 1
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 125283)
+++ acinclude.m4	(working copy)
@@ -53,7 +53,7 @@
                 APACHE2_INCLUDES=-I`$APACHE2_APXS -q INCLUDEDIR`
 
                 APR_MAJOR_VERSION=`$APACHE2_APXS -q APR_VERSION 2>/dev/null | cut -d.
-f 1`
-                if test ${APR_MAJOR_VERSION:=0} -eq 0; then
+                if test ${APR_MAJOR_VERSION:="0"} -eq 0; then
                     apr_config=apr-config
                     apu_config=apu-config 
                 else
@@ -168,10 +168,20 @@
         get_version="$abs_srcdir/build/get-version.sh"
         version_hdr="$abs_srcdir/src/apreq_version.h"
 
-        APREQ_LIBTOOL_VERSION=`$get_version libtool $version_hdr APREQ`
+        # set version data
+
         APREQ_MAJOR_VERSION=`$get_version major $version_hdr APREQ`
-        APREQ_DOTTED_VERSION=`$get_version all $version_hdr APREQ`
+        APREQ_MINOR_VERSION=`$get_version minor $version_hdr APREQ`
+        APREQ_PATCH_VERSION=`$get_version patch $version_hdr APREQ`
+        APREQ_DOTTED_VERSION=`$get_version all  $version_hdr APREQ`
 
+        # XXX: APR_MAJOR_VERSION doesn't yet work for static builds
+        APREQ_LIBTOOL_CURRENT=`expr $APREQ_MAJOR_VERSION + $APREQ_MINOR_VERSION + $APR_MAJOR_VERSION`
+        APREQ_LIBTOOL_REVISION=$APREQ_PATCH_VERSION
+        APREQ_LIBTOOL_AGE=$APREQ_MINOR_VERSION
+
+        APREQ_LIBTOOL_VERSION="$APREQ_LIBTOOL_CURRENT:$APREQ_LIBTOOL_REVISION:$APREQ_LIBTOOL_AGE"
+
         APREQ_LIBNAME="apreq$APREQ_MAJOR_VERSION"
         APREQ_INCLUDES=""
         APREQ_LDFLAGS=""

-- 
Joe Schaefer

Mime
View raw message