Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Aug 2003 22:18:53 +0200 (CEST)
From:      Ulrich Spoerlein <q@uni.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ade@FreeBSD.org
Subject:   ports/55216: devel/{automake,autoconf}: Wrong code in bsd.port.mk
Message-ID:  <200308032018.h73KIr2D058436@roadrunner.local>
Resent-Message-ID: <200308032020.h73KK5to013273@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         55216
>Category:       ports
>Synopsis:       devel/{automake,autoconf}: Wrong code in bsd.port.mk
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 03 13:20:05 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
>Environment:
System: FreeBSD roadrunner 5.1-RELEASE FreeBSD 5.1-RELEASE #5: Thu Jul 17 17:32:28 CEST 2003 root@roadrunner:/usr/obj/usr/src/sys/ROADRUNNER i386
>Description:
The logic, determining the path to automake/aclocal is br0ken OR
devel/automake17 installs in the wrong directory. You decide.
>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

>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?


--- bsd.port.mk.orig	Sun Aug  3 21:54:24 2003
+++ bsd.port.mk	Sun Aug  3 22:17:12 2003
@@ -222,7 +222,7 @@
 # WANT_AUTOCONF_VER (PORT MAY SET THIS VALUE)
 #				- Implies GNU_CONFIGURE=yes.
 #				- Says that the port wants autoconf; legal values
-#				  are: 213, 253, 254.
+#				  are: 213, 253, 257.
 #				- Each specify a version of autoconf to use
 #				  and appropriatly set AUTOCONF{,_DIR} and other
 #				  autoconf-related program paths.
@@ -1151,7 +1151,7 @@
 dev_amver=	17
 old_acver=	213
 cur_acver=	253
-dev_acver=	254
+dev_acver=	257
 
 ########## automake setup
 .if defined(USE_AUTOMAKE_VER)
@@ -1173,8 +1173,7 @@
 .elif ${use_amver} == ${old_amver} || ${use_amver} == ${dev_amver}
 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}
+BUILD_DEPENDS+=	${LOCALBASE}/bin/automake${use_amver}:${PORTSDIR}/devel/automake${use_amver}
 .if ${use_amver} == ${old_amver}
 AUTOMAKE_ARGS+=	-i
 WANT_AUTOCONF_VER?=${old_acver}
@@ -1205,20 +1204,12 @@
 BUILD_DEPENDS+=		${LOCALBASE}/bin/autoconf:${PORTSDIR}/devel/autoconf
 .elif ${use_acver} == ${old_acver} || ${use_acver} == ${dev_acver}
 AUTOCONF_DIR=	${LOCALBASE}/share/autoconf${use_acver}
-acpath=			${LOCALBASE}/libexec/autoconf${use_acver}
-BUILD_DEPENDS+=	${acpath}/autoconf:${PORTSDIR}/devel/autoconf${use_acver}
+BUILD_DEPENDS+=	${LOCALBASE}/bin/autoconf${use_acver}:${PORTSDIR}/devel/autoconf${use_acver}
 .else # bad autoconf version
 BROKEN="unknown AUTOCONF version: ${USE_AUTOCONF_VER}"
 .endif # ${use_acver} == ${cur_acver}
 .endif # defined(WANT_AUTOCONF_VER)
 
-########## set up paths to tools
-.if defined(ampath)
-autotools_path=${ampath}${acpath}
-.elif defined(acpath)
-autotools_path=${acpath}
-.endif # defined(ampath)
-
 ########## prefix to path, add to env vars
 .if defined(autotools_path)
 MAKE_ENV+=	PATH=${autotools_path}:${PATH}
@@ -1232,32 +1223,32 @@
 
 ########## set up automake "names"
 .if defined(use_amver)
-.if !defined(ampath)
+.if ${use_amver} == ${cur_amver}
 ACLOCAL?=	aclocal
 AUTOMAKE?=	automake
-.else # defined(ampath)
-ACLOCAL?=	${ampath:S/://}/aclocal
-AUTOMAKE?=	${ampath:S/://}/automake
-.endif # !defined(ampath)
+.elif ${use_amver} == ${old_amver} || ${use_amver} == ${dev_amver}
+ACLOCAL?=	aclocal${use_amver}
+AUTOMAKE?=	automake${use_amver}
+.endif # unknown use_amver value
 .endif # defined(use_amver)
 
 ########## set up autoconf "names"
 .if defined(use_acver)
-.if !defined(acpath)
+.if ${use_acver} == ${cur_acver}
 AUTOCONF?=		autoconf
 AUTOHEADER?=	autoheader
 AUTOIFNAMES?=	ifnames
 AUTORECONF?=	autoreconf
 AUTOSCAN?=		autoscan
 AUTOUPDATE?=	autoupdate
-.else # defined(acpath)
-AUTOCONF?=		${acpath}/autoconf
-AUTOHEADER?=	${acpath}/autoheader
-AUTOIFNAMES?=	${acpath}/ifnames
-AUTORECONF?=	${acpath}/autoreconf
-AUTOSCAN?=		${acpath}/autoscan
-AUTOUPDATE?=	${acpath}/autoupdate
-.endif # !defined(acpath)
+.elif ${use_acver} == ${old_acver} || ${use_acver} == ${dev_acver}
+AUTOCONF?=		autoconf${use_acver}
+AUTOHEADER?=	autoheader${use_acver}
+AUTOIFNAMES?=	ifnames${use_acver}
+AUTORECONF?=	autoreconf${use_acver}
+AUTOSCAN?=		autoscan${use_acver}
+AUTOUPDATE?=	autoupdate${use_acver}
+.endif # unkown use_acver value
 .endif # defined(use_acver)
 
 ########## stupid port error checking
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308032018.h73KIr2D058436>