openbsd-ports/devel/scons/patches/patch-SCons_Tool_linkCommon_SharedLibrary_py
op 0deac90bd2 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@
2022-03-31 16:33:31 +00:00

18 lines
665 B
Plaintext

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 ""