Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2002 18:14:45 -0700
From:      dannyman <dannyman@toldme.com>
To:        ports@freebsd.org, port@freebsd.org
Subject:   ruby ports and PREFIX
Message-ID:  <20020523181445.C13409@pianosa.catch22.org>

next in thread | raw e-mail | index | archive | help
So, what I'm doing here is experimenting with encap, a nifty little
package standard where the idea is that you install your software with
PREFIX set to /usr/local/encap/pkgname-version, and the package manager,
epkg, will look through that dir and symlink files from that hierarchy
in to /usr/local for you.  It makes stuff like identifying the source of
a file, or rolling back to an earlier version of a software package,
downright trivial, 

Of course, in terms of FreeBSD, I like to use ports to build packages,
so I've patched up bsd.port.mk to re-define PREFIX for intallations, and
run the package manager after install completes, etc.  Most ports work
really well, assuming they honor PREFIX.

Which, ruby add-ons do not seem to do.  For example, optparse:

do-install:
        ${MKDIR} ${RUBY_SITELIBDIR}/${PORTNAME}
        ${INSTALL_DATA} ${WRKSRC}/optparse.rb ${RUBY_SITELIBDIR}/
        ${INSTALL_DATA} ${WRKSRC}/optparse/*.rb ${RUBY_SITELIBDIR}/${PORTNAME}/

What the heck is that?  On my test system, the RUBY_SITELIBDIR is
defined by interrogating RUBY, and the result is
/usr/local/encap/ruby-1.6.7.2002.05.02p/lib/ruby/site_ruby/1.6 ... what
I REALLY want is for the Port to install files based on PREFIX,
/usr/local/encap/ruby-optparse-0.8.6, and then I will link them in to
the proper ruby site directories which contain files in /usr/local
symlinked to their appropriate source packages.

A few questions:

1) Shouldn't the ruby add-on ports honor PREFIX?

2) To that end, is there a good way to define RUBY_SITELIBDIR and
friends in bsd.ruby.mk to honor PREFIX?

3) Once I symlink new files in to the ruby file hierarchy, so I have to
do any magic for Ruby to pick up to this fact?  Is ruby going to do
anything troublesome like go looking in the encap directory it was built
for, instead of /usr/local?

Thanks,
-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020523181445.C13409>