fix scons weird sonames

Starting with 4.1 scons started to fill sonames on OpenBSD too but with
the major alone and not with the "major.minor"; this forces it to use
the correct format (which also makes `make port-lib-depends-check'
happy.)

prodded, tested by and ok sthen@
This commit is contained in:
op 2022-03-31 16:33:31 +00:00
parent 41b96e370c
commit 0deac90bd2
2 changed files with 18 additions and 0 deletions

View File

@ -3,6 +3,7 @@ COMMENT= Python-based build system
MODPY_EGG_VERSION= 4.3.0
DISTNAME= SCons-${MODPY_EGG_VERSION}
PKGNAME= ${DISTNAME:L}
REVISION= 0
CATEGORIES= devel
HOMEPAGE= https://www.scons.org/

View File

@ -0,0 +1,17 @@
generate a soname that respects SHARED_LIBS
Index: SCons/Tool/linkCommon/SharedLibrary.py
--- SCons/Tool/linkCommon/SharedLibrary.py.orig
+++ SCons/Tool/linkCommon/SharedLibrary.py
@@ -93,9 +93,8 @@ def _soversion(target, source, env, for_signature):
if "SOVERSION" in env:
return ".$SOVERSION"
elif "SHLIBVERSION" in env:
- shlibversion = env.subst("$SHLIBVERSION")
- # We use only the most significant digit of SHLIBVERSION
- return "." + shlibversion.split(".")[0]
+ shlibversion = env.subst("$SHLIBVERSION").split(".")
+ return "." + shlibversion[0] + "." + shlibversion[1]
else:
return ""