From: Luis Lavena Date: 2009-01-21T22:48:23+09:00 Subject: Re: 1.8.6 OCI binary extension question On Jan 20, 10:57 pm, "rmag...@gmail.com" wrote: > On Jan 20, 7:15 pm, Luis Lavena wrote: > > > > > Can you point me to the extconf.rb file of RMagick? > > > There is room definitely there is room to add more customization, but > > I basedrake-compilerstructure in the PickAxe. > > > Please let me know if you make progress on this. > > Thanks for your prompt reply, Luis. With the exception of the .so > filename I believe rake-compiler is working normally. rake-compiler is expecting that the name you supply to it is the expected name of build so file. > The extconf.rb for RMagick is below. > > I recognize that rake-compiler wants "convention-over-configuration" > and that this can make it difficult to "import" existing projects, > especially those that don't match the convention. I appreciate your > patience. > We can bend the convention, so adding this to my todo list: * Make ext.ext_dir work fully (if it's overwritten do not try to append another folder) Adding that, you will have the option to keep the extension name but with a different directory name. > Indeed, changing the name of the directory to RMagick2 causes rake- > compiler to know that the name of the .so file is RMagick2.so, at the > cost of changing the name of the directory. The directory structure, > which I based on setup.rb, has been my convention from the beginning > and I prefer not to change it. I believe that it is compatible with > the Pickaxe convention. From my experience I've always keep one extension per folder, and everything inside ext directory. But is important keep backward compatibility to some extend. Just added it: http://wiki.github.com/luislavena/rake-compiler/todo When do that change, you will be able to: require 'rake/extensiontask' Rake::ExtensionTask.new('RMagick2') do |ext| ext.ext_dir = 'ext/RMagick' end Sound good? > > RMagick has both a Ruby part and a binary part. The Ruby part is > RMagick.rb and the binary part is RMagick2.so for RMagick 2 and simply > RMagick.so for RMagick 1. > I understand. How you deal with the require in the same folder? you explicitly require "RMagick.so" ? Anyway, will work on fix that issue before your next release ;-) Right now I have a broken Ruby environment, when fixed will patch and do another rake-compiler release. Thank you for the feedback Tom (because I know is you) ;-) Regards, -- Luis Lavena