Draft: Add property to use defined and controlled system libraries
A recurring problem with Cerbero occurs when we have a recipe that needs system versions of some libraries and allow the recipe to use all the packages from the system using use_system_libs
. This change aims to list the system libraries that can be used for the system. This change aims to control the system libraries that can be used from the system using a defined and controlled list. This eliminates conflicts between unlisted libraries that the system may have and libraries provided by Cerbero.
For instance:
diff --git a/recipes/gst-plugins-bad-1.0.recipe b/recipes/gst-plugins-bad-1.0.recipe
index 3d7ad286..f4a722c4 100644
--- a/recipes/gst-plugins-bad-1.0.recipe
+++ b/recipes/gst-plugins-bad-1.0.recipe
@@ -90,7 +90,8 @@ class Recipe(custom.GStreamer):
- use_system_libs = True
+ use_system_libs_for = ["openssl", "libssl", "libcrypto"]
diff --git a/recipes/gst-plugins-good-1.0.recipe b/recipes/gst-plugins-good-1.0.recipe
index 4d8932c2..bb1e46ca 100644
--- a/recipes/gst-plugins-good-1.0.recipe
+++ b/recipes/gst-plugins-good-1.0.recipe
@@ -38,7 +38,8 @@ class Recipe(custom.GStreamer):
- use_system_libs = True
+ use_system_libs_for = ["x11", "x11-xcb", "xext", "xi", "xv", "xproto", "kbproto", "xcb", "xau", "xdmcp", "videoproto", "xextproto", "libpulse"]
In my personal case using Arch Linux I have issues with taglib, x265...
Inspired from meson setup --force-fallback-for
option.
fixed #503
TODO:
-
Handle Oven._cook_recipe_step_with_pr
-
Handle add_system_libs
inRecipe.generate_gst_la_files
-
Handle Autotools.configure
-
Handle Shell Command (Check open question) -
Fix GStreamer recipes using use_system_libs
-
Fix all the recipes using use_system_libs
-
Documentation
OPEN QUESTIONS:
-
Validate the usage of pkgconf --path
. Needs !1658 (closed)
Discarded. Logic implemented in python -
Confirm use_system_libs_for
attribute name. -
Replace use_system_libs
foruse_system_libs_for
or keep both. Personal opinion: replace it. Note this break the BC. -
New behavior of cerbero shell --use-system-libs
. Personal opinion: instead a flag use an option that takes the recipe as value as--use-system-libs-for libnice
. Note this break the BC.