From oz@nixil.net  Fri Oct 11 04:12:23 2013
Return-Path: <oz@nixil.net>
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 2DBF5C8A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Oct 2013 04:12:23 +0000 (UTC)
	(envelope-from oz@nixil.net)
Received: from nixil.net (nixil.net [161.58.222.1])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id CC6A4243B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 11 Oct 2013 04:12:22 +0000 (UTC)
Received: from nixil.net (localhost [127.0.0.1])
	by localhost (8.14.5/8.14.5) with ESMTP id r9B3uOeb074006
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 10 Oct 2013 21:56:24 -0600 (MDT)
	(envelope-from oz@nixil.net)
Received: (from oz@localhost)
	by nixil.net (8.14.5/8.14.5/Submit) id r9B3uOqA074005;
	Thu, 10 Oct 2013 21:56:24 -0600 (MDT)
	(envelope-from oz)
Message-Id: <201310110356.r9B3uOqA074005@nixil.net>
Date: Thu, 10 Oct 2013 21:56:24 -0600 (MDT)
From: Phil Oleson <oz@nixil.net>
Reply-To: Phil Oleson <oz@nixil.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: multimedia/dv2sub - fix brokenness of package build when clang is CC
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         182893
>Category:       ports
>Synopsis:       multimedia/dv2sub - fix brokenness of package build when clang is CC
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    tijl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 11 04:20:00 UTC 2013
>Closed-Date:    Tue Oct 22 22:24:10 CEST 2013
>Last-Modified:  Tue Oct 22 20:30:00 UTC 2013
>Originator:     Phil Oleson
>Release:        FreeBSD 6.4-RELEASE-p8 i386
>Organization:
N/A
>Environment:
System: FreeBSD nixil.net 6.4-RELEASE-p8 FreeBSD 6.4-RELEASE-p8 #1 r101746: Mon Aug 30 10:34:40 MDT 2010 root@fc:/usr/src/sys/i386/compile/VKERN i386


>Description:
	The packages autoconf script can't handle clang.. 

>How-To-Repeat:
	comment out the offending autoconf code.. clang handles the build fine.
>Fix:

	Patch attached. 

--- dv2sub-clang-fixit-patch begins here ---
diff -ruN dv2sub.orig/Makefile dv2sub/Makefile
--- dv2sub.orig/Makefile	2013-10-02 23:58:12.000000000 -0600
+++ dv2sub/Makefile	2013-10-10 21:48:44.000000000 -0600
@@ -1,9 +1,9 @@
 # Created by: Phil Oleson
-# $FreeBSD: head/multimedia/dv2sub/Makefile 327747 2013-09-20 20:57:48Z bapt $
+# $FreeBSD: multimedia/dv2sub/Makefile 327747 2013-09-20 20:57:48Z bapt $
 
 PORTNAME=	dv2sub
 PORTVERSION=	0.3
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	multimedia
 MASTER_SITES=	SF
 
@@ -12,6 +12,10 @@
 
 LIB_DEPENDS=	dv.4:${PORTSDIR}/multimedia/libdv
 
+
+USE_AUTOTOOLS=	aclocal autoconf automake
+AUTOMAKE_ARGS=  -a
+
 GNU_CONFIGURE=	yes
 USES=		pkgconfig
 
diff -ruN dv2sub.orig/files/patch-configure.ac dv2sub/files/patch-configure.ac
--- dv2sub.orig/files/patch-configure.ac	1969-12-31 17:00:00.000000000 -0700
+++ dv2sub/files/patch-configure.ac	2013-10-10 15:36:49.000000000 -0600
@@ -0,0 +1,35 @@
+--- configure.ac.orig	2007-03-05 06:26:54.000000000 -0700
++++ configure.ac	2013-10-10 15:19:53.000000000 -0600
+@@ -30,19 +30,19 @@
+ )
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+-AC_MSG_CHECKING([whether compiler accepts some C99 extensions])
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$C99MODE_FLAG"
+-AC_TRY_COMPILE(,
+-	[void foo(void) { for(int i=0; i<10; i++) {} }],
+-	[AC_MSG_RESULT(yes)],
+-	[c99_fail=1
+-	AC_MSG_RESULT(no)])
+-if test "x$c99_fail" = "x1"
+-then
+-    AC_MSG_ERROR(ANSI/ISO C99 compiler not found or not in this mode!)
+-fi
+-CFLAGS="$save_CFLAGS"
++dnl AC_MSG_CHECKING([whether compiler accepts some C99 extensions])
++dnl save_CFLAGS="$CFLAGS"
++dnl CFLAGS="$C99MODE_FLAG"
++dnl AC_TRY_COMPILE(,
++dnl 	[void foo(void) { for(int i=0; i<10; i++) {} }],
++dnl 	[AC_MSG_RESULT(yes)],
++dnl 	[c99_fail=1
++dnl 	AC_MSG_RESULT(no)])
++dnl if test "x$c99_fail" = "x1"
++dnl then
++dnl     AC_MSG_ERROR(ANSI/ISO C99 compiler not found or not in this mode!)
++dnl fi
++dnl CFLAGS="$save_CFLAGS"
+ 
+ dnl Arrange for large-file support
+ AC_SYS_LARGEFILE
--- dv2sub-clang-fixit-patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tijl 
State-Changed-When: Tue Oct 22 22:23:06 CEST 2013 
State-Changed-Why:  
Fixed in a different way in r331316. 


Responsible-Changed-From-To: freebsd-ports-bugs->tijl 
Responsible-Changed-By: tijl 
Responsible-Changed-When: Tue Oct 22 22:23:06 CEST 2013 
Responsible-Changed-Why:  
Fixed in a different way in r331316. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182893: commit references a PR
Date: Tue, 22 Oct 2013 20:22:53 +0000 (UTC)

 Author: tijl
 Date: Tue Oct 22 20:22:46 2013
 New Revision: 331316
 URL: http://svnweb.freebsd.org/changeset/ports/331316
 
 Log:
   Change a configure test such that it no longer defines a nested function.
   This fixes the build with clang.  While here support staging.
   
   PR:		ports/182893
 
 Modified:
   head/multimedia/dv2sub/Makefile
 
 Modified: head/multimedia/dv2sub/Makefile
 ==============================================================================
 --- head/multimedia/dv2sub/Makefile	Tue Oct 22 20:17:09 2013	(r331315)
 +++ head/multimedia/dv2sub/Makefile	Tue Oct 22 20:22:46 2013	(r331316)
 @@ -3,20 +3,21 @@
  
  PORTNAME=	dv2sub
  PORTVERSION=	0.3
 -PORTREVISION=	4
 +PORTREVISION=	5
  CATEGORIES=	multimedia
  MASTER_SITES=	SF
  
  MAINTAINER=	oz@nixil.net
  COMMENT=	Extracts info or subtitles from DV stream
  
 -LIB_DEPENDS=	dv.4:${PORTSDIR}/multimedia/libdv
 +LIB_DEPENDS=	libdv.so:${PORTSDIR}/multimedia/libdv
  
  GNU_CONFIGURE=	yes
  USES=		pkgconfig
  
 -PLIST_FILES=	bin/dv2sub
 -MAN1=		dv2sub.1
 +PLIST_FILES=	bin/dv2sub man/man1/dv2sub.1.gz
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e 's/void foo(void)//' ${WRKSRC}/configure
  
 -NO_STAGE=	yes
  .include <bsd.port.mk>
 _______________________________________________
 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:
