Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jun 2014 13:41:54 -0700
From:      Dirk Jagdmann <doj@cubic.org>
To:        freebsd-ports@freebsd.org
Subject:   how to support STAGEDIR with GNU autoconf
Message-ID:  <53937912.3050604@cubic.org>

next in thread | raw e-mail | index | archive | help
I'm looking at changing the devel/quilt port to support stageing. I've read the 
manual and know that there will be a variable STAGEDIR defined somewhere. But 
where exactly? It seems it is defined in the environment of the FreeBSD ports 
Makefile, but it is not available as a unix shell environment variable of the 
sub processes during the autoconf and build.

My first attempt was to use the STAGEDIR variable in the Makefiles of the quilt 
program and prepend it to the PREFIX typically used by GNU autoconf style 
builds. But when building/stageing this port, this variable is defined to 
nothing. I see this, because the install than install into something like

//usr/local/bin/

Notice the double slash at the start, this shows me that STAGEDIR was undefined 
(or the empty string).

Next I tried in the ports Makefile to do something like:

CONFIGURE_ARGS=--prefix=$(STAGEDIR)/usr/local

But this also does not work, because the FreeBSD ports will add it's own 
--prefix with /usr/local/ again when running configure. Looking at the 
config.log here's how the ports system called the configure script:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by quilt configure 0.63, which was
generated by GNU Autoconf 2.69.  Invocation command line was

   $ ./configure --with-sed=/usr/local/bin/gsed --without-getopt 
--with-patch=/usr/local/bin/gpatch --prefix=/usr/ports/devel/q\
uilt/work/stage/usr/local --without-rpmbuild --prefix=/usr/local 
--mandir=/usr/local/man --infodir=/usr/local/info/ --build=am\
d64-portbld-freebsd10.0
...

As you can see, the ports system appends it's default GNU autoconf options 
*after* mine and thus overrides my --prefix.

Question: what are the best practices to make GNU autoconf ports support staging?

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53937912.3050604>