]> code.ossystems Code Review - openembedded-core.git/commitdiff
libomxil: Fix up commercial license flag
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 12 Feb 2021 16:51:57 +0000 (10:51 -0600)
committerAnuj Mittal <anuj.mittal@intel.com>
Thu, 18 Feb 2021 04:01:27 +0000 (12:01 +0800)
The commercial license flag on libomxil is set because it may include
the Adaptive Multi-Rate audio codec (AMR) using FFmepg, which is patent
encumbered.

It turns out this component is disabled by default in the recipe; add a
PACKAGECONFIG to enable it and trigger the "commercial" LICENSE_FLAGS on
it. This make the default build configuration clean unless a user
specifically asks for AMR support, and prevents them from marking the
recipe with the "commerical" flag unnecessarily which could hide
potential problems later on.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5f61e20002c2af93e2d6810574e23606925526ee)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb

index 2061c280e4ef7e27441ec378f918e24acb9db1cd..82cdaf54c7c0a71fe6b17e60d4b2e8c8985f8ed2 100644 (file)
@@ -4,7 +4,7 @@ DESCRIPTION = "Bellagio is an opensource implementation of the Khronos OpenMAX \
 HOMEPAGE = "http://omxil.sourceforge.net/"
 
 LICENSE = "LGPLv2.1+"
-LICENSE_FLAGS = "commercial"
+LICENSE_FLAGS = "${@bb.utils.contains('PACKAGECONFIG', 'amr', 'commercial', '', d)}"
 LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \
                     file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90"
 
@@ -28,6 +28,10 @@ PROVIDES += "virtual/libomxil"
 
 CFLAGS += "-fcommon"
 
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[amr] = "--enable-amr,,"
+
 #
 # The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
 # Make sure they get packaged in the main package.