Skip to content

Commit

Permalink
update build.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
jey committed Nov 3, 2016
1 parent a97e6e6 commit 8422c2a
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
## - https://github.com/JuliaOpt/NLopt.jl/blob/master/src/NLopt.jl
##

if Base.OS_NAME != :Linux
error("currently, this library only supports Linux")
end


# get the current path
currentFilePath = @__FILE__()
currentDirPath = dirname(currentFilePath)
Expand All @@ -31,7 +26,6 @@ end
function runmake()
usrdir = joinpath(currentDirPath, "usr", "lib");
run(`make OUTPUTDIR=$(usrdir)`)
run(`rm -r $(currentDirPath)/Lbfgsb.3.0`)
end

# write the "deps.jl" file
Expand All @@ -42,41 +36,6 @@ function writeDeps()
close(outputfile)
end

# get the source, untar it and then delete
function getSource()

url = "http://users.iems.northwestern.edu/~nocedal/Software/Lbfgsb.3.0.tar.gz"

# decide which downloader is available copied from BinDeps.jl
downloader = nothing;
for checkcmd in (:curl, :wget, :fetch)
try
if success(`$checkcmd --help`)
downloader = checkcmd
break
end
catch
continue
end
end

downloadcmd = nothing;
if downloader == :wget
downloadcmd = `wget -O $(currentDirPath)/solver.tar.gz $url`
elseif downloader == :curl
downloadcmd = `curl -o $(currentDirPath)/solver.tar.gz $url`
elseif downloadcmd == :fetch
downloadcmd = `fetch -f $(currentDirPath)/solver.tar.gz $url`
else
error("No download agent available; install curl, wget, or fetch.")
end

run(downloadcmd)
run(`tar xf $(currentDirPath)/solver.tar.gz`)
run(`rm $(currentDirPath)/solver.tar.gz`)
end

getSource()
mklibdir()
runmake()
writeDeps()

0 comments on commit 8422c2a

Please sign in to comment.