From patchwork Fri Sep 30 23:28:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 17478 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B4586BD16B for ; Fri, 30 Sep 2022 23:28:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 57D2362855; Sat, 1 Oct 2022 01:28:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1664580517; bh=dTWMzveiXxXcBtahVhGqUKVibadgQsVcDDKnP4WUY1w=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=2wwir/bH7l5wSLx3kqbSyo5HvmCrobAiS3i063pT0+ZAUhkp6iwFVKxctqLKSJx8T 1WKZndVS9g1IxHPusAPyEtqIvyxCH2oddRo3feKwNf8a2Rsh9rP4gXY8chqWTmLJNu AlXFcioHY8LvIMtzzvQVzPGSBaFMO1YjcdlUNx9LZqTKFc765zp4OVX/SsrWg7LKDR heXkY2z6gHkZMV63c9u5yt3WfJASExSiFrQI4CMeoYuDSyZouizCRppEb3dMIFppQ0 3kImPl1cmHVoyVJCWzkpA8H7OSGMRRAYdo/u/7PtYZmkg4MhMXW4yVA/xODY0IfV4D t8MLRTaG1zIZw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7BFA862854 for ; Sat, 1 Oct 2022 01:28:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hugm8HJz"; dkim-atps=neutral Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E7E6AD97; Sat, 1 Oct 2022 01:28:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1664580515; bh=dTWMzveiXxXcBtahVhGqUKVibadgQsVcDDKnP4WUY1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hugm8HJzdVW7IwpQPDVBlhgbUKtb9DMYuw09F5gRsgXqnlMwfjccV2b9RzhGvdt+H QwVIlIMiMQNO5q8YYtnt2mtnglCenmo8cDppaE54X9hW0GLjWQGgUZd4J8wnmKw8Tx MPwnuJEAZfDqYK0nlZmW4L67HVhS1OdqgPm1QQXo= To: libcamera devel Date: Sat, 1 Oct 2022 00:28:23 +0100 Message-Id: <20220930232826.82753-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220930232826.82753-1-kieran.bingham@ideasonboard.com> References: <20220930232826.82753-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/5] meson: Shared Object version handling X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Signed-off-by: Kieran Bingham --- 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. +# 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,