1 |
On Tue, 28 Aug 2012 10:10:01 +0200 |
2 |
Tiziano Müller <dev-zero@g.o> wrote: |
3 |
|
4 |
> Am Dienstag, den 28.08.2012, 10:06 +0200 schrieb Michał Górny: |
5 |
> > On Tue, 28 Aug 2012 06:26:02 +0200 |
6 |
> > Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com> wrote: |
7 |
> > |
8 |
> > > 2012-08-28 00:19:28 Michał Górny napisał(a): |
9 |
> > > > --- /dev/null |
10 |
> > > > +++ b/gx86/eclass/boost-utils.eclass |
11 |
> > > > @@ -0,0 +1,43 @@ |
12 |
> > > > +# Copyright 1999-2012 Gentoo Foundation |
13 |
> > > > +# Distributed under the terms of the GNU General Public |
14 |
> > > > License v2 +# $Header: $ |
15 |
> > > > + |
16 |
> > > > +if [[ ! ${_BOOST_ECLASS} ]]; then |
17 |
> > > > + |
18 |
> > > > +# @ECLASS: boost-utils.eclass |
19 |
> > > > +# @MAINTAINER: |
20 |
> > > > +# mgorny@g.o |
21 |
> > > |
22 |
> > > It is better to copy list of maintainers from |
23 |
> > > gentoo-x86/dev-libs/boost/metadata.xml. |
24 |
> > > |
25 |
> > > > +# @BLURB: helper functions for packages using Boost C++ library |
26 |
> > > > +# @DESCRIPTION: |
27 |
> > > > +# Helper functions to be used when building packages using the |
28 |
> > > > Boost C++ +# library collection. |
29 |
> > > > + |
30 |
> > > > +case ${EAPI:-0} in |
31 |
> > > > + 0|1|2|3|4) ;; |
32 |
> > > > + *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet |
33 |
> > > > established." +esac |
34 |
> > > |
35 |
> > > Please accept all EAPIs. |
36 |
> > |
37 |
> > These are EAPIs which are allowed throughout the tree, sorry. Feel |
38 |
> > free to ping Council about adding non-standard EAPIs to eclasses. |
39 |
> > |
40 |
> > > > +inherit versionator |
41 |
> > > > + |
42 |
> > > > +# @FUNCTION: boost-utils_get_best_slot |
43 |
> > > > +# @DESCRIPTION: |
44 |
> > > > +# Get newest SLOT (major version) of Boost. |
45 |
> > > > +boost-utils_get_best_slot() { |
46 |
> > > > + local pkg=dev-libs/boost |
47 |
> > > > + local atom=$(best_version ${pkg}) |
48 |
> > > > + get_version_component_range 1-2 ${atom#${pkg}} |
49 |
> > > > +} |
50 |
> > > > + |
51 |
> > > > +# @FUNCTION: boost-utils_get_includedir |
52 |
> > > > +# @DESCRIPTION: |
53 |
> > > > +# Get correct includedir for best Boost version. Outputs the |
54 |
> > > > sole path +# (without -I). |
55 |
> > > > +boost-utils_get_includedir() { |
56 |
> > > > + local slot=$(boost-utils_get_best_slot) |
57 |
> > > > + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
58 |
> > > > + |
59 |
> > > > + echo -n "${EPREFIX}/usr/include/boost-${slot/./_}" |
60 |
> > > > +} |
61 |
> > > |
62 |
> > > There needs to be a way to specify maximal accepted slot of Boost. |
63 |
> > > Examples of some possibilities: |
64 |
> > > * BOOST_MAX_SLOT="1.49" global variable |
65 |
> > > * '--max 1.49' arguments for boost-utils_get_* functions |
66 |
> > |
67 |
> > I'd rather wait with that till Tiziano expresses his opinion. I |
68 |
> > think the policy ought to be 'always prefer newest version' but I |
69 |
> > guess that's hard with boost. |
70 |
> > |
71 |
> |
72 |
> one of the points of having a slotted boost (besides solving the |
73 |
> rebuild when API/ABI breakages occur) is that a package may also use |
74 |
> an older boost slot (currently it only would make sense if we'd |
75 |
> backport the glibc-2.16 patches but that's a different story). So I'd |
76 |
> prefer if we'd have a BOOST_MAX_SLOT variable. |
77 |
|
78 |
Do we want to support using random old versions of boost then or just |
79 |
the newest supported SLOT? If the latter, we could get away without |
80 |
using best_version, and just request devs to depend on specific boost |
81 |
slot then. |
82 |
|
83 |
-- |
84 |
Best regards, |
85 |
Michał Górny |