From swell.k@gmail.com  Wed Sep 22 08:33:35 2010
Return-Path: <swell.k@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF69B1065674
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Sep 2010 08:33:35 +0000 (UTC)
	(envelope-from swell.k@gmail.com)
Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 76FF38FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Sep 2010 08:33:35 +0000 (UTC)
Received: by iwn34 with SMTP id 34so422312iwn.13
        for <FreeBSD-gnats-submit@freebsd.org>; Wed, 22 Sep 2010 01:33:34 -0700 (PDT)
Received: by 10.231.11.66 with SMTP id s2mr2846510ibs.167.1285144414809;
        Wed, 22 Sep 2010 01:33:34 -0700 (PDT)
Received: from localhost (tor-exit-proxy7-readme.formlessnetworking.net [208.53.142.43])
        by mx.google.com with ESMTPS id n20sm10222889ibe.11.2010.09.22.01.33.32
        (version=SSLv3 cipher=RC4-MD5);
        Wed, 22 Sep 2010 01:33:34 -0700 (PDT)
Message-Id: <86hbhimbdp.fsf@gmail.com>
Date: Wed, 22 Sep 2010 12:27:14 +0400
From: Anonymous <swell.k@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] ftp/curl: respect -g[0-3] and -O[0-4] in CFLAGS

>Number:         150854
>Category:       ports
>Synopsis:       [patch] ftp/curl: respect -g[0-3] and -O[0-4] in CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    roam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 22 08:40:01 UTC 2010
>Closed-Date:    Sun Dec 19 20:24:28 UTC 2010
>Last-Modified:  Sun Dec 19 20:24:28 UTC 2010
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
>Description:
Don't override DEBUG_FLAGS either added via WITH_DEBUG or manually,
i.e. remove -g0 for WITHOUT_CURL_DEBUG and -g for WITH_CURL_DEBUG.

And erase -O2 from flags_opt_yes in case CFLAGS doesn't have -O2.
>How-To-Repeat:
$ export WITH_DEBUG= DEBUG_FLAGS=-g3
$ make -V CFLAGS
-pipe -g3
$ make
...
libtool: compile:  cc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -I/usr/local/include -I/usr/include/openssl -I/usr/local/include -pipe -g0 -O2 -Wno-system-headers -Werror -MT http.lo -MD -MP -MF .deps/http.Tpo -c http.c  -fPIC -DPIC -o http.o >/dev/null 2>&1

Neither -g0 nor -O2 is present in CFLAGS.
>Fix:
--- a.diff begins here ---
Index: ftp/curl/Makefile
===================================================================
RCS file: /a/.cvsup/ports/ftp/curl/Makefile,v
retrieving revision 1.110
diff -u -p -r1.110 Makefile
--- ftp/curl/Makefile	12 Sep 2010 21:05:47 -0000	1.110
+++ ftp/curl/Makefile	22 Sep 2010 05:35:52 -0000
@@ -221,6 +221,10 @@ DOCS=		BINDINGS BUGS CONTRIBUTE DISTRO-D
 		curl-config.html curl-config.pdf curl.html curl.pdf \
 		index.html
 
+post-patch:	.SILENT
+	${REINPLACE_CMD} -Ee 's/(flags_(dbg|opt)_[^=]*)=".*"/\1=""/' \
+		${WRKSRC}/configure
+
 post-install:
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->roam 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Sep 22 08:40:08 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150854 
State-Changed-From-To: open->analyzed 
State-Changed-By: roam 
State-Changed-When: Sun Sep 26 02:52:37 UTC 2010 
State-Changed-Why:  
Looking into this, thanks for your work on curl! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150854: commit references a PR
Date: Sun, 19 Dec 2010 20:04:29 +0000 (UTC)

 roam        2010-12-19 20:04:23 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ftp/curl             Makefile distinfo pkg-plist 
     ftp/curl/files       patch-Makefile.in patch-configure 
                          patch-lib::url.c patch-src::main.c 
   Log:
   Update cURL to 7.21.3 and fix its librtmp detection.  In the process:
   - disable the -Werror build option by popular demand
   - do not override the user's debug and optimization settings
   
   PR:             150854 (the debug and optimization CFLAGS)
   Reported by:    Anonymous <swell.k@gmail.com>
   
   Revision  Changes    Path
   1.111     +4 -10     ports/ftp/curl/Makefile
   1.59      +2 -3      ports/ftp/curl/distinfo
   1.9       +3 -3      ports/ftp/curl/files/patch-Makefile.in
   1.14      +102 -9    ports/ftp/curl/files/patch-configure
   1.10      +2 -2      ports/ftp/curl/files/patch-lib::url.c
   1.12      +3 -3      ports/ftp/curl/files/patch-src::main.c
   1.30      +2 -0      ports/ftp/curl/pkg-plist
 _______________________________________________
 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"
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: roam 
State-Changed-When: Sun Dec 19 20:23:57 UTC 2010 
State-Changed-Why:  
I've committed a curl port update to 7.21.3, which includes 
a fix for this problem.  Thanks for bringing it to our attention! 

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