Skip to content

Commit

Permalink
Fix a couple more 0.7 deprecations (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored Jan 20, 2018
1 parent 4959cd5 commit 9258820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
URIParser
SHA
Compat 0.44.0
Compat 0.46.0
4 changes: 2 additions & 2 deletions src/BinDeps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ lower(s) = (c=SynchronousStepCollection();lower(s,c);c)
function lower(s::AutotoolsDependency,collection)
prefix = s.prefix
if Compat.Sys.iswindows()
prefix = replace(replace(s.prefix,"\\","/"),"C:/","/c/")
prefix = replace(replace(s.prefix, "\\" => "/"), "C:/" => "/c/")
end
cmdstring = "pwd && ./configure --prefix=$(prefix) "*join(s.configure_options," ")

Expand Down Expand Up @@ -581,7 +581,7 @@ function glibc_version()
ptr = Libdl.dlsym_e(libc, :gnu_get_libc_version)
ptr == C_NULL && return # non-glibc
v = unsafe_string(ccall(ptr, Ptr{UInt8}, ()))
ismatch(Base.VERSION_REGEX, v) ? VersionNumber(v) : nothing
contains(v, Base.VERSION_REGEX) ? VersionNumber(v) : nothing
end

include("dependencies.jl")
Expand Down
6 changes: 3 additions & 3 deletions src/dependencies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function package_available(p::BSDPkg)
can_use(BSDPkg) || return false
rgx = Regex(string("^(", p.package, ")(\\s+.+)?\$"))
for line in eachline(`pkg search -L name $(p.package)`)
ismatch(rgx, line) && return true
contains(line, rgx) && return true
end
return false
end
Expand All @@ -258,9 +258,9 @@ function available_version(p::BSDPkg)
rawversion = chomp(line[findfirst(c->c==':', line)+2:end])
# Chop off the port revision and epoch by removing everything after and
# including the first underscore
libversion = replace(rawversion, r"_.+$", "")
libversion = replace(rawversion, r"_.+$" => "")
# This should be a valid version, but it's still possible that it isn't
if ismatch(Base.VERSION_REGEX, libversion)
if contains(libversion, Base.VERSION_REGEX)
return VersionNumber(libversion)
else
error("\"$rawversion\" is not recognized as a version. Please report this to BinDeps.jl.")
Expand Down

0 comments on commit 9258820

Please sign in to comment.