Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ifs
sconsider
Commits
df64c0be
Commit
df64c0be
authored
Jun 21, 2020
by
Marcel Huber
Browse files
version re adapted to allow for major version lib only too
parent
746f21ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
SConsider/LibFinder.py
View file @
df64c0be
...
...
@@ -224,7 +224,7 @@ def versionedLibVersion(dest, source, env):
else
:
libname
=
os
.
path
.
basename
(
str
(
dest
))
shlib_suffix
=
env
.
subst
(
'$SHLIBSUFFIX'
)
version_pattern
=
r
'(?P<version>(?P<major>[0-9]+)\.(?P<minor>[0-9]+)(\.
?
(?P<patch>[0-9a-zA-Z]+))?)'
version_pattern
=
r
'(?P<version>(?P<major>[0-9]+)
(
\.(?P<minor>[0-9]+)(\.(?P<patch>[0-9a-zA-Z]+))?)
?)
'
version
=
None
versioned_re
=
re
.
compile
(
r
'(?P<libname>.*)(?P<suffix>'
+
re
.
escape
(
shlib_suffix
)
+
r
')\.'
+
version_pattern
)
...
...
@@ -232,15 +232,13 @@ def versionedLibVersion(dest, source, env):
linknames
=
[]
if
result
:
version
=
result
.
group
(
'version'
)
if
version
and
version
.
count
(
"."
)
>=
1
:
if
version
is
not
None
:
# For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x
# First linkname has no version number
linkname
=
result
.
group
(
'libname'
)
+
result
.
group
(
'suffix'
)
linknames
.
append
(
linkname
)
major_name
=
linkname
+
"."
+
result
.
group
(
'major'
)
for
linkname
in
[
major_name
,
]:
linknames
.
append
(
linkname
)
for
topdownversion
in
[
result
.
group
(
'major'
),
result
.
group
(
'minor'
)]:
if
topdownversion
is
not
None
:
linknames
.
append
(
linkname
)
linkname
=
linkname
+
"."
+
topdownversion
return
(
version
,
linknames
)
SConsider/site_tools/TargetMaker.py
View file @
df64c0be
...
...
@@ -31,7 +31,7 @@ class TargetMaker(object):
self
.
targetlist
=
tlist
.
copy
()
self
.
registry
=
registry
self
.
lookupStack
=
[]
self
.
version_re_str
=
r
'(\.[0-9]+\.[0-9]+(\.[0-9a-zA-Z]+)?)?'
self
.
version_re_str
=
r
'(\.[0-9]+
(
\.[0-9]+(\.[0-9a-zA-Z]+)?)?
)?
'
def
pushItem
(
self
,
current_target
):
self
.
lookupStack
.
append
(
current_target
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment