From girgen@palle.girgensohn.se  Fri Nov 26 18:16:27 2004
Return-Path: <girgen@palle.girgensohn.se>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id EEA1316A4D0; Fri, 26 Nov 2004 18:16:27 +0000 (GMT)
Received: from palle.girgensohn.se (1-2-8-5a.asp.sth.bostream.se [82.182.157.66])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 0B20843D1F; Fri, 26 Nov 2004 18:16:27 +0000 (GMT)
	(envelope-from girgen@palle.girgensohn.se)
Received: from localhost (localhost.girgensohn.se [127.0.0.1])
	by palle.girgensohn.se (Postfix) with ESMTP id C54141CDD0;
	Fri, 26 Nov 2004 19:16:26 +0100 (CET)
Received: from palle.girgensohn.se ([127.0.0.1])
 by localhost (palle.girgensohn.se [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id 00558-03; Fri, 26 Nov 2004 19:16:26 +0100 (CET)
Received: by palle.girgensohn.se (Postfix, from userid 1000)
	id 6E6791CDA4; Fri, 26 Nov 2004 19:16:26 +0100 (CET)
Message-Id: <20041126181626.6E6791CDA4@palle.girgensohn.se>
Date: Fri, 26 Nov 2004 19:16:26 +0100 (CET)
From: Palle Girgensohn <girgen@pingpong.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ade@FreeBSD.org
Subject: [PATCH] devel/automake: [SUMMARIZE CHANGES]
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         74435
>Category:       ports
>Synopsis:       [PATCH] devel/automake19: [SUMMARIZE CHANGES]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ade
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 26 18:20:23 GMT 2004
>Closed-Date:    Thu Jul 28 02:09:13 GMT 2005
>Last-Modified:  Thu Jul 28 02:09:13 GMT 2005
>Originator:     Palle Girgensohn
>Release:        FreeBSD 5.3-RELEASE-p1 i386
>Organization:
Ping Pong AB
>Environment:
System: FreeBSD palle.girgensohn.se 5.3-RELEASE-p1 FreeBSD 5.3-RELEASE-p1 #16: Sat Nov 20 04:26:58 CET 2004
>Description:
[DESCRIBE CHANGES]

I'm having some difficulties with devel/automake19. I think it is a
problem related to the splendid split between different versions of
the autotools.

in /usr/local/share/aclocal19/init.m4:

# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)

This stuff creates the aclocal.m4 file in the src root when running
aclocal19 -I m4. As you can see, none of these files will be found,
since the files are installed as aclocal19, autoconf25x, automake19
and autoheader259.

I work with a pretty big project that uses automake/autoconf. When
working with my these sources, I get this when modifying a Makefile.am
or configure.ac or similar:

------------------
cd ../pingpong && /bin/bash /home/girgen/cvs/foo/pingpong/missing --run aclocal-1.9 -I m4
/home/girgen/cvs/foo/pingpong/missing: line 52: aclocal-1.9: command not found
WARNING: `aclocal-1.9' is missing on your system.  You should only need it if
         you modified `acinclude.m4' or `configure.ac'.  You might want
         to install the `Automake' and `Perl' packages.  Grab them from
         any GNU archive site.
 cd ../pingpong && /bin/bash /home/girgen/cvs/foo/pingpong/missing --run automake-1.9 --foreign
/home/girgen/cvs/foo/pingpong/missing: line 52: automake-1.9: command not found
WARNING: `automake-1.9' is missing on your system.  You should only need it if
         you modified `Makefile.am', `acinclude.m4' or `configure.ac'.
         You might want to install the `Automake' and `Perl' packages.
         Grab them from any GNU archive site.
cd ../pingpong && /bin/bash /home/girgen/cvs/foo/pingpong/missing --run autoconf
/home/girgen/cvs/foo/pingpong/missing: line 52: autoconf: command not found
WARNING: `autoconf' is missing on your system.  You should only need it if
         you modified `configure.ac'.  You might want to install the
         `Autoconf' and `GNU m4' packages.  Grab them from any GNU
         archive site.

...
...
config.status: creating po/Makefile
cd ../pingpong && /bin/sh /home/girgen/cvs/foo/pingpong/missing --run autoheader
autoheader: not found
WARNING: `autoheader' is missing on your system.  You should only need it if
         you modified `acconfig.h' or `configure.ac'.  You might want
         to install the `Autoconf' and `GNU m4' packages.  Grab them
         from any GNU archive site.
rm -f stamp-h1
touch ../pingpong/config.h.in
cd . && /bin/sh ./config.status config.h

------------------------

It is not always important run the scripts that fail above, but
sometimes they must be run, indeed, and things will fail if they
don't.

Since the automake19 port really expects the 2.59 version of autoconf,
modifying the refences to aclocal, autoconf, automake and autoheader
in m4/init.m4 will fix this with no bad side effects. Problem is, the
automake port will not build if this is done in the sources (it will
see that an m4/*.m4 file has changed, it seems, try to rebuild stuff
and fail). That's why I copy init.m4 to wrkdir during patch stage, and
install it from there at install stage. Kinda hackish, but it is the
only thing that works.

Port maintainer (ade@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- automake-1.9.3.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/automake19/Makefile,v
retrieving revision 1.56
diff -u -u -r1.56 Makefile
--- Makefile	8 Nov 2004 23:31:24 -0000	1.56
+++ Makefile	26 Nov 2004 18:06:44 -0000
@@ -37,6 +37,7 @@
 		${REINPLACE_CMD} -E 's,(automake)\.(info|texi),\1${BUILD_VERSION}\.\2,g' Makefile.in \
 	)
 	@${REINPLACE_CMD} -e 's,%%X11BASE%%,${X11BASE},g' ${WRKSRC}/aclocal.in
+	@cd ${WRKDIR} ; ${CP} ${WRKSRC}/m4/init.m4 . ; ${PATCH} -p2 < ${FILESDIR}/post-patch-m4-init.m4
 
 pre-install:
 	@${RM} -fr ${PREFIX}/share/automake${BUILD_VERSION}
@@ -49,5 +50,6 @@
 	@${LN} -sf ${PREFIX}/bin/${i}${BUILD_VERSION} \
 		${PREFIX}/libexec/automake${BUILD_VERSION}/${i}
 .endfor
+	${INSTALL_DATA} ${WRKDIR}/init.m4 ${PREFIX}/share/aclocal${BUILD_VERSION}/init.m4
 
 .include <bsd.port.mk>
--- /dev/null	Fri Nov 26 19:07:23 2004
+++ files/post-patch-m4-init.m4	Fri Nov 26 18:20:18 2004
@@ -0,0 +1,17 @@
+--- m4/init.m4~	Tue Apr 20 01:20:08 2004
++++ m4/init.m4	Wed Nov 24 02:57:18 2004
+@@ -74,10 +74,10 @@
+ # Some tools Automake needs.
+ AC_REQUIRE([AM_SANITY_CHECK])dnl
+ AC_REQUIRE([AC_ARG_PROGRAM])dnl
+-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+-AM_MISSING_PROG(AUTOCONF, autoconf)
+-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+-AM_MISSING_PROG(AUTOHEADER, autoheader)
++AM_MISSING_PROG(ACLOCAL, aclocal19)
++AM_MISSING_PROG(AUTOCONF, autoconf259)
++AM_MISSING_PROG(AUTOMAKE, automake19)
++AM_MISSING_PROG(AUTOHEADER, autoheader259)
+ AM_MISSING_PROG(MAKEINFO, makeinfo)
+ AM_PROG_INSTALL_SH
+ AM_PROG_INSTALL_STRIP
--- automake-1.9.3.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ade 
Responsible-Changed-By: ade 
Responsible-Changed-When: Fri Nov 26 20:14:49 GMT 2004 
Responsible-Changed-Why:  
Mine. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74435 
Responsible-Changed-From-To: ade->freebsd-ports-bugs 
Responsible-Changed-By: ade 
Responsible-Changed-When: Mon Mar 7 17:47:10 GMT 2005 
Responsible-Changed-Why:  
Return to the fold after releasing autotools back into the wild. 

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

From: Florent Thoumie <flz@xbsd.org>
To: girgen@pingpong.net, freebsd-gnats-submit@FreeBSD.org
Cc: ade@FreeBSD.org
Subject: Re: ports/74435: [PATCH] devel/automake19: [SUMMARIZE CHANGES]
Date: Thu, 14 Apr 2005 13:31:05 +0200

 	This patch looks pretty harmless.
 	I'm not sure we need an exp-build before committing this.
 
 	Ade, I know you've return this PR to the pool but what's your
 	opinion on this ?
 
 -- 
 Florent Thoumie
 flz@xbsd.org
 
Responsible-Changed-From-To: freebsd-ports-bugs->ade 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jun 15 06:41:47 GMT 2005 
Responsible-Changed-Why:  
Reassign to the man that didn't run away far enough and fast enough. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74435 
State-Changed-From-To: open->analyzed 
State-Changed-By: ade 
State-Changed-When: Thu Jun 16 23:56:45 GMT 2005 
State-Changed-Why:  
The patch looks good.  At one point I was experimenting with various 
autoconf/automake version matches, hoping they could be persuaded to 
co-operate a bit more. 

However, it appears that I do need to lock things down so that 
we have automake/autoconf versions (14,213) (15,253) and (19,259). 

This will require a little more work on all of the automake* ports, 
and in bsd.autotools.mk 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74435 
State-Changed-From-To: analyzed->closed 
State-Changed-By: ade 
State-Changed-When: Thu Jul 28 02:05:58 GMT 2005 
State-Changed-Why:  
I've given this considerable further thought and have decided that 
such a solution is not in fact optimal. 

The versioned autotools are only used for building other ports in 
the tree, where the appropriate USE_AUTOTOOLS foo takes care of 
the paths. 

In the case of an IDE, or general cross-platform development, the 
gnu- versions should be used, which all install into a single 
location, so it's merely a matter of some PATH logic to make 
things work. 

As such, the patches would, in my opinion, only result in further 
divergence from the upstream source, where such changes are unlikely 
to happen, and give us nothing over the existing USE_AUTOTOOLS 
framework for building other ports. 

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