Permalink
Browse files

Update for compatibility

  • Loading branch information...
HD Moore
HD Moore committed Mar 27, 2012
1 parent b1683c9 commit 64b0f50baabf88a473e6e7326e0e731b2abbb4d1
Showing with 9 additions and 3 deletions.
  1. +3 −1 external/ruby-lorcon2/Lorcon2.c
  2. +6 −2 external/ruby-lorcon2/extconf.rb
@@ -151,7 +151,9 @@ static VALUE Lorcon_create(int argc, VALUE *argv, VALUE self) {
obj = Data_Make_Struct(cDevice, struct rldev, 0, Lorcon_free, rld);
rld->context = lorcon_create(intf, dri);
- lorcon_set_timeout(rld->context, 100);
+
+ // Obsolete: XXX
+ // lorcon_set_timeout(rld->context, 100);
if (rld->context == NULL) {
rb_raise(rb_eRuntimeError,
@@ -1,12 +1,16 @@
#!/usr/bin/env ruby
require 'mkmf'
-if ( RUBY_VERSION =~ /^1\.9/ )
+
+$CFLAGS += " -I/usr/include/lorcon2"
+
+if ( RUBY_VERSION =~ /^(1\.9|2\.0)/ )
$CFLAGS += " -DRUBY_19"
end
-if (have_library("orcon2", "lorcon_list_drivers", "lorcon2/lorcon.h") or find_library("orcon2", "lorcon_list_drivers", "lorcon2/lorcon.h"))
+if find_library("orcon2", "lorcon_list_drivers", "lorcon2/lorcon.h")
create_makefile("Lorcon2")
else
puts "Error: the lorcon2 library was not found, please see the README"
end
+

0 comments on commit 64b0f50

Please sign in to comment.