diff --git a/external/ruby-lorcon2/Lorcon2.c b/external/ruby-lorcon2/Lorcon2.c index beb51e0f28..226b6cc773 100644 --- a/external/ruby-lorcon2/Lorcon2.c +++ b/external/ruby-lorcon2/Lorcon2.c @@ -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, diff --git a/external/ruby-lorcon2/extconf.rb b/external/ruby-lorcon2/extconf.rb index 3dd95721b2..955244f708 100644 --- a/external/ruby-lorcon2/extconf.rb +++ b/external/ruby-lorcon2/extconf.rb @@ -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 +