From owner-freebsd-ports@FreeBSD.ORG Sat Sep 13 18:55:27 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74B4F106566C for ; Sat, 13 Sep 2008 18:55:27 +0000 (UTC) (envelope-from chris#@1command.com) Received: from mail.1command.com (mail.1command.com [75.160.109.226]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF4F8FC13 for ; Sat, 13 Sep 2008 18:55:26 +0000 (UTC) (envelope-from chris#@1command.com) Received: from mail.1command.com (localhost.1command.com [127.0.0.1]) by mail.1command.com (8.13.3/8.13.3) with ESMTP id m8DIt7M4073133; Sat, 13 Sep 2008 11:55:13 -0700 (PDT) (envelope-from chris#@1command.com) Received: (from www@localhost) by mail.1command.com (8.13.3/8.13.3/Submit) id m8DIt6wM073132; Sat, 13 Sep 2008 11:55:06 -0700 (PDT) (envelope-from chris#@1command.com) Received: from hitme.hitometer.net (hitme.hitometer.net [75.160.109.235]) by webmail.1command.com (H.R. Communications Messaging System) with HTTP; Sat, 13 Sep 2008 11:55:06 -0700 Message-ID: <20080913115506.y6dyjx8k8wcggk0g@webmail.1command.com> X-Priority: 3 (Normal) Date: Sat, 13 Sep 2008 11:55:06 -0700 From: Chris H To: Dmitry Marakasov References: <20080912105907.hgkvg352gco0k8ow@webmail.1command.com> <20080912211222.GA37740@hades.panopticon> <20080912214349.xrprskkcg00gw080@webmail.1command.com> <20080913125407.GC37740@hades.panopticon> In-Reply-To: <20080913125407.GC37740@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: H.R. Communications Internet Messaging System (HCIMS) 4.1 Professional (not for redistribution) / FreeBSD-5.5 Cc: freebsd-ports@freebsd.org Subject: Re: a $PREFIX question... X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 18:55:27 -0000 Hello Dmitry. Thank you for taking the time to respond. Quoting Dmitry Marakasov : > * Chris H (chris#/@\1command.com) wrote: > >> Yes. I tried that already. But didn't have the effect I was striving >> for - duplicate the /current/ PHP install, but changing php/ to php5/ >> and simply adding php5/ to the bin path (bin/php5). Although your >> first suggestion might be ideal for a jail. > For jail there's DESTDIR. Ahh. That's good to know. I had thought to look to the BIND port as a model for a jail. But, since I'm really just trying to get both PHP4 and PHP5 to install in such a manner as to prevent symbol collisions, I thought that simply keeping the configure/install the same as it is now, but substituting php, for php5 would be the most efficient, and tidy approach. It appears that all I'm dealing with is: /usr/local/lib/php /usr/local/include/php /usr/local/etc/php && php.conf /usr/local/bin/php || pgp-cgi Which - if I have a reasonable understanding of all this, translates to: $PREFIX || $LOCALBASE/php no? So I figured that ultimately both php versions & the destination system would be happiest if I simply exchanged php for php5 (php for v.4 & php5 for v.5). But as I read your replies I get the feeling that you believe it would make better sense to simply drop the whole install into it's own tree - /usr/local/php5/ - lib/ include/ bin/ etc/ While that certainly isolates the install from symbol collisions with php4. I thought it might make it harder for other applications to find it. But maybe I'm just making/thinking this is harder that it really is. Bear in mind that I'm ultimately looking to make this a port, and in the "big picture" I hope to make a single port that installs /both/ php4 & php5 in such a manner as to live and work harmoniously together - creating make conditionals that accommodate making/installing modules/extensions out of the ports tree with out any struggle on the users part. So the direction I choose must take all of that into account (your experience is /greatly/ appreciated here :)) Maybe the ultimate solution would be to simply go the $PREFIX/php && $PREFIX/php5 route. Thereby dropping (isolating) both versions into their own trees. But if I understand any of this correctly, I'll need to modify the system' environment to include these directories: ($PREFIX/php/bin $PREFIX/php/lib $PREFIX/php/include && $PREFIX/php5/bin $PREFIX/php5/lib $PREFIX/php5/include) Does this make any sense? Well Dmitry, thank you again for sharing your experience and insight. I /really/ appreciate it. Looks like I've got alot to think about. :) Best wishes. --Chris > PREFIX is exactly for keeping conflicting > apps along with each other. And I don't actually understand why you > need to scatter php5 files in all subdirs, while you could have > them in one directory with canonical hierarchy. > You'll have to modify $PATH and posibly other stuff in both cases, > so there's no difference in usability. > >>> If you specifically want bin/php5, etc/php5 etc. you'll have to >>> hack much more stuff. At least, you'll need to add >>> --bindir=${PREFIX}/bin/php5 --libdir=${PREFIX}/lib/php5 (etc. for other >>> dirs, see php's `configure --help`) to CONFIGURE_ARGS to make php5 >>> actually install file into those locations, and most likely other hacks >>> will be needed. >> OK. That's the layout I had hoped to achieve. So looks like I'll be >> cobbling up some (e)grep(1) | find(1) | sed(1) scripts to best accomplish > As I've said, providing --*lib args to configure should be enough to > install files to nondefault locations, but there's chance that there are > some assumptions regarding directory hierarchy inside php you'll need to > change as well. That's usually done with ${REINPLACE_CMD} (which is sed) > or patches. >> this. I was hoping a simple tweak in the portinstall/*.bsd.mk might be >> available. > That would be impossible, as no software is intended for such > nonstandart install, and build systems other than configure don't even > provide ways to specify bin/etc/lib dirs. > > -- > Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D > amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru >