Last active
August 29, 2015 14:06
-
-
Save r9y9/5cb0f6885fe2f0470115 to your computer and use it in GitHub Desktop.
JuliaTokyo #2 で使う資料に載せるコード。BinDeps.jl の使用例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run(`./build.sh`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment