From: Chris Gehlker Date: 2002-03-28T00:00:55+09:00 Subject: Re: Etiquette of RCRs On 3/26/02 9:11 PM, "nobu.nokada@softhome.net" wrote: > Hi, > > At Sat, 23 Mar 2002 15:38:42 +0900, > Chris Gehlker wrote: >> I wanted better support for Darwin and the Simply GNUStep Linux distro. >> These wrap headers and libraries in frameworks. To build them, you need to >> pass -f and -framework flags to the compiler. So I extended dir_config to >> accept --with-name-framework and added find_framework and have_framework. >> But then get it working on my test case I had to add a with_framework >> similar to with_config and an enable_framework like enable_config and make >> custom version of the methods they call, etc. I was just copying and pasting >> and making minimal changes so I grew the library by about 75% But I can see >> there is a lot of bloat and I can re-factor most of that away. > > Sorry, but I don't know about those platforms, could you explain how > `framework' versions differ from originals? This is very much the short version. I will be glad to provide the long version if you are curious, but you don't need to understand it to understand what I want to do with Ruby. The basic notion is that rather than put headers in an include directory, libraries in lib, xml defining localizations for strings yet somewhere else and so on, there should be a single directory that provides a everything that a service, like Tcl for example, needs to provide to client programs. So with Tcl, for example, there is a directory called tcl.framework that contains symlinks to Headers, Tcl, Resources, and a real directory called Versions. Inside Versions there is a symlink to Current and a real directory called 8.4. Inside 8.4 is the Tcl library and a directory with all the Tcl scripts. One directory can support multiple versions and multiple localizations and you can just replace the whole directory as new versions and new localizations are developed. You wont break any old code because the old stuff is still in the directory. So package management is simplified because you can always copy a new framework on top of the old one. None of this can work unless the compilers are "framework aware" but gcc is because it has the -framework and -F flags. Now comes the question for Ruby. Is it better to treat frameworks explicitly, by adding have_framework, find_framework, etc to mkmf.rb and asking the community to update their extconf.rb files? Or is it better to just modify mkmf.rb so that, for example, if have_header can't find the tcl.h in the specified places it looks in tcl.framework before returning "no"? I'm really leaning toward the later because I think that programmers shouldn't have to understand frameworks to write extconf.rb files that support them. -- Laws are the spider's webs which, if anything small falls into them they ensnare it, but large things break through and escape. -Solon, statesman (c. 638-c558 BCE)