Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2008 19:05:10 GMT
From:      Josh Carroll <josh.carroll@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/126045: ffmpeg port needs --enable-nonfree with --enable-libamr*
Message-ID:  <200807281905.m6SJ5Al9052175@www.freebsd.org>
Resent-Message-ID: <200807281910.m6SJA1L1025569@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         126045
>Category:       ports
>Synopsis:       ffmpeg port needs --enable-nonfree with --enable-libamr*
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 28 19:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Josh Carroll
>Release:        7.0-RELEASE/amd64
>Organization:
N/A
>Environment:
FreeBSD pflog.net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Feb 26 01:20:52 EST 2008     root@pflog.net:/usr/obj/usr/src/sys/PFLOG  amd64
>Description:
The ffmpeg upstream source now requires --enable-nonfree when compiling with certain options, currently either of:

--enable-libamr-nb
--enable-libamr-wb

I have attached a patch to add a "NONFREE" option, which adds --enable-nonfree to CONFIGURE_ARGS, and also a check that WITH_NONFREE is set if WITH_AMR_NB or WITH_AMR_WB are set to the pre-configure target.

Alternatively, --enable-nonfree could just be set automatically if either AMR_NB or AMR_WB are set, but I think since ffmpeg then builds as a non-distributable release, it might be better to have the user explicitly request non-free support.

adding --enable-nonfree in the case of AMR_NB or AMR_WB being selected is trivial, so I didn't bother including a patch for that.

Thanks!
Josh
>How-To-Repeat:
cd /usr/ports/multimedia/ffmpeg
make -DWITH_AMR_NB

Note the error from ffmpeg's configure script:

===>  Configuring for ffmpeg-2008.07.27
libamr is nonfree and --enable-nonfree is not specified.

>Fix:
Please see the attached patch.

Patch attached with submission follows:

--- Makefile.orig	2008-07-28 14:55:34.000000000 -0400
+++ Makefile	2008-07-28 14:53:21.000000000 -0400
@@ -33,7 +33,8 @@
 		THEORA	"libtheora support (implies OGG)" on \
 		VORBIS	"libvorbisenc support (implies OGG)" on \
 		X264	"X.264 codec" on \
-		XVID	"XVID codec" off
+		XVID	"XVID codec" off \
+		NONFREE	"non-free codec support"	off
 
 .include <bsd.port.pre.mk>
 
@@ -110,6 +111,11 @@
 CONFIGURE_ARGS+=	--disable-libfaad
 .endif
 
+## non-free support
+.ifdef(WITH_NONFREE)
+CONFIGURE_ARGS+=	--enable-nonfree
+.endif
+
 ## amr
 .ifdef(WITH_AMR_NB)
 LIB_DEPENDS+=		amrnb.3:${PORTSDIR}/audio/libamrnb
@@ -206,6 +212,12 @@
 .if defined(WITHOUT_VHOOK) && (defined(WITH_VHOOK_FREETYPE2) || defined(WITH_VHOOK_IMLIB2))
 	@${ECHO_MSG}	WITH_VHOOK_FREETYPE2 or WITH_VHOOK_IMLIB2 defined, video hooks will be built
 .endif
+.if !defined(WITH_NONFREE) && (defined(WITH_AMR_NB) || defined(WITH_AMR_WB))
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "ERROR: AMR_WB and AMR_NB require the NONFREE option."
+	@${ECHO_MSG} ""
+	@${FALSE}
+.endif
 
 post-patch:
 # Faad compat


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807281905.m6SJ5Al9052175>