Skip to content

Instantly share code, notes, and snippets.

@r9y9
Last active August 29, 2015 14:06
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 r9y9/5cb0f6885fe2f0470115 to your computer and use it in GitHub Desktop.
Save r9y9/5cb0f6885fe2f0470115 to your computer and use it in GitHub Desktop.
JuliaTokyo #2 で使う資料に載せるコード。BinDeps.jl の使用例
#!/bin/bash
function install_libsndfile() {
name=libsndfile-1.0.25.tar.gz
wget -O $name http://www.mega-nerd.com/libsndfile/files/$name
tar xzvf $name
cd `basename $name ".tar.gz"`
./configure --prefix=$PWD/..
make
make install
}
install_libsndfile
using BinDeps
@BinDeps.setup
libsndfile = library_dependency("libsndfile")
provides(AptGet, "libsndfile1-dev", libsndfile)
@osx_only begin
using Homebrew
provides(Homebrew.HB, "libsndfile", libsndfile)
end
@BinDeps.install [:libsndfile => :libsndfile]
using BinDeps
@BinDeps.setup
libsndfile = library_dependency("libsndfile")
const version = "1.0.25"
provides(Sources,
URI("http://www.mega-nerd.com/libsndfile/files/libsndfile-$(version).tar.gz"),
libsndfile)
prefix = joinpath(BinDeps.depsdir(libsndfile), "usr")
srcdir = joinpath(BinDeps.depsdir(libsndfile), "src", "libsndfile-$(version)")
provides(SimpleBuild,
(@build_steps begin
GetSources(libsndfile)
@build_steps begin
ChangeDirectory(srcdir)
`./configure --prefix=$prefix`
`make`
`make install`
end
end), libsndfile, os = :Unix)
@BinDeps.install [:libsndfile => :libsndfile]
run(`./build.sh`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment