forked from warhammerkid/ruby-audio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start using rake-compiler and mini_portile to enable cross-compiled b…
…inary gems for windows
- Loading branch information
1 parent
b9dd3b4
commit 2194cc1
Showing
14 changed files
with
126 additions
and
91 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
/pkg/* | ||
pkg/* | ||
/rdoc/ | ||
/ext/*.o | ||
/ext/Makefile | ||
/ext/*.bundle | ||
/ext/*.so | ||
/ext/*.dll | ||
/ext/*.log | ||
*.bundle | ||
*.so | ||
*.dll | ||
/tmp | ||
/ports |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'mkmf' | ||
|
||
$CFLAGS.gsub!("-arch i386", "") | ||
$LDFLAGS.gsub!("-arch i386", "") | ||
|
||
dir_config('sndfile') | ||
|
||
# Mega-Nerd windows installer installs as libsndfile-1.dll | ||
if RUBY_PLATFORM =~ /(mswin|mingw|cygwin)/ | ||
sndfile_lib = 'sndfile-1' | ||
else | ||
sndfile_lib = 'sndfile' | ||
end | ||
|
||
INCLUDE_DIRS = ['/opt/local/include', '/usr/local/include', 'C:/Program Files/Mega-Nerd/libsndfile/include', 'C:/Program Files (x86)/Mega-Nerd/libsndfile/include'] | ||
LIB_DIRS = ['/opt/local/lib', '/usr/local/lib', 'C:/Program Files/Mega-Nerd/libsndfile', 'C:/Program Files (x86)/Mega-Nerd/libsndfile'] | ||
|
||
# libsndfile requirements | ||
find_header 'sndfile.h', *INCLUDE_DIRS | ||
unless ['sndfile-1', 'sndfile'].any? {|lib| find_library lib, 'sf_open', *LIB_DIRS} | ||
fail <<-EOM | ||
Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) | ||
Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include | ||
options to extconf. If there are spaces in the path on windows, it may not work. | ||
EOM | ||
end | ||
|
||
# Check for format support | ||
have_const('SF_FORMAT_OGG', 'sndfile.h') | ||
|
||
create_makefile 'rubyaudio_ext' |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
require 'rubyaudio_ext' | ||
begin | ||
# Fat binaries for Windows | ||
RUBY_VERSION =~ /(\d+.\d+)/ | ||
require "#{$1}/rubyaudio_ext" | ||
rescue LoadError | ||
require "rubyaudio_ext" | ||
end | ||
require 'ruby-audio/buffer' | ||
require 'ruby-audio/sound_info' | ||
require 'ruby-audio/sound' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{ruby-audio} | ||
s.version = "1.4.0" | ||
s.name = 'ruby-audio' | ||
s.version = '1.5.0' | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ['Stephen Augenstein'] | ||
s.email = ['perl.programmer@gmail.com'] | ||
s.homepage = 'http://github.com/warhammerkid/ruby-audio' | ||
s.summary = 'libsndfile wrapper for ruby' | ||
s.description = 'ruby-audio wraps around libsndfile to provide simplified sound reading and writing support to ruby programs' | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Stephen Augenstein"] | ||
s.date = %q{2010-12-23} | ||
s.email = %q{perl.programmer@gmail.com} | ||
s.extensions = ["ext/extconf.rb"] | ||
s.files = ["README.rdoc", "Rakefile", "LICENSE", "lib/ruby-audio/buffer.rb", "lib/ruby-audio/sound.rb", "lib/ruby-audio/sound_info.rb", "lib/ruby-audio.rb", "spec/buffer_spec.rb", "spec/sound_info_spec.rb", "spec/sound_spec.rb", "spec/spec_helper.rb", "spec/spec.opts", "spec/data/what.wav", "spec/data/what2.wav", "spec/data/what.mp3", "ext/extconf.rb", "ext/ra_buffer.c", "ext/ra_sound.c", "ext/ra_soundinfo.c", "ext/rubyaudio_ext.c", "ext/ra_buffer.h", "ext/ra_sound.h", "ext/ra_soundinfo.h"] | ||
s.homepage = %q{http://github.com/warhammerkid/ruby-audio} | ||
s.rdoc_options = ["--line-numbers", "--main", "README.rdoc", "ext/ra_buffer.c", "ext/ra_sound.c", "ext/ra_soundinfo.c", "ext/rubyaudio_ext.c", "README.rdoc"] | ||
s.require_paths = ["lib"] | ||
s.requirements = ["libsndfile (http://www.mega-nerd.com/libsndfile/)"] | ||
s.rubygems_version = %q{1.3.7} | ||
s.summary = %q{ruby-audio wraps around libsndfile to provide simplified sound reading and writing support to ruby programs} | ||
s.test_files = ["spec/buffer_spec.rb", "spec/sound_info_spec.rb", "spec/sound_spec.rb"] | ||
s.files = Dir['ruby-audio.gemspec', 'README.rdoc', 'LICENSE', 'Rakefile', 'lib/**/*.rb', 'spec/**/*.{rb,opts,wav,mp3}', 'ext/**/*.{c,h,rb}'] | ||
s.test_files = Dir['spec/**/*_spec.rb'] | ||
s.extensions = Dir["ext/**/extconf.rb"] | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 3 | ||
s.requirements << 'libsndfile (http://www.mega-nerd.com/libsndfile/)' | ||
|
||
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then | ||
else | ||
end | ||
else | ||
end | ||
end | ||
s.has_rdoc = true | ||
s.extra_rdoc_files = Dir['README.rdoc', 'ext/**/*.c'] | ||
s.rdoc_options = ['--line-numbers', '--main', 'README.rdoc'] | ||
end |
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