On Thu, Sep 05, 2013 at 12:32:45PM -0400, Brad Smith wrote:
> On 05/09/13 9:57 AM, Stefan Sperling wrote:
> >On Thu, Sep 05, 2013 at 02:24:03PM +0100, Stuart Henderson wrote:
> >>On 2013/09/05 14:43, Stefan Sperling wrote:
> >>>On Wed, Sep 04, 2013 at 02:50:44PM -0400, Brad Smith wrote:
> >>>>The soname command line parameter should just be removed on the line
> >>>>below what is being modified.
> >>>
> >>>That would likely make it work. But I don't think we could push
> >>>such a patch upstream.
> >>
> >>Hmm, why not? Obviously it would need to be conditional on OS
> >
> >I couldn't tell from Brad's comment whether he meant it to be
> >OS-dependent or just the simple one-line removal hack.
> >
> >I'm working with the upstream devs now.
> 
> Well what goes into the ports tree and how the issue is ultimately
> fixed upstream doesn't have to be the same but the goal is to
> eventually have it fixed properly upstream. The upstream fix would
> be OS dependent.

Here's a new diff that was discussed with upstream. They haven't
committed it yet but they didn't raise concerns about this.

Is this fine?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/scons/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile    5 Jul 2013 20:09:59 -0000       1.17
+++ Makefile    4 Sep 2013 17:16:15 -0000
@@ -3,6 +3,7 @@
 COMMENT=       Python-based build system
 
 VERSION =      2.3.0
+REVISION =     1
 DISTNAME=      scons-${VERSION}
 CATEGORIES=    devel
 
Index: patches/patch-engine_SCons_Tool___init___py
===================================================================
RCS file: patches/patch-engine_SCons_Tool___init___py
diff -N patches/patch-engine_SCons_Tool___init___py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-engine_SCons_Tool___init___py 16 Sep 2013 09:43:49 -0000
@@ -0,0 +1,40 @@
+$OpenBSD$
+http://scons.tigris.org/issues/show_bug.cgi?id=2916
+--- engine/SCons/Tool/__init__.py.orig Sun Mar  3 15:48:39 2013
++++ engine/SCons/Tool/__init__.py      Thu Sep  5 15:40:24 2013
+@@ -257,6 +257,10 @@ def VersionShLibLinkNames(version, libname, env):
+             print "VersionShLibLinkNames: linkname = ",linkname
+         linknames.append(linkname)
+     elif platform == 'posix':
++        if sys.platform.startswith('openbsd'):
++            # OpenBSD uses x.y shared library versioning numbering convention
++            # and doesn't use symlinks to backwards-compatible libraries
++            return []
+         # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x
+         suffix_re = re.escape(shlib_suffix + '.' + version)
+         # First linkname has no version number
+@@ -302,13 +306,17 @@ symlinks for the platform we are on"""
+     if version:
+         # set the shared library link flags
+         if platform == 'posix':
+-            suffix_re = re.escape(shlib_suffix + '.' + version)
+-            (major, age, revision) = version.split(".")
+-            # soname will have only the major version number in it
+-            soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major
+-            shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ]
+-            if Verbose:
+-                print " soname ",soname,", shlink_flags ",shlink_flags
++            shlink_flags += [ '-Wl,-Bsymbolic' ]
++            if sys.platform.startswith('openbsd'):
++                pass # OpenBSD doesn't usually use SONAME for libraries
++            else:
++                suffix_re = re.escape(shlib_suffix + '.' + version)
++                (major, age, revision) = version.split(".")
++                # soname will have only the major version number in it
++                soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + 
major
++                shlink_flags += [ '-Wl,-soname=%s' % soname ]
++                if Verbose:
++                    print " soname ",soname,", shlink_flags ",shlink_flags
+         elif platform == 'cygwin':
+             shlink_flags += [ '-Wl,-Bsymbolic',
+                               '-Wl,--out-implib,${TARGET.base}.a' ]

Reply via email to