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