From owner-freebsd-ports Thu May 23 18:14:52 2002 Delivered-To: freebsd-ports@freebsd.org Received: from pianosa.catch22.org (pianosa.catch22.org [64.81.48.19]) by hub.freebsd.org (Postfix) with ESMTP id 0835837B404; Thu, 23 May 2002 18:14:46 -0700 (PDT) Received: by pianosa.catch22.org (Postfix, from userid 1006) id BD59D1E6; Thu, 23 May 2002 18:14:45 -0700 (PDT) Date: Thu, 23 May 2002 18:14:45 -0700 From: dannyman To: ports@freebsd.org, port@freebsd.org Subject: ruby ports and PREFIX Message-ID: <20020523181445.C13409@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-ports@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-ports" in the body of the message