Date: Fri, 7 Oct 2005 11:17:53 -0700 From: Vizion <vizion@vizion.occoxmail.com> To: freebsd-ports@freebsd.org Cc: FreeBSD Ports <ports@freebsd.org>, Roman Neuhauser <neuhauser@sigpipe.cz>, Kris Kennaway <kris@obsecurity.org> Subject: Re: make port to install to a different PREFIX Message-ID: <200510071117.55281.vizion@vizion.occoxmail.com> In-Reply-To: <20051007181206.GM45909@iib.unsam.edu.ar> References: <20051003184904.GB46117@iib.unsam.edu.ar> <20051004141129.GA61667@xor.obsecurity.org> <20051007181206.GM45909@iib.unsam.edu.ar>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 07 October 2005 11:12, the author Fernan Aguero contributed to the dialogue on- Re: make port to install to a different PREFIX: >Thanks Kris and Roman for the suggestions, and sorry for the >delay in replying. I'm not there yet, but I've made some >progress and found the reason for why setting PREFIX in >CONFIGURE_ARGS doesn't work. Read on, > >+----[ Kris Kennaway <kris@obsecurity.org> (04.Oct.2005 11:16): >| On Tue, Oct 04, 2005 at 11:28:30AM +0200, Roman Neuhauser wrote: >| > # fernan@iib.unsam.edu.ar / 2005-10-03 15:49:04 -0300: >| > > I'm the maintainer of the biology/emboss port. The port >| > > installs by default to $PREFIX which, in most cases should >| > > be $LOCALBASE (i.e. /usr/local). >| > > >| > > EMBOSS is a big package, with lots of executable files. It >| > > is thus not surprising that some of the executables have the >| > > same name as those installed by other ports. >| > > >| > > Right now these are the recorded conflicts: >| > > CONFLICTS= nss-* qmail-ldap2-* digest-* >| > > >| > > To work around this, I was thinking about installing >| > > biology/emboss by default to PREFIX/emboss. >| > > However, I'm having problems in getting this to work. >| > > >| > > This does not work: >| > > CONFIGURE_ARGS+= --prefix=${PREFIX}/emboss > >Actually this should be correct. Without redefining PREFIX >adding just this one line should do it. Several other ports >install to a different prefix by default by doing just this: >grep -rH 'CONFIGURE_ARGS.*--prefix=${PREFIX}/${PORTNAME}' /usr/ports > >However ... it seems like there's a subtle overlay of > >effects going on here: >| > > and neither does this: >| > > PREFIX?= ${PREFIX}/emboss >| > > >| > > because obviously 'Variable PREFIX is recursive.' >| > >| > Either use PREFIX?=${LOCALBASE}/emboss, or use another approach (IMO >| >| This is wrong. Ports install into PREFIX, not LOCALBASE. > >OK, yes, we should not fiddle with LOCALBASE :) > >| > better, but depends on whether the configure script supports it): >| > CONFIGURE_ARGS+=--program-prefix=emboss- > >I discarded this option, since it would mean that emboss >apps would have different names in FreeBSD. I prefer to have >it installed someplace else, with the names of apps >unchanged. This would save some pain to users that come from >other unices. > >| Yes, you need to force the vendor software to install where you tell >| it to. Once you figure out how the software installs itself into a >| directory of your choosing, just do > >Actually, as said above, passing --prefix=${PREFIX}/emboss >to CONFIGURE_ARGS should do that. In fact, if I compile >emboss on its own (without using the ports system), >configure does honour --prefix=/whateverpath and, as >expected, installs correctly in that place. > >The problem appears when I use the ports system. I test the >port by doing: 'make install PREFIX=/usr/tmp/ports' >expecting that the port would be installed to >/usr/tmp/ports/emboss (because of CONFIGURE_ARGS). > >However this doesn't happen. For some reason, things get >installed into /usr/tmp/ports. > >Whatever prefix you specify in CONFIGURE_ARGS is ignored. >Why this happens is evident when you look at the resulting >config.log file > > $ ./configure --prefix=/usr/tmp/ports/emboss > --x-libraries=/usr/X11R6/lib > --x-includes=/usr/X11R6/include --prefix=/usr/tmp/ports > i386-portbld-freebsd4.11 > >the first specification of --prefix is the one set in >CONFIGURE_ARGS, the second is the one added by bsd.port.mk >(either the default or the one set in the command line or >environment), thus overriding CONFIGURE_ARGS. > >Maybe I should set CONFIGURE_ARGS absolutely? Right not I'm >using '+=' to set CONFIGURE_ARGS to preserve whatever >bsd.port.mk would like to add here ... > >Anyway, it seems like this has bitten others: >http://lists.freebsd.org/pipermail/freebsd-ports/2005-June/024096.html >http://www.monkey.org/openbsd/archive/ports/9904/msg00071.html > >In the last thread referenced above, it is suggested that setting >PREFIX:= ${PREFIX}/${PORTNAME} >could be a solution. I've tried this and it works for >the installation step, but not at deinstall: >===> emboss-3.0.0 has a different PREFIX: /usr/tmp/ports/emboss, skipping > >Is there a solution that I've missed? Or maybe we should >have a discussion to bring something like >GNU_CONFIGURE_PREFIX used by NetBSD (mentioned in the first >message referenced above). > >| EMBOSS_PREFIX?=${PREFIX}/emboss >| >| and install into ${EMBOSS_PREFIX}. >| >| Kris > >+----] > >Again, any help would be appreciated. Thanks, > I cannot add to the "how to fix this" debate but I can add to the discussion the frustration I have felt with a number of applications where ports do not enable one to install in the needed location. My own experience relates particularly to the /ports/www/ hierarchy where the need to install across filing systems and parallel to /usr/local e.g. /usr2/virtualwebs is frequently required. david -- 40 yrs navigating and computing in blue waters. English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus. Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after completing engineroom refit.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510071117.55281.vizion>