icanhasaudio 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/Rakefile +1 -1
- data/ext/extconf.rb +48 -6
- data/ext/icanhasaudio.c +2 -2
- metadata +2 -2
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/ext/extconf.rb
CHANGED
@@ -1,10 +1,52 @@
|
|
1
1
|
require 'mkmf'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
def exit_failure(msg)
|
4
|
+
Logging::message msg
|
5
|
+
message msg + "\n"
|
6
|
+
exit(1)
|
7
|
+
end
|
8
|
+
|
9
|
+
unless respond_to?(:find_header)
|
10
|
+
def find_header(header, *paths)
|
11
|
+
header = cpp_include(header)
|
12
|
+
checking_for header do
|
13
|
+
if try_cpp(header)
|
14
|
+
true
|
15
|
+
else
|
16
|
+
found = false
|
17
|
+
paths.each do |dir|
|
18
|
+
opt = "-I#{dir}".quote
|
19
|
+
if try_cpp(header, opt)
|
20
|
+
$CPPFLAGS << " " << opt
|
21
|
+
found = true
|
22
|
+
break
|
23
|
+
end
|
24
|
+
end
|
25
|
+
found
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
['lame/lame.h', 'ogg/ogg.h', 'vorbis/vorbisfile.h'].each do |hf|
|
32
|
+
unless find_header(hf,
|
33
|
+
'/opt/local/include',
|
34
|
+
'/usr/local/include',
|
35
|
+
'/usr/include'
|
36
|
+
)
|
37
|
+
exit_failure "Can't find #{hf}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
['mp3lame', 'vorbis', 'vorbisfile'].each do |library|
|
42
|
+
unless find_library(library, nil,
|
43
|
+
'/opt/local/lib',
|
44
|
+
'/usr/local/lib',
|
45
|
+
'/usr/lib'
|
46
|
+
)
|
47
|
+
exit_failure "Can't find #{library}"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
9
51
|
dir_config('icanhasaudio')
|
10
52
|
create_makefile('icanhasaudio')
|
data/ext/icanhasaudio.c
CHANGED
@@ -164,8 +164,8 @@ void Init_icanhasaudio() {
|
|
164
164
|
rb_mOgg = rb_define_module_under(rb_mAudio, "OGG");
|
165
165
|
rb_cOggDecoder = rb_define_class_under(rb_mOgg, "Decoder", rb_cObject);
|
166
166
|
|
167
|
-
/* VERSION = '0.0.
|
168
|
-
rb_define_const(rb_cDecoder, "VERSION", rb_str_new2("0.0.
|
167
|
+
/* VERSION = '0.0.3' */
|
168
|
+
rb_define_const(rb_cDecoder, "VERSION", rb_str_new2("0.0.3"));
|
169
169
|
rb_define_singleton_method(
|
170
170
|
rb_cDecoder,
|
171
171
|
"lame_version",
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: icanhasaudio
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.0.3
|
7
|
+
date: 2007-08-05 00:00:00 -07:00
|
8
8
|
summary: icanhasaudio is a lame/vorbis wrapper for decoding ur mp3s and ur oggs.
|
9
9
|
require_paths:
|
10
10
|
- lib
|