Skip to content

Commit 9e7be39

Browse files
committed
Allow -SOVERSION in matching files
Fixes JuliaPackaging#52
1 parent a6a0e52 commit 9e7be39

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Wizard.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,16 @@ end
167167
Given a filename, normalize it, stripping out extensions. E.g. the file path
168168
`"foo/libfoo.tar.gz"` would get mapped to `"libfoo"`.
169169
"""
170-
function normalize_name(file::AbstractString)
170+
function normalize_name(file::AbstractString, )
171171
file = basename(file)
172172
idx = findfirst(file, '.')
173173
if idx != 0
174-
return file[1:prevind(file, idx)]
174+
file = file[1:prevind(file, idx)]
175+
end
176+
# String -123, which is a common thing for libraries on windows
177+
idx = findlast(file, '-')
178+
if idx != 0 && all(isnumber, file[nextind(file, idx):end])
179+
file = file[1:prevind(file, idx)]
175180
end
176181
return file
177182
end

0 commit comments

Comments
 (0)