From nobody@FreeBSD.org  Sat Jan 19 07:51:26 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 0C29110D
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Jan 2013 07:51:26 +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 DB923F80
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Jan 2013 07:51:25 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r0J7pP3M064204
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Jan 2013 07:51:25 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r0J7pPxO064195;
	Sat, 19 Jan 2013 07:51:25 GMT
	(envelope-from nobody)
Message-Id: <201301190751.r0J7pPxO064195@red.freebsd.org>
Date: Sat, 19 Jan 2013 07:51:25 GMT
From: Rainer Hurling <rhurlin@gwdg.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] graphics/hugin: fix build with clang
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         175427
>Category:       ports
>Synopsis:       [patch] graphics/hugin: fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 19 08:00:00 UTC 2013
>Closed-Date:    Mon Jan 21 09:24:12 UTC 2013
>Last-Modified:  Mon Jan 21 09:30:00 UTC 2013
>Originator:     Rainer Hurling
>Release:        10.0-CURRENT (amd64)
>Organization:
>Environment:
FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r245605: Fri Jan 18 17:40:59 CET 2013     xxx@xxx.xxx.:/usr/obj/usr/src/sys/XXX  amd64
>Description:
graphics/hugin does not build with clang.

This is because of some minor issues in zthreads Guard.h and can be fixed with a small patch, as glarkin@ suggested on ports@.

Another patch from vd@, also suggested on ports@, fixes a small bug in logger.h.

>How-To-Repeat:
Try to build graphics/hugin with clang.
>Fix:
All I did is making an updated patch of both issues mentioned above, and now hugin should be able to build with clang.

Patch attached with submission follows:

diff -Naur hugin.orig/files/patch-src__foreign__flann__util__logger.h hugin/files/patch-src__foreign__flann__util__logger.h
--- hugin.orig/files/patch-src__foreign__flann__util__logger.h	1970-01-01 01:00:00.000000000 +0100
+++ hugin/files/patch-src__foreign__flann__util__logger.h	2013-01-18 19:05:12.000000000 +0100
@@ -0,0 +1,10 @@
+--- src/foreign/flann/util/logger.h.orig	2011-12-02 18:02:36.925022000 +0100
++++ src/foreign/flann/util/logger.h	2013-01-18 19:04:18.000000000 +0100
+@@ -32,6 +32,7 @@
+ #define LOGGER_H
+ 
+ #include <cstdio>
++#include <stdarg.h>
+ #include "flann/general.h"
+ 
+ 
diff -Naur hugin.orig/files/patch-src__foreign__zthread__include__zthread__Guard.h hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h
--- hugin.orig/files/patch-src__foreign__zthread__include__zthread__Guard.h	1970-01-01 01:00:00.000000000 +0100
+++ hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h	2013-01-18 19:10:18.000000000 +0100
@@ -0,0 +1,31 @@
+--- src/foreign/zthread/include/zthread/Guard.h.orig	2011-12-02 18:02:37.253022000 +0100
++++ src/foreign/zthread/include/zthread/Guard.h	2013-01-18 19:08:14.000000000 +0100
+@@ -108,7 +108,7 @@
+   }
+ 
+   template <class LockType>
+-  static void createScope(LockHolder<LockType>& l, unsigned long ms) {
++  static bool createScope(LockHolder<LockType>& l, unsigned long ms) {
+ 
+     if(Scope1::createScope(l, ms))
+       if(!Scope2::createScope(l, ms)) {
+@@ -428,8 +428,8 @@
+   template <class U, class V>
+   Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
+ 
+-    LockingPolicy::shareScope(*this, extract(g));
+-    
++    LockingPolicy::shareScope(*this, this->extract(g));
++
+   }
+ 
+   /**
+@@ -458,7 +458,7 @@
+   template <class U, class V>
+   Guard(Guard<U, V>& g, LockType& lock) : LockHolder<LockType>(lock) {
+ 
+-    LockingPolicy::transferScope(*this, extract(g));
++    LockingPolicy::transferScope(*this, this->extract(g));
+ 
+   }
+ 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->vd 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jan 19 08:00:09 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175427 
State-Changed-From-To: open->closed 
State-Changed-By: vd 
State-Changed-When: Mon Jan 21 09:23:55 UTC 2013 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/175427: commit references a PR
Date: Mon, 21 Jan 2013 09:23:47 +0000 (UTC)

 Author: vd
 Date: Mon Jan 21 09:23:33 2013
 New Revision: 310757
 URL: http://svnweb.freebsd.org/changeset/ports/310757
 
 Log:
   Make graphics/hugin compilable with clang.
   
   PR:		ports/175427
   Submitted by:	Rainer Hurling <rhurlin@gwdg.de>
 
 Added:
   head/graphics/hugin/files/patch-src__foreign__flann__util__logger.h   (contents, props changed)
   head/graphics/hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h   (contents, props changed)
 
 Added: head/graphics/hugin/files/patch-src__foreign__flann__util__logger.h
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/graphics/hugin/files/patch-src__foreign__flann__util__logger.h	Mon Jan 21 09:23:33 2013	(r310757)
 @@ -0,0 +1,10 @@
 +--- src/foreign/flann/util/logger.h.orig	2013-01-18 09:26:49.000000000 +0200
 ++++ src/foreign/flann/util/logger.h	2013-01-18 09:26:20.000000000 +0200
 +@@ -32,6 +32,7 @@
 + #define LOGGER_H
 + 
 + #include <cstdio>
 ++#include <stdarg.h>
 + #include "flann/general.h"
 + 
 + namespace flann
 
 Added: head/graphics/hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/graphics/hugin/files/patch-src__foreign__zthread__include__zthread__Guard.h	Mon Jan 21 09:23:33 2013	(r310757)
 @@ -0,0 +1,30 @@
 +--- src/foreign/zthread/include/zthread/Guard.h.orig      2011-12-02 18:02:37.253022000 +0100
 ++++ src/foreign/zthread/include/zthread/Guard.h    2013-01-18 19:08:14.000000000 +0100
 +@@ -108,7 +108,7 @@
 +   }
 + 
 +   template <class LockType>
 +-  static void createScope(LockHolder<LockType>& l, unsigned long ms) {
 ++  static bool createScope(LockHolder<LockType>& l, unsigned long ms) {
 + 
 +     if(Scope1::createScope(l, ms))
 +       if(!Scope2::createScope(l, ms)) {
 +@@ -428,8 +428,8 @@
 +   template <class U, class V>
 +   Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
 + 
 +-    LockingPolicy::shareScope(*this, extract(g));
 +-    
 ++    LockingPolicy::shareScope(*this, this->extract(g));
 ++
 +   }
 + 
 +   /**
 +@@ -458,7 +458,7 @@
 +   template <class U, class V>
 +   Guard(Guard<U, V>& g, LockType& lock) : LockHolder<LockType>(lock) {
 + 
 +-    LockingPolicy::transferScope(*this, extract(g));
 ++    LockingPolicy::transferScope(*this, this->extract(g));
 + 
 +   }
 _______________________________________________
 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:
