From owner-freebsd-hackers Mon May 27 17:52: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from pianosa.catch22.org (pianosa.catch22.org [64.81.48.19]) by hub.freebsd.org (Postfix) with ESMTP id 4AEA737B409 for ; Mon, 27 May 2002 17:52:03 -0700 (PDT) Received: by pianosa.catch22.org (Postfix, from userid 1006) id DDF6122E; Mon, 27 May 2002 17:52:02 -0700 (PDT) Date: Mon, 27 May 2002 17:52:02 -0700 From: dannyman To: freebsd-hackers@freebsd.org Subject: ruby ports and PREFIX Message-ID: <20020527175202.E27552@pianosa.catch22.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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-hackers" in the body of the message