From nobody@FreeBSD.org  Sat May 21 10:34:24 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B4FFC1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 May 2011 10:34:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A58B38FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 May 2011 10:34:24 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p4LAYOrD000353
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 May 2011 10:34:24 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p4LAYOeV000351;
	Sat, 21 May 2011 10:34:24 GMT
	(envelope-from nobody)
Message-Id: <201105211034.p4LAYOeV000351@red.freebsd.org>
Date: Sat, 21 May 2011 10:34:24 GMT
From: bf <bf@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] ftp/lftp: fix build on -current
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157233
>Category:       ports
>Synopsis:       [PATCH] ftp/lftp: fix build on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    martymac
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 10:40:12 UTC 2011
>Closed-Date:    Mon May 23 13:12:19 UTC 2011
>Last-Modified:  Mon May 23 13:20:10 UTC 2011
>Originator:     bf
>Release:        FreeBSD 9 amd64
>Organization:
-
>Environment:
>Description:
On 18 May 2011, mdf@ added an implementation of posix_fallocate() to -current:

http://svnweb.FreeBSD.org/base?view=revision&revision=220791

The lftp configure script detects this and sets HAVE_POSIX_FALLOCATE in ${WRKSRC}/confdefs.h.  This breaks the build because ${WRKSRC}/src/Torrent.cc then attempts to use posix_fallocate() with POSIX_FADV_SEQUENTIAL and POSIX_FADV_NOREUSE, and FreeBSD still does not have POSIX_FADV*.  To fix the build, disable the detection of posix_fallocate() in the configure script.

While here, remove the explicit addition of CPPFLAGS to CONFIGURE_ENV: that is now done in bsd.port.mk.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/ftp/lftp/Makefile,v
retrieving revision 1.158
diff -u -r1.158 Makefile
--- Makefile	16 May 2011 12:14:34 -0000	1.158
+++ Makefile	21 May 2011 10:31:08 -0000
@@ -27,8 +27,11 @@
 USE_ICONV=	yes
 USE_GZIP=	yes
 
+CPPFLAGS+=	-I${LOCALBASE}/include
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+#FreeBSD 9.x has posix_fallocate() for OSVERSION > 900035,
+#but is missing the  required POSIX_FADV_* macros
+CONFIGURE_ENV=	i_cv_posix_fallocate_works=no \
 		LIBS="-L${LOCALBASE}/lib"
 MAKE_JOBS_SAFE=	yes
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->martymac 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat May 21 10:40:22 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157233 
State-Changed-From-To: open->closed 
State-Changed-By: martymac 
State-Changed-When: Mon May 23 13:12:18 UTC 2011 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157233 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157233: commit references a PR
Date: Mon, 23 May 2011 13:10:18 +0000 (UTC)

 martymac    2011-05-23 13:10:06 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ftp/lftp             Makefile 
   Log:
   - Fix build on OSVERSION > 900035 by disabling use of posix_fallocate()
   - Remove CPPFLAGS from CONFIGURE_ENV
   
   PR:             ports/157233
   Submitted by:   bf
   
   Revision  Changes    Path
   1.159     +4 -1      ports/ftp/lftp/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
