Mark Hubbart
10/7/2004 5:45:00 PM
On Thu, 7 Oct 2004 17:32:37 +0900, Michal 'hramrach' Suchanek
<hramrach@centrum.cz> wrote:
> On Thu, Oct 07, 2004 at 02:00:36PM +0900, Mark Hubbart wrote:
> > Hi all,
> >
> > I've been intermittently working on a build/packaging script that will
> > make Mac Installer packages of the ruby distribution. I need to
> > include, at minimum, readline support, and distribute the readline
> > binaries along with it. I'm not a C programmer; I've compiled a lot of
> > software, but I still don't claim to know what I'm doing :)
> >
> > To make this project easier, and so I don't have to back up my
> > /usr/local dir while I'm building, I've been trying to build it and
> > install ruby (and readline) in non-standard directories; then I can
> > package up the directories for installation (I think). But it isn't
> > that easy... It seems impossible to get ruby extensions to compile
> > using the libraries that are installed in the non-standard locations.
> Ruby currently (as of 1.8.2preview2) does not support this, see my
> patch to add LDFLAGS support.
> This should enable installing ruby and the libraries it depends in into
> an arbitrary directory. But you could not move it elswhere because it
> would break.
I realize now why this is... It was a problem I had been a bit confused about.
> >
> > Since I'm not convinced I'm going about this the right way, I'll just
> > ask: What is the best way to compile several dependent software
> > projects, without having to install them in their final destination?
>
> On OS X there is linker support for bundling software in a directory
> (like Ruby.app) with its libraries. I beleive it has something to do
> with the @executable_path stuff because mozilla uses that too but I did
> not really try to use that myself.
>
> Looking at my Firefox installation it seems @executable_path expands to
> the directory where the binary is installed.
>
> I am not sure this is what you want. This makes your package
> "relocatable" in the sense that you can put the directory in which it
> resides anywhere on the disk, but you would have to install all binary
> extensions and programs using libruby in there too.
>
> I also looked at the linker man page but it does not seem very helpful
> Perhaps the Apple's developer documentation would be better.
The mac branch of the RubyOneClickInstaller is working on making the
ruby libs into a framework, moving it out of /usr or /usr/local...
That would be the canonical setup, but last I looked, they are hitting
some snags. I wish them the best on this, I'd really like to see it :)
The way it works with Python and Perl is excellent; I want to be able
to use Ruby with it.
However, my main problem is that I want to be able to compile up some
packages without fubaring my system. I guess I'll have to figure out
some better way of setting this up; since It appears that there is no
way to do this while avoiding installing the binaries in their end
location. :/
Well, thanks for the answer :) I'll see what I can do.
Thanks,
Mark