Date: Sat, 05 Aug 2006 10:49:11 +0200 From: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= <gabor@FreeBSD.org> To: Edwin Groothuis <edwin@mavetju.org> Cc: ports@FreeBSD.org Subject: Re: HEADS-UP: DESTDIR support committed to Mk/ Message-ID: <44D45B87.5060601@FreeBSD.org> In-Reply-To: <20060805070336.GA997@k7.mavetju> References: <44D370E9.1080209@FreeBSD.org> <20060805070336.GA997@k7.mavetju>
next in thread | previous in thread | raw e-mail | index | archive | help
Edwin Groothuis wrote: > On Fri, Aug 04, 2006 at 06:08:09PM +0200, G?bor K?vesd?n wrote: > >> I am pleased to announce, that portmgr committed my patch for ports >> infrastructure DESTDIR support today. Note that this support is only for >> the infrastructure, ports may or may not respect the DESTDIR macro, so >> > > Having read the wiki, please let me ask a couple of questions to > make sure there is consensus on what needs to be done to make all > ports DESTDIR happy. > > - All ports Makefiles should be checked for installs into PREFIX, > and replaced by TARGETDIR (or DESTDIR/PREFIX) > Yes, TARGETDIR resolves to DESTDIR/PREFIX, which should be the final destination. In many ports we have a do-install or post-install target with something like: @${INSTALL_PROGRAM} ${WRKSRC}/foo ${PREFIX}/bin This is definitely not good, since it will install to ${PREFIX} even if you set DESTDIR, so this needs a s/${PREFIX}/${TARGETDIR}/. The other type of stuff when ports specify some paths that are used in run-time, e.g. where a specific port checks for its configuration stuff. Of course, there the relative path (relative to DESTDIR, but absolute anyway) should be kept, since the given program is supposed to run in the DESTDIR environment chrooted or jailed. > - All Makefiles in the workdir should install the DESTDIR/PREFIX, > so their configure options should be... --prefix? Not really, > because the datafiles of the program itself are to be found at > PREFIX, not DESTDIR/PREFIX. Any idea how to resolve this? > > Edwin > If you mean the config files on datafiles, I already answered, if no, I don't really see what you mean. For configure options, GNU stuff is aware of the DESTDIR macro, so those ports should be easy to modify to respect DESTDIR. E.g. I experimented with devel/gmake, and needed only a little effort. No need to use --prefix=${DESTDIR}${PREFIX} at all, just ${PREFIX} and ${DESTDIR} is passed via CONFIGURE_ENV. -- Cheers, Gabor
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D45B87.5060601>