Bug 55216

Summary: [patch] devel/{automake,autoconf}: Wrong code in bsd.port.mk
Product: Ports & Packages Reporter: Ulrich Spoerlein <q>
Component: Individual Port(s)Assignee: Ade Lovett <ade>
Status: Closed FIXED    
Severity: Affects Only Me CC: ade
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Ulrich Spoerlein 2003-08-03 21:20:05 UTC
The logic, determining the path to automake/aclocal is br0ken OR
devel/automake17 installs in the wrong directory. You decide.

Fix: !! THIS HAS NOT BEEN TESTED !!

This only works when ${AUTOMAKE} and ${AUTOCONF} are invoked via Makefile. If
configure scripts blindy want to run "automake" they will fail if automake{14,17}
is installed. They will only work with automake15 == automake.

What is the correct fix? Patch all configure scripts? Or install the old_ and dev_
versions into different paths and set $PATH accordingly?

How-To-Repeat: Use USE_AUTOMAKE=17 in any port, watch it fail:
env: /usr/local/libexec/automake17/automake: No such file or directory

devel/automake14 installs bin/{aclocal14,automake14} and libexec/automake14/{aclocal,automake}
devel/automake15 installs bin/{aclocal,automake}
devel/automake17 installs bin/{aclocal17,bin/automake17}
devel/automake is duplicate of devel/automake

bsd.port.mk has the following code (around line 1173):

.if ${use_amver} == 14 || ${use_amver} == 17}
ACLOCAL_DIR=	${LOCALBASE}/share/aclocal${use_amver}
AUTOMAKE_DIR=	${LOCALBASE}/share/automake${use_amver}
ampath=		${LOCALBASE}/libexec/automake${use_amver}:
BUILD_DEPENDS+=	${ampath:S/://}/automake:${PORTSDIR}/devel/automake${use_amver}

...

.if !defined(ampath)
ACLOCAL?=	aclocal
AUTOMAKE?=	automake
.else # defined(ampath)
ACLOCAL?=	${ampath:S/://}/aclocal
AUTOMAKE?=	${ampath:S/://}/automake
.endif # !defined(ampath)

This works for automake14, but fails for automake17. I found other inconsistencies
in bsd.port.mk
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2003-08-03 22:45:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

over to bsd.port.mk maintainers
Comment 2 Ade Lovett freebsd_committer freebsd_triage 2003-08-03 23:12:34 UTC
Responsible Changed
From-To: portmgr->ade

Actually, this one is mine, and something of a duplicate of 54254, but 
I'll leave it open for tracking porpoises.
Comment 3 Samuel Tardieu 2003-10-18 18:16:05 UTC
Actually, this is not at all a duplicate of 54254. Please fix it, as it 
is *impossible* to use
automake 1.7 at this time in ports as USE_AUTOMAKE_VER=17 will fail as 
shown in
August by the original poster.
Comment 4 Ade Lovett freebsd_committer freebsd_triage 2003-10-18 22:36:30 UTC
>  Actually, this is not at all a duplicate of 54254. Please fix it, as 
> it
>  is *impossible* to use
>  automake 1.7 at this time in ports as USE_AUTOMAKE_VER=17 will fail as
>  shown in
>  August by the original poster.

Patience :)  Remember, libtool, autoconf, and automake are used by a 
considerable chunk of the ports tree, so any changes to these ports 
have to be made with great care, after considerable testing.

The work is in progress.

-aDe
Comment 5 Samuel Tardieu 2003-10-18 22:46:49 UTC
On 18/10, Ade Lovett wrote:

| Patience :)  Remember, libtool, autoconf, and automake are used by a 
| considerable chunk of the ports tree, so any changes to these ports 
| have to be made with great care, after considerable testing.

But in this case, the proposed patch by the original poster changes
only the automake 1.7 situation, which is from complete non-working to
at least somewhat working. Ever wondered why the following gives zero
output ? :)

% find /usr/ports -name Makefile -exec egrep 'AUTOMAKE_VER[ 	]*=[ 	]*17' {} \; -print

  Sam
Comment 6 Ade Lovett freebsd_committer freebsd_triage 2003-10-19 00:07:46 UTC
> But in this case, the proposed patch by the original poster changes
> only the automake 1.7 situation, which is from complete non-working to
> at least somewhat working. Ever wondered why the following gives zero
> output ? :)

This doesn't change the basic remit that ANYTHING involving 
libtool/autoconf/automake needs to be TESTED across the entire ports 
tree, on a number of occasions, to ensure that things don't get 
arbitrarily broken.

If you happen to have patches that covers dealing with full versioned 
dependencies, and doesn't break anything into the bargain, for ALL of 
the versions of libtool, autoconf, automake in the tree (along with a 
couple of minor upgrades), I'm all ears :)

-aDe
Comment 7 Ade Lovett freebsd_committer freebsd_triage 2004-06-04 18:37:46 UTC
State Changed
From-To: open->closed

Fixed with bsd.autotools.mk update.