Bug 41909

Summary: libtool substitution in bsd.port.mk breaks with trailing slash
Product: Ports & Packages Reporter: Skye Poier <skye>
Component: Individual Port(s)Assignee: Ade Lovett <ade>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Skye Poier 2002-08-22 19:50:01 UTC
If you set path = (/usr/local/bin/ $path) and try to install a port that depends on libtool, bsd.port.mk will fail during libtool path substitution:

LIBTOOLDIR=`${WHICH} ${LIBTOOL} | ${SED} -e 's^/bin/libtool^/share/libtool^'` ||
+${LOCALBASE}/share/libtool; \

because 'which libtool' returns /usr/local/bin//libtool

Fix: 

Pattern should be fixed in bsd.port.mk
Comment 1 Trevor Johnson freebsd_committer freebsd_triage 2002-08-22 20:12:46 UTC
Responsible Changed
From-To: freebsd-ports->portmgr

to maintainer
Comment 2 matt 2002-11-09 06:35:26 UTC
Pathnames specified in $path shouldn't really have trailing slashes, so the
pattern really isn't at fault.

However, to act defensively, we could do something like this:

LIBTOOLDIR=`${WHICH} ${LIBTOOL} | ${SED} -e
's^/bin/libtool^/share/libtool^ -e 's^//^/^'` || ${LOCALBASE}/share/libtool;
\
Comment 3 Ade Lovett freebsd_committer freebsd_triage 2003-01-20 04:52:39 UTC
Responsible Changed
From-To: portmgr->ade

I'll be looking at all things libtool prior to 4.8-RELEASE
Comment 4 Hartmut Brandt 2003-03-17 11:39:11 UTC
The same problem exists on FreeBSD-5.0 (ports/50069).

Note, that any number of trailing slash is absolutely legal as far as I 
remember POSIX.

harti
Comment 5 Kris Kennaway freebsd_committer freebsd_triage 2003-04-13 04:46:14 UTC
State Changed
From-To: open->closed

Superceded by 50069