From nobody@FreeBSD.org  Wed Jan 22 14:20:48 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id F40E63C3
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Jan 2014 14:20:47 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id C96AB1D33
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Jan 2014 14:20:47 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0MEKlEI011107
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Jan 2014 14:20:47 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0MEKlna011086;
	Wed, 22 Jan 2014 14:20:47 GMT
	(envelope-from nobody)
Message-Id: <201401221420.s0MEKlna011086@oldred.freebsd.org>
Date: Wed, 22 Jan 2014 14:20:47 GMT
From: Mathias Picker <Mathias.Picker@virtual-earth.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: avidemux needs USE_GCC and LDFLAGS
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185997
>Category:       ports
>Synopsis:       multimedia/avidemux2 needs USE_GCC and LDFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-multimedia
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 22 14:30:01 UTC 2014
>Closed-Date:    Thu Jan 23 18:46:38 UTC 2014
>Last-Modified:  Tue Feb 11 09:10:01 UTC 2014
>Originator:     Mathias Picker
>Release:        10.0
>Organization:
>Environment:
reeBSD marcopolo 10.0-PRERELEASE FreeBSD 10.0-PRERELEASE #12 r260824: Fri Jan 17 13:52:12 CET 2014     mathiasp@marcopolo:/usr/obj/usr/src/sys/GENERIC  amd64
m
>Description:
Building avidemux2 with clang stops with an error.


>How-To-Repeat:
cd /usr/ports/multimedia/avidemux2; make
>Fix:
Add 

USE_GCC=any
LDFLAGS=-lc++

to the makefile.

