[libcamera-devel] [PATCH 1/4] meson: Shared Object version handling

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Sep 30 17:44:33 CEST 2022


Quoting Jacopo Mondi (2022-09-30 14:54:32)
> Hi Kieran
> 
> On Thu, Sep 29, 2022 at 03:36:23PM +0100, 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.
> >
> > Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> > ---
> >  meson.build                    | 15 +++++++++++++++
> >  src/libcamera/base/meson.build |  1 +
> >  src/libcamera/meson.build      |  1 +
> >  3 files changed, 17 insertions(+)
> >
> > diff --git a/meson.build b/meson.build
> > index 72919102ad55..9bbfd0e9c784 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.
> 
> Missing a , after 0.x ?

Yes, looks like the , after release should move to after 0.x,

> 
> nit apart:
> Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks.


> 
> Thanks
>   j
> 
> > +# We can continue to consider that a patch level increment should be
> > +# compatible.
> > +project_version = meson.project_version().split('.')
> > +soversion = project_version[0] + '.' + project_version[1]
> > +
> > +summary({
> > +            'Project': meson.project_version(),
> > +            'Sources': libcamera_git_version,
> > +            'libcamera': libcamera_version,
> > +            'Shared Object': soversion,
> > +        },
> > +        section : 'Versions')
> > +
> >  # This script gererates 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..51719f112d26 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 : soversion,
> >                                      name_prefix : '',
> >                                      install : true,
> >                                      cpp_args : libcamera_base_args,
> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> > index 63b47b177fd2..3aa7f32067f8 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 : soversion,
> >                             name_prefix : '',
> >                             install : true,
> >                             include_directories : includes,
> > --
> > 2.34.1
> >


More information about the libcamera-devel mailing list