Revision: 110506 https://trac.macports.org/changeset/110506 Author: blair@macports.org Date: 2013-08-31 14:22:40 -0700 (Sat, 31 Aug 2013) Log Message: ----------- serf1: shared library fixes: fix install_name and 10.4 build; closes #40155. Instead of using a install_name of $prefix/lib/libserf-1.3.0.0.dylib use $prefix/lib/libserf-1.dylib which fixes a problem when serf 1.4.x would be released. Only link with one -compatibility_version flag to fix an issue on 10.4. Modified Paths: -------------- trunk/dports/www/serf1/Portfile Added Paths: ----------- trunk/dports/www/serf1/files/ trunk/dports/www/serf1/files/patch-SConstruct.diff Modified: trunk/dports/www/serf1/Portfile =================================================================== --- trunk/dports/www/serf1/Portfile 2013-08-31 20:17:06 UTC (rev 110505) +++ trunk/dports/www/serf1/Portfile 2013-08-31 21:22:40 UTC (rev 110506) @@ -23,6 +23,8 @@ checksums sha1 b8c8e12e7163d7bacf9be0ea4aaa7b8c32e8c72c \ sha256 fc785d0df9c0f4debadae19a3549542d173ca62a1f3f36668b3b1251209f5d9a +patchfiles patch-SConstruct.diff + platforms darwin depends_build port:scons @@ -39,6 +41,10 @@ CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \ LINKFLAGS="${configure.ldflags} [get_canonical_archflags ld]" +platform darwin 8 { + build.args-append CC="MACOSX_DEPLOYMENT_TARGET=10.4 ${configure.cc}" +} + build.target APR=${prefix} \ APU=${prefix} \ OPENSSL=${prefix} \ Added: trunk/dports/www/serf1/files/patch-SConstruct.diff =================================================================== --- trunk/dports/www/serf1/files/patch-SConstruct.diff (rev 0) +++ trunk/dports/www/serf1/files/patch-SConstruct.diff 2013-08-31 21:22:40 UTC (rev 110506) @@ -0,0 +1,35 @@ +diff -ru ../serf-1.3.1.orig/SConstruct ./SConstruct +--- ../serf-1.3.1.orig/SConstruct 2013-08-15 02:13:20.000000000 -0700 ++++ ./SConstruct 2013-08-31 14:10:43.000000000 -0700 +@@ -204,9 +204,9 @@ + libdir = '$LIBDIR' + incdir = '$PREFIX/include/serf-$MAJOR' + +-env['SHLIBVERSION']='${MINOR}.0.0' ++env['SHLIBVERSION'] = '%d.%d.%d' % (MAJOR, MINOR, PATCH) + +-LIBNAME = 'libserf-${MAJOR}' ++LIBNAME = 'libserf-%d' % (MAJOR,) + if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME + else: +@@ -218,10 +218,6 @@ + if sys.platform == 'darwin': + # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) +- # 'man ld' says positive non-zero for the first number, so we add one. +- # Mac's interpretation of compatibility is the same as our MINOR version. +- env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) +- env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + + if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these +@@ -401,7 +397,7 @@ + # to a path in the sandbox. The shared library install name (id) should be the + # final targat path. + install_shared_path = install_shared[0].abspath +- target_install_shared_path = os.path.join(libdir, lib_shared[0].name) ++ target_install_shared_path = os.path.join(libdir, '%s.dylib' % LIBNAME) + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (target_install_shared_path, + install_shared_path)))
participants (1)
-
blair@macports.org