From nobody@FreeBSD.org  Wed Mar  7 11:17:16 2012
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 0490D106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  7 Mar 2012 11:17:16 +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 C7E5F8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  7 Mar 2012 11:17:15 +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 q27BHF5o000544
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 7 Mar 2012 11:17:15 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q27BHFQd000543;
	Wed, 7 Mar 2012 11:17:15 GMT
	(envelope-from nobody)
Message-Id: <201203071117.q27BHFQd000543@red.freebsd.org>
Date: Wed, 7 Mar 2012 11:17:15 GMT
From: Shane Ambler <FreeBSD@Shaneware.biz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Build multimedia/dirac with clang [patch]
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         165814
>Category:       ports
>Synopsis:       Build multimedia/dirac with clang [patch]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 07 11:20:10 UTC 2012
>Closed-Date:    Wed Apr 11 02:35:05 UTC 2012
>Last-Modified:  Mon Apr 16 03:10:11 UTC 2012
>Originator:     Shane Ambler
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD leader.local 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Wed Feb 15 16:03:18 CST 2012     root@:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The attached patches allow multimedia/dirac to be compiled with clang.

Tested with tinderbox to build with combinations of 10-CURRENT and 9-STABLE with gcc and clang and ARCH i386 and amd64
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files
#	files/patch-doc__Makefile.in
#	files/patch-configure
#
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/patch-doc__Makefile.in
sed 's/^X//' >files/patch-doc__Makefile.in << '572a203d69839534e6c4af9460287da9'
X--- ./doc/Makefile.in.orig	2012-03-07 07:11:51.000000000 +1030
X+++ ./doc/Makefile.in	2012-03-07 07:11:55.793045000 +1030
X@@ -390,7 +390,7 @@
X 	doxygen $(srcdir)/dirac_api.doxygen
X 
X install-data-hook:
X-	cp -dR html/* $(DESTDIR)$(htmldir)
X+	cp -R html/* $(DESTDIR)$(htmldir)
X # Tell versions [3.59,3.63) of GNU make to not export all variables.
X # Otherwise a system limit (for SysV at least) may be exceeded.
X .NOEXPORT:
572a203d69839534e6c4af9460287da9
echo x - files/patch-configure
sed 's/^X//' >files/patch-configure << '5cae8e2426c154e1c1a4408c02b2ed73'
X--- ./configure.orig	2009-02-11 12:13:40.000000000 +1030
X+++ ./configure	2012-03-07 07:33:48.000000000 +1030
X@@ -3497,7 +3497,7 @@
X case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
X 
X 
X-enable_win32_dll=yes
X+enable_win32_dll=no
X 
X case $host in
X *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
X@@ -15903,23 +15903,9 @@
X use_msvc=no
X 
X 
X-case "$CXX" in
X-		cl*|CL*)
X-		CXXFLAGS="-nologo -W1 -EHsc -DWIN32"
X-		if test x"$enable_shared" = "xyes"; then
X-		    LIBEXT=".dll";
X-		    LIBFLAGS="-DLL -INCREMENTAL:NO"
X-			CXXFLAGS="$CXXFLAGS -D_WINDLL"
X-		else
X-		    LIBEXT=".lib";
X-		    LIBFLAGS="-lib"
X-		fi
X-		RANLIB="echo"
X-		use_msvc=yes
X-		;;
X-	*)
X-		;;
X-esac
X+LIBEXT=".lib";
X+LIBFLAGS="-lib"
X+RANLIB="echo"
X  if test x"$use_msvc" = "xyes"; then
X   USE_MSVC_TRUE=
X   USE_MSVC_FALSE='#'
5cae8e2426c154e1c1a4408c02b2ed73
exit



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 7 11:20:27 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165814 
Responsible-Changed-From-To: freebsd-multimedia->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Thu Mar 8 13:32:53 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

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

From: Shane Ambler <FreeBSD@ShaneWare.Biz>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/165814: Build multimedia/dirac with clang [patch]
Date: Tue, 13 Mar 2012 18:56:54 +1030

 After further testing I found that dirac fails to build on
 
 7.4 7-STABLE
 8.2 8.3 8-STABLE
 
 with ARCH=i386 and CC=gcc
 
 The error is undefined reference to `__sync_fetch_and_add_4' in the 
 linking step inside work/dirac-1.0.2/encoder
 
 Setting CPUTYPE=i486 or higher gets around the issue but there appears 
 to be a change included with 9-STABLE and 10-CURRENT that fixes this issue.
 
 I updated and rebuilt 7/8/9 stable tinderbox jails a few hours ago.
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Wed Apr 11 02:35:04 UTC 2012 
State-Changed-Why:  
i close it here since there is no feedback 

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

From: Shane Ambler <FreeBSD@ShaneWare.Biz>
To: miwi@FreeBSD.org, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/165814: Build multimedia/dirac with clang [patch]
Date: Mon, 16 Apr 2012 12:36:59 +0930

 On 11/04/2012 12:05, miwi@FreeBSD.org wrote:
 > Synopsis: Build multimedia/dirac with clang [patch]
 >
 > State-Changed-From-To: open->closed
 > State-Changed-By: miwi
 > State-Changed-When: Wed Apr 11 02:35:04 UTC 2012
 > State-Changed-Why:
 > i close it here since there is no feedback
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=165814
 >
 
 Why would you leave a port broken just because no-one
 commented on the fix?
>Unformatted:
