Skip to content

Instantly share code, notes, and snippets.

@r9y9
Last active Aug 29, 2015
Embed
What would you like to do?
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