From owner-freebsd-ports@FreeBSD.ORG Tue Jul 12 15:27:11 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E79F5106564A for ; Tue, 12 Jul 2011 15:27:11 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id A90528FC12 for ; Tue, 12 Jul 2011 15:27:11 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id p6CEqq3p039166 for ; Tue, 12 Jul 2011 08:52:52 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id p6CEqqiA039163 for ; Tue, 12 Jul 2011 08:52:52 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 12 Jul 2011 08:52:52 -0600 (MDT) From: Warren Block To: ports@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Tue, 12 Jul 2011 08:52:52 -0600 (MDT) Cc: Subject: readlink -f X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2011 15:27:12 -0000 At the end of 2010, the -f option was added to the native readlink/stat(1) for CURRENT[1]. It was MFCed to RELENG-7 and -8 two weeks later[2]. "readlink -f" works in CURRENT, 7-STABLE, or 8-STABLE since then. Porters running these newer versions may find "readlink -f" slipping through in their ports. But it fails on 7.4-RELEASE and 8.2-RELEASE.[3] One way to fix the problem is to replace 'readlink -f' with 'realpath', as done in the graphics/darktable port[4] and shamelessly copied by me for the Arduino port[5]. More elegant would be to check OSVERSION and only patch if necessary. These are untested: RELENG-7: >=704100 RELENG-8: >=802501 CURRENT: >=900027 1. http://svnweb.freebsd.org/base?view=revision&revision=216203 2. http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/stat/stat.c 3. http://forums.freebsd.org/showthread.php?t=24839 4. http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/darktable/Makefile?rev=1.13;content-type=text%2Fplain 5. http://www.freebsd.org/cgi/query-pr.cgi?pr=158832