From eikemeier@fillmore-labs.com  Fri Apr 23 07:08:59 2004
Return-Path: <eikemeier@fillmore-labs.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 407F816A4CE
	for <FreeBSD-gnats-submit@FreeBSD.org>; Fri, 23 Apr 2004 07:08:59 -0700 (PDT)
Received: from fillmore.dyndns.org (port-212-202-49-130.reverse.qsc.de [212.202.49.130])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C693B43D31
	for <FreeBSD-gnats-submit@FreeBSD.org>; Fri, 23 Apr 2004 07:08:58 -0700 (PDT)
	(envelope-from eikemeier@fillmore-labs.com)
Received: from [172.16.0.2] (helo=fillmore-labs.com)
	by fillmore.dyndns.org with esmtp (Exim 4.32; FreeBSD)
	id 1BH1MN-000Ppm-5o
	for FreeBSD-gnats-submit@FreeBSD.org; Fri, 23 Apr 2004 16:08:58 +0200
Message-Id: <40892376.1000808@fillmore-labs.com>
Date: Fri, 23 Apr 2004 16:08:54 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: [PATCH] bsd.port.mk: handle interactive configure scripts

>Number:         65915
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk: handle interactive configure scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 23 07:10:23 PDT 2004
>Closed-Date:    Wed Sep 20 04:14:44 GMT 2006
>Last-Modified:  Wed Sep 20 04:14:44 GMT 2006
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.10-STABLE

>Description:

Some configure scripts require user interaction. Since this is not desirable
(especially because different answers could lead to different build results,
which may not be relected in the packing list), feed the script with /dev/null
by default. Optional this can be overridden by using `${YES} |', `${YES} NO |',
or whatever seems convenient.

The following ports have to be fixed after this patch:

devel/p5-Data-UUID (skv@FreeBSD.org)
	CONFIGURE_ARGS= </dev/null

devel/p5-Inline-ASM (skv@protey.ru)
	CONFIGURE_ARGS= </dev/null

devel/p5-Inline-CPP (skv@FreeBSD.org)
	CONFIGURE_ARGS= </dev/null

devel/p5-Inline-Java (ports@FreeBSD.org)
	CONFIGURE_ARGS= </dev/null

graphics/p5-Image-Grab (tolid@plab.ku.dk)
	CONFIGURE_ENV= ${ECHO_CMD} "N" |

graphics/rayshade (ports@FreeBSD.org)
	CONFIGURE_ARGS= < ${WRKDIR}/config.ans

net/p5-Net (mat@FreeBSD.org)
	CONFIGURE_ARGS= INSTALLDIRS=site < /dev/null

net/p5-POE-Component-RRDTool (skv@FreeBSD.org)
	CONFIGURE_ARGS= </dev/null

textproc/p5-XML-SAX (skv@FreeBSD.org)
	CONFIGURE_ARGS= </dev/null

textproc/p5-YAML (tobez@FreeBSD.org)
	CONFIGURE_ARGS+= </dev/null

www/p5-Template-Toolkit (perl@FreeBSD.org)
	CONFIGURE_ENV= |

x11-toolkits/qt23 (ports@FreeBSD.org)
	CONFIGURE_ENV= ${ECHO_CMD} yes | QTDIR=${WRKSRC}

x11-toolkits/qt33 (kde@FreeBSD.org)
	CONFIGURE_ENV?= ${ECHO} yes | QTDIR=${WRKSRC} PATH=${WRKSRC}/bin:$$PATH

>How-To-Repeat:
>Fix:

Index: Mk/bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.488
diff -u -r1.488 bsd.port.mk
--- Mk/bsd.port.mk	19 Apr 2004 23:39:52 -0000	1.488
+++ Mk/bsd.port.mk	23 Apr 2004 13:53:14 -0000
@@ -866,6 +866,7 @@
 WHICH?=		/usr/bin/which
 XARGS?=		/usr/bin/xargs
 YACC?=		/usr/bin/yacc
+YES?=		/usr/bin/yes
 
 # ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo",
 # or "true" if the make flag -s is given.  Use ECHO_CMD where you mean
@@ -2336,6 +2339,8 @@
 CONFIGURE_TARGET?=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_LOG?=		config.log
 
+CONFIGURE_BEFORE_CMD?=	${CAT} /dev/null |
+
 # A default message to print if do-configure fails.
 CONFIGURE_FAIL_MESSAGE?=	"Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. an \`ls ${PKG_DBDIR}\`)."
 
@@ -3030,7 +3035,7 @@
 .endif
 .if defined(HAS_CONFIGURE)
 	@(cd ${CONFIGURE_WRKSRC} && \
-		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
+		if ! ${CONFIGURE_BEFORE_CMD} ${SETENV} CC="${CC}" CXX="${CXX}" \
 	    CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 	    INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \
 	    INSTALL_DATA="${INSTALL_DATA}" \
@@ -3044,7 +3049,7 @@
 .endif
 .if defined(PERL_CONFIGURE)
 	@cd ${CONFIGURE_WRKSRC} && \
-		${SETENV} ${CONFIGURE_ENV} \
+		${CONFIGURE_BEFORE_CMD} ${SETENV} ${CONFIGURE_ENV} \
 		${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
 .if !defined(PERL_MODBUILD)
 	@cd ${CONFIGURE_WRKSRC} && \

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: eik 
Responsible-Changed-When: Fri Apr 23 16:10:55 CEST 2004 
Responsible-Changed-Why:  
ports infrastructure 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65915 
State-Changed-From-To: open->feedback 
State-Changed-By: kris 
State-Changed-When: Tue May 18 21:07:09 PDT 2004 
State-Changed-Why:  
Which ports does this 'fix'? 

Also, we'll need a complete patch before this can be tested on 
bento. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65915 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Wed Sep 20 04:14:29 UTC 2006 
State-Changed-Why:  
Submitter is no longer active, and no response to feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65915 
>Unformatted:
