From owner-freebsd-ports@FreeBSD.ORG Sat Jun 7 21:25:37 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 374B1A11 for ; Sat, 7 Jun 2014 21:25:37 +0000 (UTC) Received: from roasted.cubic.org (roasted.cubic.org [193.108.181.130]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8B8D2366 for ; Sat, 7 Jun 2014 21:25:36 +0000 (UTC) Received: from [216.200.161.146] (port=54835 helo=[10.34.41.45]) by roasted.cubic.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1WtNR6-000641-I1 for freebsd-ports@freebsd.org; Sat, 07 Jun 2014 13:41:56 -0700 Message-ID: <53937912.3050604@cubic.org> Date: Sat, 07 Jun 2014 13:41:54 -0700 From: Dirk Jagdmann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: how to support STAGEDIR with GNU autoconf Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 21:25:37 -0000 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