Avidemux builds and runs fine.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-multimedia 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jan 22 18:32:36 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185997 
State-Changed-From-To: open->closed 
State-Changed-By: nox 
State-Changed-When: Thu Jan 23 18:46:37 UTC 2014 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/185997: commit references a PR
Date: Thu, 23 Jan 2014 18:42:55 +0000 (UTC)

 Author: nox
 Date: Thu Jan 23 18:42:47 2014
 New Revision: 340847
 URL: http://svnweb.freebsd.org/changeset/ports/340847
 QAT: https://qat.redports.org/buildarchive/r340847/
 
 Log:
   - Use gcc and LDFLAGS+=-lc++ on 10+, this seems to fix build as well
     as runtime. [1]
   - Use new LIB_DEPENDS syntax.
   
   PR:		ports/185997 [1] (inspired by)
   Submitted by:	Mathias Picker <Mathias.Picker@virtual-earth.de> [1]
 
 Modified:
   head/multimedia/avidemux2/Makefile.common
 
 Modified: head/multimedia/avidemux2/Makefile.common
 ==============================================================================
 --- head/multimedia/avidemux2/Makefile.common	Thu Jan 23 18:36:20 2014	(r340846)
 +++ head/multimedia/avidemux2/Makefile.common	Thu Jan 23 18:42:47 2014	(r340847)
 @@ -8,12 +8,12 @@ MASTER_SITES=	BERLIOS \
  DISTNAME=	avidemux_${PORTVERSION}
  
  BUILD_DEPENDS+=	yasm:${PORTSDIR}/devel/yasm
 -LIB_DEPENDS+=	mad.2:${PORTSDIR}/audio/libmad \
 -		a52.0:${PORTSDIR}/audio/liba52 \
 -		png15:${PORTSDIR}/graphics/png \
 -		samplerate.1:${PORTSDIR}/audio/libsamplerate \
 -		dca.0:${PORTSDIR}/multimedia/libdca \
 -		execinfo.1:${PORTSDIR}/devel/libexecinfo
 +LIB_DEPENDS+=	libmad.so:${PORTSDIR}/audio/libmad \
 +		liba52.so:${PORTSDIR}/audio/liba52 \
 +		libpng15.so:${PORTSDIR}/graphics/png \
 +		libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
 +		libdca.so:${PORTSDIR}/multimedia/libdca \
 +		libexecinfo.so:${PORTSDIR}/devel/libexecinfo
  
  LICENSE=	GPLv2
  
 @@ -22,9 +22,8 @@ CONFLICTS=	avidemux2-2.[0-46-9].*
  USE_GNOME=	libxml2
  USE_QT4=	# empty
  
 -USE_GMAKE=	yes
  WANT_SDL=	yes
 -USES=		cmake:outsource pkgconfig iconv
 +USES=		cmake:outsource pkgconfig iconv gmake compiler:features
  CMAKE_USE_PTHREAD=yes
  CMAKE_ARGS+=	-DTHREADS_HAVE_PTHREAD_ARG:STRING="${PTHREAD_LIBS}"
  CFLAGS+=	-Wno-return-type
 @@ -59,6 +58,15 @@ PLIST_SUB+=	NLS="@comment " QT_NLS="@com
  
  .include <bsd.port.pre.mk>
  
 +# is this kosher?  the result seems to run tho...  (see ports/185997)
 +.if $(COMPILER_FEATURES:Mlibc++)
 +LDFLAGS+=	-lc++
 +.endif
 +
 +.if ${COMPILER_TYPE} == clang
 +USE_GCC=	yes
 +.endif
 +
  # for libexecinfo: (so that __builtin_frame_address() finds the top
  # of the stack)
  .if ${ARCH} == "amd64"
 @@ -106,7 +114,7 @@ PLIST_SUB+=	ESD="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MJACK}
 -LIB_DEPENDS+=	jack.0:${PORTSDIR}/audio/jack
 +LIB_DEPENDS+=	libjack.so:${PORTSDIR}/audio/jack
  PLIST_SUB+=	JACK=""
  .else
  CMAKE_ARGS+=	-DJACK:BOOL=OFF
 @@ -114,7 +122,7 @@ PLIST_SUB+=	JACK="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MPULSEAUDIO}
 -LIB_DEPENDS+=	pulse:${PORTSDIR}/audio/pulseaudio
 +LIB_DEPENDS+=	libpulse.so:${PORTSDIR}/audio/pulseaudio
  PLIST_SUB+=	PULSE=""
  .else
  CMAKE_ARGS+=	-DPULSEAUDIOSIMPLE:BOOL=OFF
 @@ -122,7 +130,7 @@ PLIST_SUB+=	PULSE="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MFREETYPE}
 -LIB_DEPENDS+=	freetype:${PORTSDIR}/print/freetype2
 +LIB_DEPENDS+=	libfreetype.so:${PORTSDIR}/print/freetype2
  PLIST_SUB+=	FREETYPE=""
  .else
  CMAKE_ARGS+=	-DFREETYPE2:BOOL=OFF
 @@ -130,19 +138,20 @@ PLIST_SUB+=	FREETYPE="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MFONTCONFIG}
 -LIB_DEPENDS+=	fontconfig:${PORTSDIR}/x11-fonts/fontconfig
 +LIB_DEPENDS+=	libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig
  .else
  CMAKE_ARGS+=	-DFONTCONFIG:BOOL=OFF
  .endif
  
  .if ${PORT_OPTIONS:MXVIDEO}
 -LIB_DEPENDS+=	Xv:${PORTSDIR}/x11/libXv
 +#LIB_DEPENDS+=	Xv:${PORTSDIR}/x11/libXv
 +USE_XORG+=	xv
  .else
  CMAKE_ARGS+=	-DXVIDEO:BOOL=OFF
  .endif
  
  .if ${PORT_OPTIONS:MFAAC}
 -LIB_DEPENDS+=	faac:${PORTSDIR}/audio/faac
 +LIB_DEPENDS+=	libfaac.so:${PORTSDIR}/audio/faac
  PLIST_SUB+=	FAAC=""
  .else
  CMAKE_ARGS+=	-DFAAC:BOOL=OFF
 @@ -150,7 +159,7 @@ PLIST_SUB+=	FAAC="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MLAME}
 -LIB_DEPENDS+=	mp3lame:${PORTSDIR}/audio/lame
 +LIB_DEPENDS+=	libmp3lame.so:${PORTSDIR}/audio/lame
  PLIST_SUB+=	LAME=""
  .else
  CMAKE_ARGS+=	-DLAME:BOOL=OFF
 @@ -158,7 +167,7 @@ PLIST_SUB+=	LAME="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MFAAD}
 -LIB_DEPENDS+=	faad:${PORTSDIR}/audio/faad
 +LIB_DEPENDS+=	libfaad.so:${PORTSDIR}/audio/faad
  PLIST_SUB+=	FAAD=""
  .else
  CMAKE_ARGS+=	-DFAAD:BOOL=OFF -DNeAAC:BOOL=OFF
 @@ -166,7 +175,7 @@ PLIST_SUB+=	FAAD="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MX264}
 -LIB_DEPENDS+=	x264:${PORTSDIR}/multimedia/x264
 +LIB_DEPENDS+=	libx264.so:${PORTSDIR}/multimedia/x264
  PLIST_SUB+=	X264=""
  .else
  CMAKE_ARGS+=	-DX264:BOOL=OFF
 @@ -174,13 +183,13 @@ PLIST_SUB+=	X264="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MVPX}
 -LIB_DEPENDS+=	vpx:${PORTSDIR}/multimedia/libvpx
 +LIB_DEPENDS+=	libvpx.so:${PORTSDIR}/multimedia/libvpx
  .else
  CMAKE_ARGS+=	-DVPXDEC:BOOL=OFF
  .endif
  
  .if ${PORT_OPTIONS:MXVID}
 -LIB_DEPENDS+=	xvidcore:${PORTSDIR}/multimedia/xvid
 +LIB_DEPENDS+=	libxvidcore.so:${PORTSDIR}/multimedia/xvid
  PLIST_SUB+=	XVID=""
  .else
  CMAKE_ARGS+=	-DXVID:BOOL=OFF
 @@ -196,7 +205,7 @@ PLIST_SUB+=	SDL="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MVORBIS}
 -LIB_DEPENDS+=	vorbis:${PORTSDIR}/audio/libvorbis
 +LIB_DEPENDS+=	libvorbis.so:${PORTSDIR}/audio/libvorbis
  PLIST_SUB+=	VORBIS=""
  .else
  CMAKE_ARGS+=	-DLIBVORBIS:BOOL=OFF -DVORBIS:BOOL=OFF
 @@ -204,7 +213,7 @@ PLIST_SUB+=	VORBIS="@comment "
  .endif
  
  .if ${PORT_OPTIONS:MAMR}
 -LIB_DEPENDS+=	opencore-amrnb:${PORTSDIR}/audio/opencore-amr
 +LIB_DEPENDS+=	libopencore-amrnb.so:${PORTSDIR}/audio/opencore-amr
  PLIST_SUB+=	AMRNB=""
  PLIST_SUB+=	AMRWB=""
  .else
 _______________________________________________
 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"
 

From: Matthias Andree <mandree@FreeBSD.org>
To: bug-followup@FreeBSD.org, Mathias.Picker@virtual-earth.de
Cc:  
Subject: Re: ports/185997: multimedia/avidemux2 needs USE_GCC and LDFLAGS
Date: Tue, 11 Feb 2014 10:04:28 +0100

 Note that adding -lc++ is not complete and fragile, and will break on
 older systems, and -lc++ must only be used on systems where it is the
 default C++ standard library.
 
 Refer to <http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186240> for
 details.
>Unformatted:
