From sgk@kolobov.com  Tue Jun  3 16:13:09 2003
Return-Path: <sgk@kolobov.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C16DF37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Jun 2003 16:13:09 -0700 (PDT)
Received: from outpost.globcon.net (outpost.globcon.net [62.141.88.161])
	by mx1.FreeBSD.org (Postfix) with SMTP id E3BF843F93
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Jun 2003 16:13:07 -0700 (PDT)
	(envelope-from sgk@kolobov.com)
Received: (qmail 95089 invoked from network); 3 Jun 2003 23:13:04 -0000
Received: from h166.lukarcos.com (HELO kolobov.com) (62.141.88.166)
  by outpost.globcon.net with SMTP; 3 Jun 2003 23:13:04 -0000
Received: (qmail 81095 invoked by uid 911); 3 Jun 2003 23:10:18 -0000
Message-Id: <20030603231018.81094.qmail@kolobov.com>
Date: 3 Jun 2003 23:10:18 -0000
From: Sergei Kolobov <sergei@kolobov.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52917
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 03 16:20:00 PDT 2003
>Closed-Date:    Thu Aug 14 06:13:27 UTC 2008
>Last-Modified:  Thu Aug 14 06:13:27 UTC 2008
>Originator:     Sergei Kolobov
>Release:        FreeBSD 5.1-BETA i386
>Organization:
>Environment:
System: FreeBSD elf.chetwood.ru 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 26 00:30:25 MSD 2003 
>Description:
Recent autoconf (2.5x) produces configure scripts which do not like our current
default value of CONFIGURE_TARGET variable. In the recent versions of
configure, it has to be passed as --build=... argument.

Thus, 477 ports currently redefine CONFIGURE_TARGET to silence the configure
warning.  (and I am sure that some more ports just ignore this warning). 

Since more and more software packages are updated to use autoconf 2.5x, this
quickly becomes a very common situation and it makes sense to deal with it by
change the default value of CONFIGURE_TARGET (see patch below).

Note: quick testing shows that this change does NOT break configure scripts
produced by older (2.13) versions of autoconf. In addition to that, those ports 
that truly require the old value of CONFIGURE_TARGET could define it in their
Makefile. I estimate that only few ports (if any at all) will need that.
On the other hand, the majority of the ports will benefit from the updated
default value.
>How-To-Repeat:
>Fix:

--- configure-target.patch begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.451
diff -u -r1.451 bsd.port.mk
--- bsd.port.mk	26 May 2003 20:59:12 -0000	1.451
+++ bsd.port.mk	3 Jun 2003 22:57:00 -0000
@@ -608,8 +608,8 @@
 # CONFIGURE_SCRIPT - Name of configure script, relative to ${CONFIGURE_WRKSRC}
 #				  (default: "Makefile.PL" if PERL_CONFIGURE is set,
 #				  "configure" otherwise).
-# CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is
-#				  defined (default: ${MACHINE_ARCH}-portbld-freebsd${OSREL}).
+# CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is defined 
+# 				  (default: --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}).
 # CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set
 #				  (default: "--prefix=${PREFIX} ${CONFIGURE_TARGET}" if
 #				  GNU_CONFIGURE is set, "CC=${CC} CCFLAGS=${CFLAGS}
@@ -2124,7 +2124,7 @@
 .endif
 
 CONFIGURE_SCRIPT?=	configure
-CONFIGURE_TARGET?=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET?=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_LOG?=		config.log
 
 .if defined(GNU_CONFIGURE)
--- configure-target.patch ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: erwin 
Responsible-Changed-When: Wed Jun 4 00:58:03 PDT 2003 
Responsible-Changed-Why:  
it's portmgr territory 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 
State-Changed-From-To: open->analyzed 
State-Changed-By: kris 
State-Changed-When: Sun Jul 6 17:14:21 PDT 2003 
State-Changed-Why:  
Scheduled for testing on the next bento run 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 

From: Kris Kennaway <kris@obsecurity.org>
To: freebsd-gnats-submit@FreeBSD.org, sergei@kolobov.com
Cc:  
Subject: Re: ports/52917
Date: Wed, 23 Jul 2003 20:47:18 -0700

 This appears to cause problems with a lot of ports.
 
 http://bento.freebsd.org/errorlogs/i386-4-exp-latest/gauche-0.7_1.log
 http://bento.freebsd.org/errorlogs/i386-4-exp-latest/bash-2.05b.007.log
 http://bento.freebsd.org/errorlogs/i386-4-exp-latest/clisp-2.30.log
 http://bento.freebsd.org/errorlogs/i386-4-exp-latest/gnats-3.113.1_7.log
 ...
 
 It is unsuitable for committing in its current form.  Can you please
 investigate further and provide a recommendation on how to proceed?
 
 Kris
 
State-Changed-From-To: analyzed->suspended 
State-Changed-By: kris 
State-Changed-When: Wed Jul 23 21:16:22 PDT 2003 
State-Changed-Why:  
Awaiting further work by submitter 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 

From: Kris Kennaway <kris@obsecurity.org>
To: bug-followup@FreeBSD.org, sergei@kolobov.com
Cc:  
Subject: Re: ports/52917
Date: Thu, 2 Oct 2003 19:39:11 -0700

 Dear Sergei,
 
 Have you made any progress on resolving the problems mentioned in the
 audit trail?
 
 Kris
State-Changed-From-To: suspended->closed 
State-Changed-By: kris 
State-Changed-When: Sat Mar 20 18:16:12 PST 2004 
State-Changed-Why:  
Patch caused problems, no followup submitted. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 

From: Florent Thoumie <flz@xbsd.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc: sergei@kolobov.com,
	Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: ports/52917 [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
Date: Wed, 12 May 2004 15:01:17 +0200

 Here is my diff.
 
 I choose not to include --build= in the CONFIGURE_TARGET value because it seems to me the
 configure switch should not be part of the variable (as --prefix= is not part of ${PREFIX}).
 
 This patch cause some problems for ports that :
 
 1) don't work when you pass --build=value to configure (lang/gcc295 that tries to call
 i386-unknown-freebsd5.2-ar) but that's a port issue I think.
 
 2) use some weird targets like net/nc6 which fails because it uses --target switch instead
 of --build.
 
 3) define CONFIGURE_TARGET after bsd.port.mk or bsd.port.post.mk is included (shell/bash2).
 
 
 I tried to read errorlogs mentionned above but they don't exist anymore.
 
 I installed successfully lang/gauche and shell/bash2.
 databases/gnats is forbidden
 lang/clisp failed because of gcc295 dependancy.
 
 --- cut here ---
 
 diff -ruN Mk.old/bsd.gnome.mk Mk/bsd.gnome.mk
 --- Mk.old/bsd.gnome.mk	Thu May  6 11:34:45 2004
 +++ Mk/bsd.gnome.mk	Wed May 12 13:11:42 2004
 @@ -76,7 +76,7 @@
  			   --with-gconf-source=xml::${PREFIX}/etc/gconf/gconf.xml.defaults
  gnomeprefix_USE_GNOME_IMPL=gnomehier
  
 -gnometarget_CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 +gnometarget_CONFIGURE_TARGET=${MACHINE_ARCH}-portbld-freebsd${OSREL}
  
  ESD_CONFIG?=		${LOCALBASE}/bin/esd-config
  esound_LIB_DEPENDS=	esd.2:${PORTSDIR}/audio/esound
 diff -ruN Mk.old/bsd.port.mk Mk/bsd.port.mk
 --- Mk.old/bsd.port.mk	Tue Apr 20 01:39:52 2004
 +++ Mk/bsd.port.mk	Wed May 12 14:02:43 2004
 @@ -671,7 +671,7 @@
  # CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is
  #				  defined (default: ${MACHINE_ARCH}-portbld-freebsd${OSREL}).
  # CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set
 -#				  (default: "--prefix=${PREFIX} ${CONFIGURE_TARGET}" if
 +#				  (default: "--prefix=${PREFIX} --build=${CONFIGURE_TARGET}" if
  #				  GNU_CONFIGURE is set, "CC=${CC} CCFLAGS=${CFLAGS}
  #				  PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib
  #				  INSTALLARCHLIB=${PREFIX}/lib" if PERL_CONFIGURE is set,
 @@ -2333,8 +2333,12 @@
  .endif
  
  CONFIGURE_SCRIPT?=	configure
 -CONFIGURE_TARGET?=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
  CONFIGURE_LOG?=		config.log
 +.if defined(CONFIGURE_TARGET)
 +CONFIGURE_TARGET:=	${CONFIGURE_TARGET:S/--build=//}
 +.else 
 +CONFIGURE_TARGET=	${MACHINE_ARCH}-portbld-freebsd${OSREL}
 +.endif
  
  # 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}\`)."
 @@ -2348,7 +2352,7 @@
  CONFIGURE_MAX_CMD_LEN!=	/usr/sbin/sysctl -n kern.argmax
  .endif
  .endif
 -CONFIGURE_ARGS+=	--prefix=${PREFIX} ${CONFIGURE_TARGET}
 +CONFIGURE_ARGS+=	--prefix=${PREFIX} --build=${CONFIGURE_TARGET}
  CONFIGURE_ENV+=		lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}
  HAS_CONFIGURE=		yes
  .endif
 
 --- cut here ---

From: Florent Thoumie <flz@xbsd.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc: sergei@kolobov.com,
	Oliver Eikemeier <eikemeier@fillmore-labs.com>
Subject: Re: ports/52917 [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
Date: Wed, 12 May 2004 15:19:36 +0200

 I missed one part of the work, the substitute line must be :
 
 CONFIGURE_TARGET:=      ${CONFIGURE_TARGET:S/--build=//:S/--target=//}
 
 [...] because some ports define CONFIGURE_TARGET like this :
 
 CONFIGURE_TARGET=       --target=${MACHINE_ARCH}-unknown-freebsd${OSREL}
State-Changed-From-To: closed->open 
State-Changed-By: eik 
State-Changed-When: Wed May 12 15:29:39 CEST 2004 
State-Changed-Why:  
reopen, new volunteer available 

Note that the failure of shells/bash2 is not a problem 
of this patch. Just remove the last two lines of the 
ports Makefile. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 
State-Changed-From-To: open->analyzed 
State-Changed-By: kris 
State-Changed-When: Thu Jun 10 23:50:21 GMT 2004 
State-Changed-Why:  
Now testing on a full package build.  I'll follow up with 
a list of problem ports once the build finishes. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 

From: Kris Kennaway <kris@obsecurity.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/52917 [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
Date: Sat, 12 Jun 2004 06:11:11 -0700

 ----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----
 
 Date: Sat, 12 Jun 2004 04:21:29 -0700
 From: Kris Kennaway <kris@obsecurity.org>
 Subject: Re: ports/52917 [PATCH] bsd.port.mk: update default value of
  CONFIGURE_TARGET
 In-reply-to: <200405121320.i4CDKNGX033580@freefall.freebsd.org>
 To: Florent Thoumie <flz@xbsd.org>
 Cc: portmgr@FreeBSD.org
 User-Agent: Mutt/1.4.2.1i
 
 On Wed, May 12, 2004 at 06:20:23AM -0700, Florent Thoumie wrote:
 > The following reply was made to PR ports/52917; it has been noted by GNATS.
 > 
 > From: Florent Thoumie <flz@xbsd.org>
 > To: freebsd-gnats-submit@FreeBSD.org
 > Cc: sergei@kolobov.com,
 > 	Oliver Eikemeier <eikemeier@fillmore-labs.com>
 > Subject: Re: ports/52917 [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
 > Date: Wed, 12 May 2004 15:19:36 +0200
 > 
 >  I missed one part of the work, the substitute line must be :
 >  
 >  CONFIGURE_TARGET:=      ${CONFIGURE_TARGET:S/--build=//:S/--target=//}
 >  
 >  [...] because some ports define CONFIGURE_TARGET like this :
 >  
 >  CONFIGURE_TARGET=       --target=${MACHINE_ARCH}-unknown-freebsd${OSREL}
 
 Here are the first set of ports that fail with this patch on 4.x.
 
 /usr/ports/audio/libtremor		libtremor-1.0.2.02132004
 /usr/ports/databases/pear-sqlite	pear-sqlite-1.0.2
 /usr/ports/devel/arm-elf-binutils	arm-elf-binutils-2.14_1
 /usr/ports/devel/avr-binutils		avr-binutils-2.14_1
 /usr/ports/devel/crossgo32		crossgo32-1.3_1
 /usr/ports/devel/mingw32-binutils	mingw32-binutils-2.15.90.20040222.1,1
 /usr/ports/devel/msp430-binutils	msp430-binutils-2.14_6
 /usr/ports/devel/pear-apd		pear-apd-0.4p2
 /usr/ports/devel/php-dbg		php-dbg-2.11.23
 /usr/ports/devel/php-xdebug		php-xdebug-1.3.0
 /usr/ports/devel/sourcenav		sourcenav-5.1.4_1
 /usr/ports/editors/xemacs		xemacs-21.4.14
 /usr/ports/editors/xemacs-devel		xemacs-devel-21.5.b15
 /usr/ports/editors/xemacs-devel-mule	xemacs-devel-mule-21.5.b16_1
 /usr/ports/editors/xemacs21-mule	xemacs-mule-21.4.14_1
 /usr/ports/emulators/psim-freebsd	psim-freebsd-6.0_1
 /usr/ports/games/freedoko		freedoko-0.6.4_1
 /usr/ports/graphics/pixieplus		pixieplus-0.5.4.1
 /usr/ports/graphics/quesa		quesa-1.6d18
 /usr/ports/lang/clisp			clisp-2.30_2
 /usr/ports/lang/egcs			egcs-1.1.2_1
 /usr/ports/lang/gcc28			gcc-2.8.1_1
 /usr/ports/lang/gcc295			gcc-2.95.3_2
 /usr/ports/lang/gcc30			gcc30-3.0.4_1
 /usr/ports/lang/gcc31			gcc-3.1.1_20020909
 /usr/ports/lang/gcc32			gcc-3.2.3_1
 /usr/ports/lang/gcc34			gcc-3.4.1_20040604
 /usr/ports/lang/gforth			gforth-0.6.1_2
 /usr/ports/lang/gfortran		gfortran-3.5.20040317
 /usr/ports/lang/ghc5			ghc5-5.04.3_2
 /usr/ports/lang/gnat			gnat-3.15p_1
 /usr/ports/lang/librep			librep-0.16.2_4
 /usr/ports/net-mgmt/ettercap		ettercap-0.6.b_2,1
 /usr/ports/net-mgmt/net-snmp		net-snmp-5.1.1_4
 /usr/ports/net/libsocket++		libsocket++-1.12.10
 /usr/ports/security/gnupg		gnupg-1.2.4_1
 /usr/ports/shells/bash2			bash-2.05b.007
 /usr/ports/www/abcache			abcache-0.14
 /usr/ports/www/mod_jk			mod_jk-1.2.5_1,1
 /usr/ports/www/mod_jk-apache2		mod_jk-apache2-1.2.5_1
 /usr/ports/www/mod_jk2			mod_jk2-2.0.2
 /usr/ports/www/mod_jk2-apache2		mod_jk2-apache2-2.0.2
 /usr/ports/www/pear-APC			pear-APC-2.0
 /usr/ports/www/php-dyn			php-dyn-1.2.1
 /usr/ports/www/php-screw		php-screw-1.3
 /usr/ports/www/php-templates		php-templates-1.7
 /usr/ports/www/turck-mmcache		turck-mmcache-2.4.6
 /usr/ports/x11-toolkits/php-gtk		php-gtk-1.0.0_1
 
 Logs available here:
 
   http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.4-exp.2004061011/
 
 Once these are fixed we'll need to do at least one more pass to catch
 the next set.
 
 Kris
 
 
 ----- End forwarded message -----
State-Changed-From-To: analyzed->suspended 
State-Changed-By: kris 
State-Changed-When: Fri Oct 15 23:19:02 GMT 2004 
State-Changed-Why:  
It looks like this is no longer being actively worked on. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52917 

Manually adding to audit trail by linimon:

at the portmgr meeting at BSDCan 2007, we agreed that this is still a
worthwhile idea, if we can find someone to implement it.

From: Gabor Kovesdan <gabor@FreeBSD.org>
To: bug-followup@FreeBSD.org,  sergei@kolobov.com
Cc:  
Subject: Re: ports/52917: [PATCH] bsd.port.mk: update default value of CONFIGURE_TARGET
Date: Mon, 18 Jun 2007 14:08:10 +0200

 Short response to note, that I'm addressing this issue in the SoC 2007 
 program
 
 -- 
 Gabor Kovesdan
 FreeBSD Volunteer
 
 EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org
 WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
 
State-Changed-From-To: suspended->closed 
State-Changed-By: edwin 
State-Changed-When: Thu Aug 14 06:12:50 UTC 2008 
State-Changed-Why:  
Obsoleted by ports/126524: [ports][bsd.port.mk] update CONFIGURE_TARGET for newer autoconf (>2.13) 

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