From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 24 Nov 2023 12:23:29 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r6UHQ-007Ot3-23 for lore@lore.pengutronix.de; Fri, 24 Nov 2023 12:23:29 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r6UHQ-0003GZ-JQ; Fri, 24 Nov 2023 12:23:28 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r6UHO-0003GD-MI; Fri, 24 Nov 2023 12:23:26 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6UHO-00BFlA-A7; Fri, 24 Nov 2023 12:23:26 +0100 Received: from rhi by pty.whiteo.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r6UHO-002fOO-1D; Fri, 24 Nov 2023 12:23:26 +0100 Date: Fri, 24 Nov 2023 12:23:26 +0100 From: Roland Hieber To: Ahmad Fatoum Message-ID: <20231124112326.2ahi7bzws4i4gcph@pengutronix.de> References: <20231106134907.859194-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231106134907.859194-1-a.fatoum@pengutronix.de> Subject: Re: [OSS-Tools] [PATCH dt-utils v2] meson: align libdt-utils version with autotools' X-BeenThere: oss-tools@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: Pengutronix Public Open-Source-Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: oss-tools@pengutronix.de, Enrico =?utf-8?B?SsO2cm5z?= Sender: "OSS-Tools" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: oss-tools-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Mon, Nov 06, 2023 at 02:49:07PM +0100, Ahmad Fatoum wrote: > Makefile.am has following defines for libtool versioning: > > LIBDT_CURRENT=6 > LIBDT_REVISION=0 > LIBDT_AGE=0 > > along with a comment on how the values were chosen. Copy the comment and > the values into the meson.build as well, so appropriate symlinks > pointing at the versioned library are created. We forego the extra > complexity of having a common file that's read from both build systems > as we are intent on phasing out autotools anyway, once wrinkles such as > what's fixed here are ironed out. > > The translation from libtool versioning to major/minor/revision as > expected by meson is taken from GNOME's gcab[1]. More information > about libtool versioning is available in its documentation[2]. > > [1]: https://gitlab.gnome.org/GNOME/gcab/-/commit/2c8048f74ec8c088397 > [2]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html > > Reported-by: Enrico Jörns > Signed-off-by: Ahmad Fatoum Thanks, this patch is now released in v2023.11.0. - Roland > --- > v1 -> v2: > - set library version major as current - age > --- > meson.build | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/meson.build b/meson.build > index 9579e712dfea..6489e4c4d52e 100644 > --- a/meson.build > +++ b/meson.build > @@ -122,6 +122,18 @@ versiondep = declare_dependency(sources: version_h) > > meson.add_dist_script('version-gen', meson.project_version()) > > +# If the library source code has changed at all since the last release, > +# then increment revision (‘c:r:a’ becomes ‘c:r+1:a’). > +# If any interfaces have been added/removed/changed since the last release, > +# then increment current, and set revision to 0. > +# If any public interfaces have been added since the last public release, > +# then increment age. > +# If any interfaces have been removed or changed since the last release, > +# then set age to 0. > +lt_current = 6 > +lt_revision = 0 > +lt_age = 0 > + > mapfile = 'src/libdt-utils.sym' > libdt_ld_flags = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) > > @@ -133,6 +145,7 @@ libdt = shared_library('dt-utils', > c_args : ['-include', meson.current_build_dir() / 'version.h'], > dependencies : [udevdep, versiondep], > gnu_symbol_visibility : 'default', > + version: '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision), > install : true) > > executable('barebox-state', > -- > 2.39.2 > > > -- Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |