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.
@@ -1,3 +1,7 @@
1
+ == 0.0.3
2
+ * 1 minor enhancement
3
+ * Fixed extconf to be a little more smart.
4
+
1
5
  == 0.0.2
2
6
  * 1 major enhancement
3
7
  * I can has ogg decoder!
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'hoe'
2
2
 
3
3
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "lib")
4
4
 
5
- Hoe.new('icanhasaudio', '0.0.2') do |p|
5
+ Hoe.new('icanhasaudio', '0.0.3') do |p|
6
6
  p.rubyforge_name = 'seattlerb'
7
7
  p.author = 'Aaron Patterson'
8
8
  p.email = 'aaronp@rubyforge.org'
@@ -1,10 +1,52 @@
1
1
  require 'mkmf'
2
2
 
3
- have_header("lame/lame.h")
4
- have_header("ogg/ogg.h")
5
- have_header("vorbis/vorbisfile.h")
6
- have_library("mp3lame")
7
- have_library("vorbis")
8
- have_library("vorbisfile")
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')
@@ -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.2' */
168
- rb_define_const(rb_cDecoder, "VERSION", rb_str_new2("0.0.2"));
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.2
7
- date: 2007-07-28 00:00:00 -07:00
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