Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Fix for Libdl moving to the stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jan 17, 2018
1 parent b14a877 commit 6cda171
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
@@ -1,4 +1,4 @@
julia 0.5
HttpCommon
BinDeps
Compat 0.7.20
Compat 0.27.0
12 changes: 8 additions & 4 deletions deps/build.jl
@@ -1,12 +1,16 @@
using BinDeps
using Compat

if VERSION >= v"0.7.0-DEV.3382"
using Libdl
end

@BinDeps.setup

version=v"2.7.1"

aliases = []
if is_windows()
if Compat.Sys.iswindows()
if Sys.WORD_SIZE == 64
aliases = ["libhttp_parser64"]
else
Expand All @@ -20,7 +24,7 @@ function validate_httpparser(name,handle)
p = Libdl.dlsym(handle, :http_parser_url_init)
return p != C_NULL
catch
if is_windows()
if Compat.Sys.iswindows()
warn("Looks like your binary is old. Please run `rm($(sprint(show, joinpath(dirname(@__FILE__), "usr"))); recursive = true)` to delete the old binary and then run `Pkg.build($(sprint(show, "HttpParser")))` again.")
end
return false
Expand All @@ -30,7 +34,7 @@ end
libhttp_parser = library_dependency("libhttp_parser", aliases=aliases,
validate=validate_httpparser)

if is_unix()
if Compat.Sys.isunix()
src_arch = "v$version.zip"
src_url = "https://github.com/nodejs/http-parser/archive/$src_arch"
src_dir = "http-parser-$version"
Expand Down Expand Up @@ -62,7 +66,7 @@ if is_unix()
end

# Windows
if is_windows()
if Compat.Sys.iswindows()
provides(Binaries,
URI("https://s3.amazonaws.com/julialang/bin/winnt/extras/libhttp_parser_2_7_1.zip"),
libhttp_parser, os = :Windows)
Expand Down

0 comments on commit 6cda171

Please sign in to comment.