aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_spec.se
blob: 7a43cba05ba3a44084ee83ce0fe62bed4e815612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
# vim: set sw=4 sts=4 et ft=sh :

make_enum_VersionSpecComponentType()
{
    prefix vsct

    key vsct_ignore             "An ignorable part (e.g. v in v1.23)"
    key vsct_alpha              "An alpha part"
    key vsct_beta               "A beta part"
    key vsct_pre                "A pre part"
    key vsct_rc                 "An rc part"
    key vsct_empty              "Used for ordering, not present in real versions."
    key vsct_revision           "A revision part"
    key vsct_patch              "A patch part"
    key vsct_trypart            "A try part"
    key vsct_letter             "A letter (e.g. x in 1.2x)"
    key vsct_floatlike          "A number to be compared using float-like rules"
    key vsct_number             "A number (e.g. 1 or 2 in 1.2_pre3)"
    key vsct_scm                "An scm part"

    doxygen_comment << "END"
        /**
         * The type of a VersionSpec component.
         *
         * \ingroup g_dep_spec
         * \since 0.32
         */
END
}

make_enum_VersionSpecOption()
{
    prefix vso

    key vso_flexible_dashes      "Allow - and _ to be interchanged"
    key vso_flexible_dots        "Allow - where . is allowed"
    key vso_ignore_case          "Allow uppercase letters"
    key vso_letters_anywhere     "Allow 1a2.3 etc"
    key vso_dotted_suffixes      "Allow 1_alpha2.3"
    key vso_ignore_leading_v     "Allow v1 etc"
    key vso_allow_leading_dot    "Allow .1.2.3 etc"

    want_destringify

    doxygen_comment << "END"
        /**
         * An option for parsing a VersionSpec.
         *
         * \ingroup g_dep_spec
         * \since 0.38
         * \see VersionSpecOptions
         */
END
}