From nobody@FreeBSD.org  Sat Aug  3 21:03:45 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 525C7A20
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  3 Aug 2013 21:03:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 720DA2DBB
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  3 Aug 2013 21:03:44 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r73L3dsp063463
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 3 Aug 2013 21:03:39 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r73L3dNq063458;
	Sat, 3 Aug 2013 21:03:39 GMT
	(envelope-from nobody)
Message-Id: <201308032103.r73L3dNq063458@oldred.freebsd.org>
Date: Sat, 3 Aug 2013 21:03:39 GMT
From: "r4721@tormail.org" <r4721@tormail.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] improve clang detection in net/socat
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181007
>Category:       ports
>Synopsis:       [patch] improve clang detection in net/socat
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ehaupt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 03 21:10:00 UTC 2013
>Closed-Date:    Sun Aug 04 17:57:51 CEST 2013
>Last-Modified:  Sun Aug  4 16:00:00 UTC 2013
>Originator:     r4721@tormail.org
>Release:        
>Organization:
>Environment:
>Description:
changes the clang detector to use a pattern match instead of a conditional define and always test. this fixes build on 9-stable with WITH_CLANG_IS_CC and saves some shell commands.

tested with both clang as cc and gcc as cc, the cflag was only inserted with clang.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: net/socat/Makefile
===================================================================
--- net/socat/Makefile	(revision 324019)
+++ net/socat/Makefile	(working copy)
@@ -33,11 +34,9 @@
 LDFLAGS+=	-L${LOCALBASE}/lib
 .endif
 
-.if(${OSVERSION} >= 1000024)
-CCISCLANG!=	${CC} --version | ${HEAD} -1 | ${GREP} 'clang'
-.endif
+CCISCLANG!=	${CC} --version
 
-.if ${CC} == clang || defined(CCISCLANG)
+.if !empty(CCISCLANG:M*clang*)
 CFLAGS+=	-Wno-unused-comparison
 .endif
 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ehaupt 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Aug 3 21:10:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181007 
State-Changed-From-To: open->closed 
State-Changed-By: ehaupt 
State-Changed-When: Sun Aug 4 17:57:50 CEST 2013 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/181007: commit references a PR
Date: Sun,  4 Aug 2013 15:57:53 +0000 (UTC)

 Author: ehaupt
 Date: Sun Aug  4 15:57:40 2013
 New Revision: 324242
 URL: http://svnweb.freebsd.org/changeset/ports/324242
 
 Log:
   Change the clang detector to use a pattern match instead of a conditional
   define and always test. This fixes build on 9-STABLE and saves some shell
   commands.
   
   PR:		181007
   Submitted by:	"r4721@tormail.org" <r4721@tormail.org>
 
 Modified:
   head/net/socat/Makefile
 
 Modified: head/net/socat/Makefile
 ==============================================================================
 --- head/net/socat/Makefile	Sun Aug  4 15:43:18 2013	(r324241)
 +++ head/net/socat/Makefile	Sun Aug  4 15:57:40 2013	(r324242)
 @@ -33,11 +33,9 @@ CFLAGS+=	-I${LOCALBASE}/include
  LDFLAGS+=	-L${LOCALBASE}/lib
  .endif
  
 -.if(${OSVERSION} >= 1000024)
 -CCISCLANG!=	${CC} --version | ${HEAD} -1 | ${GREP} 'clang'
 -.endif
 +CCISCLANG!=	${CC} --version
  
 -.if ${CC} == clang || !empty(CCISCLANG)
 +.if !empty(CCISCLANG:M*clang*)
  CFLAGS+=	-Wno-unused-comparison
  .endif
  
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
