serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1831201 - /serf/trunk/SConstruct
Date Tue, 08 May 2018 18:42:42 GMT
Author: brane
Date: Tue May  8 18:42:42 2018
New Revision: 1831201

URL: http://svn.apache.org/viewvc?rev=1831201&view=rev
Log:
Hack the library versions back into macOS dynamic libraries.

* SConstruct: Use explicit linker flags to set macOS .dylib options
   current_version and compatibility_version, which were broken by
   the SCons 2.4.1 release.

Modified:
    serf/trunk/SConstruct

Modified: serf/trunk/SConstruct
URL: http://svn.apache.org/viewvc/serf/trunk/SConstruct?rev=1831201&r1=1831200&r2=1831201&view=diff
==============================================================================
--- serf/trunk/SConstruct (original)
+++ serf/trunk/SConstruct Tue May  8 18:42:42 2018
@@ -231,13 +231,18 @@ libdir = '$LIBDIR'
 incdir = '$PREFIX/include/serf-$MAJOR'
 
 # This version string is used in the dynamic library name, and for Mac OS X also
-# for the current_version and compatibility_version options in the .dylib
-#
-# Unfortunately we can't set the .dylib compatibility_version option separately
-# from current_version, so don't use the PATCH level to avoid that build and
-# runtime patch levels have to be identical.
+# for the compatibility_version option in the .dylib.
+soversion = '%d.%d.%d' % (MAJOR, MINOR, 0)
+libversion = '%d.%d.%d' % (MAJOR, MINOR, PATCH)
 if sys.platform != 'sunos5':
-  env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, 0)
+  env['SHLIBVERSION'] = soversion
+
+# XXX Since SCons 2.4.1, the SHLIBVERSION variable is no longer used to set the
+# shared library versions on Mac OS X, so we add explicit linker flags to set
+# the current_version and compatibility_version options.
+if sys.platform == 'darwin':
+  env.Append(LINKFLAGS=['-Wl,-current_version,' + libversion,
+                        '-Wl,-compatibility_version,' + soversion])
 
 LIBNAME   = '%sserf-%d' % (env['LIBPREFIX'], MAJOR)
 if sys.platform == 'win32':



Mime
View raw message