As discussed briefly with Reinhard Tartler on #ubuntu-motu, here is a
proposed patch to add auto-detection of libopencore-amr{n,w}b into
debian/confflags, and pass the corresponding licensing option
(--enable-version3), in the same manner as --enable-nonfree.

I've tested it against ffmpeg-extra in lucid[0], and it seems to work as
expected (resulting libavcodec debs are linked to the extra libs). It
probably needs some polishing as I've only tested a 'tainted' build
(with faac & opencore-amr), not a 'normal' one.


[0] modified source package is available at

Lionel Le Folgoc - https://launchpad.net/~mrpouit
E61E 116D 4BA1 3936 0A33  F61D 65D9 A66E 10E2 969A
diff --git a/debian/confflags b/debian/confflags
index a79bd13..9edb824 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -57,6 +57,11 @@ define cond_enable
 	$(shell test -r $(1) && echo --enable-$(2) )
+# variant that also require --enable-version3
+define cond_enable_v3
+	$(shell test -r $(1) && echo --enable-$(2) --enable-version3 )
 # variant that also require --enable-nonfree
 define cond_enable_nf
 	$(shell test -r $(1) && echo --enable-$(2) --enable-nonfree )
@@ -117,11 +122,16 @@ confflags += $(call cond_enable,/usr/include/lame/lame.h,libmp3lame)
 confflags += $(call cond_enable_nf,/usr/include/amrnb/sp_dec.h,libamr-nb)
 confflags += $(call cond_enable_nf,/usr/include/amrwb/dec.h,libamr-wb)
+# Opencore-amr requires GPL v3
+v3_confflags += $(call cond_enable_v3,/usr/include/opencore-amrnb/interf_dec.h,libopencore-amrnb)
+v3_confflags += $(call cond_enable_v3,/usr/include/opencore-amrwb/dec_if.h,libopencore-amrwb)
 # AAC is considered non-free upstream
 confflags += $(call cond_enable_nf,/usr/include/faac.h,libfaac)
 # comment out following line for LGPL versions of the libraries
 confflags += $(gpl_confflags)
+confflags += $(v3_confflags)
 # Enable IEEE 1394 (FireWire) support on Linux only
 ifneq (,$(findstring linux,$(DEB_HOST_GNU_TYPE)))

Attachment: signature.asc
Description: Digital signature

pkg-multimedia-maintainers mailing list

Reply via email to