From johann@shuffle.egenetics.com  Mon Oct  8 09:43:08 2001
Return-Path: <johann@shuffle.egenetics.com>
Received: from shuffle.egenetics.com (shuffle.egenetics.com [196.38.142.112])
	by hub.freebsd.org (Postfix) with ESMTP id 9650437B409
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2001 09:43:05 -0700 (PDT)
Received: (from johann@localhost)
	by shuffle.egenetics.com (8.11.6/8.11.5) id f98Gh1797100;
	Mon, 8 Oct 2001 18:43:01 +0200 (SAST)
	(envelope-from johann)
Message-Id: <200110081643.f98Gh1797100@shuffle.egenetics.com>
Date: Mon, 8 Oct 2001 18:43:01 +0200 (SAST)
From: Johann Visagie <wjv@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: patch-libtool target in bsd.port.mk breaks some ports
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31142
>Category:       ports
>Synopsis:       patch-libtool target in bsd.port.mk breaks some ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 09:50:00 PDT 2001
>Closed-Date:    Thu Apr 25 08:30:53 PDT 2002
>Last-Modified:  Thu Apr 25 08:30:53 PDT 2002
>Originator:     Johann Visagie
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
>Description:
The overly general sed(1) substitution applied in the patch-libtool target of
bsd.port.mk breaks the build process of several packages.  Two examples of
such packages are iODBC (http://www.iodbc.org/) and ORBit-C++
(http://orbitcpp.sourceforge.net).

These packages ship with an autoconf 2.13-generated configure script which
contain the following line:

  ltmain="$ac_aux_dir/ltmain.sh"

The value of ${ltmain} is later tested for file existence in order to
determine whether to build the libtool script:

  if test -f "$ltmain"; then
    <<create libtool>>
  fi

If these packages are wrapped in a port with USE_LIBTOOL defined, the
patch-libtool target in bsd.port.mk munges the line where ${ltmain} is
defined to become:

  ltmain="--disable-ltlibs /usr/local/share/libtool/ltmain.sh"

This of course fails the "test -f", with the result that libtool is never
created and the port build breaks.

The attached patch restricts the scope of the sed(1) substitution to lines
starting with "ltmain=".
>How-To-Repeat:
>Fix:
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.382
diff -u -r1.382 bsd.port.mk
--- bsd.port.mk	2001/09/28 16:45:15	1.382
+++ bsd.port.mk	2001/10/04 13:15:28
@@ -2209,7 +2209,7 @@
 	 for file in ${LIBTOOLFILES}; do \
 		${CP} $$file $$file.tmp; \
 		${SED} -e "s^\$$ac_aux_dir/ltconfig^$${LIBTOOLDIR}/ltconfig^g" \
-			-e "s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} $${LIBTOOLDIR}/ltmain.sh^g" \
+			-e "/^ltmain=/!s^\$$ac_aux_dir/ltmain.sh^${LIBTOOLFLAGS} $${LIBTOOLDIR}/ltmain.sh^g" \
 			$$file.tmp > $$file; \
 	 done);
 .endif
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sobomax 
State-Changed-When: Thu Apr 25 08:30:48 PDT 2002 
State-Changed-Why:  
The problem was resolved in rev.1.410 of bsd.port.mk. Thank you for submission! 

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