[libcamera-devel] [PATCH v2 2/5] meson: Shared Object version handling
Michael Riesch
michael.riesch at wolfvision.net
Mon Oct 3 17:00:39 CEST 2022
Hi Kieran,
On 10/1/22 01:28, Kieran Bingham via libcamera-devel wrote:
> The libcamera project is not yet ready to declare ABI nor API stability,
> but it will benefit the community to be able to provide more regular
> release cycles to determine 'versioned' points of history.
>
> Ideally, these releases will be made at any ABI breakage, but can be
> made at arbitary time based points along the way.
>
> To support releases which may not be ABI stable, declare the soversion
> of both the libcamera and libcamera-base library to be dependant upon
> both the major and minor component of the project version.
>
> As part of this, introduce a new 'Versions' summary section to highlight
> the different version components that may become apparent within any
> given build.
>
> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> Documentation/Doxyfile.in | 4 +++-
> meson.build | 15 +++++++++++++++
> src/libcamera/base/meson.build | 1 +
> src/libcamera/meson.build | 1 +
> 4 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in
> index 88dfcddaebf6..761807005294 100644
> --- a/Documentation/Doxyfile.in
> +++ b/Documentation/Doxyfile.in
> @@ -46,7 +46,9 @@ EXCLUDE = @TOP_SRCDIR@/include/libcamera/base/span.h \
> @TOP_BUILDDIR@/include/libcamera/internal/tracepoints.h \
> @TOP_BUILDDIR@/src/libcamera/proxy/
>
> -EXCLUDE_PATTERNS = @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \
> +EXCLUDE_PATTERNS = @TOP_BUILDDIR@/src/libcamera/libcamera.so* \
> + @TOP_BUILDDIR@/src/libcamera/base/libcamera-base.so* \
> + @TOP_BUILDDIR@/include/libcamera/ipa/*_serializer.h \
> @TOP_BUILDDIR@/include/libcamera/ipa/*_proxy.h \
> @TOP_BUILDDIR@/include/libcamera/ipa/ipu3_*.h \
> @TOP_BUILDDIR@/include/libcamera/ipa/raspberrypi_*.h \
> diff --git a/meson.build b/meson.build
> index 2c6173b4f97e..2a7b90133bbd 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -26,6 +26,21 @@ endif
>
> libcamera_version = libcamera_git_version.split('+')[0]
>
> +# Enforce Major and Minor as part of the soversion. Until we make a first major
> +# release and remain on version 0.x, each release may denote ABI instabilty.
Typo -> instability.
Looking forward to this, thanks a lot!
Best regards,
Michael
> +# We can continue to consider that a patch level increment should be
> +# compatible.
> +project_version = meson.project_version().split('.')
> +libcamera_soversion = project_version[0] + '.' + project_version[1]
> +
> +summary({
> + 'Project': meson.project_version(),
> + 'Sources': libcamera_git_version,
> + 'libcamera': libcamera_version,
> + 'soname': libcamera_soversion,
> + },
> + section : 'Versions')
> +
> # This script generates the .tarball-version file on a 'meson dist' command.
> meson.add_dist_script('utils/run-dist.sh')
>
> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
> index 3b9d74efe935..65933905a5df 100644
> --- a/src/libcamera/base/meson.build
> +++ b/src/libcamera/base/meson.build
> @@ -51,6 +51,7 @@ libcamera_base_args = [ '-DLIBCAMERA_BASE_PRIVATE' ]
> libcamera_base_lib = shared_library('libcamera-base',
> [libcamera_base_sources, libcamera_base_headers],
> version : libcamera_version,
> + soversion : libcamera_soversion,
> name_prefix : '',
> install : true,
> cpp_args : libcamera_base_args,
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 63b47b177fd2..f905c15ece85 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -160,6 +160,7 @@ libcamera_deps = [
> libcamera = shared_library('libcamera',
> libcamera_sources,
> version : libcamera_version,
> + soversion : libcamera_soversion,
> name_prefix : '',
> install : true,
> include_directories : includes,
More information about the libcamera-devel
mailing list