Skip to content

Instantly share code, notes, and snippets.

@jfsantos
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfsantos/73bbfcfd81a0d83aec11 to your computer and use it in GitHub Desktop.
Save jfsantos/73bbfcfd81a0d83aec11 to your computer and use it in GitHub Desktop.
BinDeps OSX problem
using BinDeps
@BinDeps.setup
@unix_only begin
ecos = library_dependency("ecos",aliases=["libecos"])
end
provides(Sources, URI("https://github.com/ifa-ethz/ecos/archive/master.zip"),
[ecos], os = :Unix, unpacked_dir="ecos-master")
prefix = joinpath(BinDeps.depsdir(ecos),"usr")
srcdir = joinpath(BinDeps.depsdir(ecos),"src","ecos-master/")
provides(SimpleBuild,
(@build_steps begin
GetSources(ecos)
CreateDirectory(joinpath(prefix,"lib"))
FileRule(joinpath(prefix,"lib","libecos.so"),@build_steps begin
ChangeDirectory(srcdir)
`cat ${BinDeps.depsdir(ecos)}/make-so.patch` |> `patch Makefile`
`cat ${BinDeps.depsdir(ecos)}/ecos-fpic.patch` |> `patch ecos.mk`
`make ecos.dylib`
`mv libecos.dylib $prefix/lib`
`ln -s $prefix/lib/libecos.dylib $prefix/lib/libecos.so`
end)
end),[ecos], os = :Unix)
@BinDeps.install [:ecos => :ecos]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment