aboutsummaryrefslogtreecommitdiff
path: root/paludis/version_metadata.sr
blob: 00e4d8dcd65dccf4e9fd92f695d2b284dc587dc0 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#!/bin/bash
# vim: set sw=4 sts=4 et :

make_class_VersionMetadataCapabilities()
{
    key ebuild_interface "VersionMetadataEbuildInterface *"
    key ebin_interface "VersionMetadataEbinInterface *"
    key cran_interface "VersionMetadataCRANInterface *"
    key deps_interface "VersionMetadataDepsInterface *"
    key origins_interface "VersionMetadataOriginsInterface *"
    key virtual_interface "VersionMetadataVirtualInterface *"
    key license_interface "VersionMetadataLicenseInterface *"

    doxygen_comment << "END"
        /**
         * Optional interfaces that may be provided by VersionMetadata.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         * \nosubgrouping
         */
END

    allow_named_args
}

make_class_VersionMetadataDepsInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key parser ParserFunction

    key build_depend_string std::string
    key run_depend_string std::string
    key post_depend_string std::string
    key suggested_depend_string std::string

    extra_constructors <<END
            VersionMetadataDepsInterface(const ParserFunction &);
END

    extra_methods <<END
            /**
             * Our build depends.
             */
            std::tr1::shared_ptr<const DepSpec> build_depend() const;

            /**
             * Our runtime depends.
             */
            std::tr1::shared_ptr<const DepSpec> run_depend() const;

            /**
             * Our post depends.
             */
            std::tr1::shared_ptr<const DepSpec> post_depend() const;

            /**
             * Our suggested depends.
             */
            std::tr1::shared_ptr<const DepSpec> suggested_depend() const;
END

    doxygen_comment << "END"
        /**
         * Dependency data for VersionMetadata.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataLicenseInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key parser ParserFunction

    key license_string std::string

    extra_constructors <<END
            VersionMetadataLicenseInterface(const ParserFunction &);
END

    extra_methods <<END
            /**
             * Our licences.
             */
            std::tr1::shared_ptr<const DepSpec> license() const;
END

    doxygen_comment << "END"
        /**
         * License data for VersionMetadata.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataOriginsInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key "source" "std::tr1::shared_ptr<PackageDatabaseEntry>"
    key "binary" "std::tr1::shared_ptr<PackageDatabaseEntry>"

    extra_constructors <<END
            VersionMetadataOriginsInterface();
END

    doxygen_comment << "END"
        /**
         * Origins data for VersionMetadata.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataBase()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key slot SlotName
    key homepage std::string
    key description std::string
    key eapi std::string
    key interactive bool

    allow_named_args

    doxygen_comment << "END"
        /**
         * Version metadata common to all VersionMetadata types.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataEbuildInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key provide_string std::string
    key src_uri std::string
    key restrict_string std::string
    key keywords std::string
    key eclass_keywords std::string
    key iuse std::string
    key inherited std::string

    extra_constructors <<END
            VersionMetadataEbuildInterface();
END

    extra_methods <<END
            /**
             * PROVIDE, as a dep atom.
             */
            std::tr1::shared_ptr<const DepSpec> provide() const;
END

    allow_named_args

    doxygen_comment << "END"
        /**
         * Version metadata for ebuilds.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataEbinInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key bin_uri std::string

    extra_constructors <<END
            VersionMetadataEbinInterface();
END

    allow_named_args

    doxygen_comment << "END"
        /**
         * Version metadata for ebins.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataCRANInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key keywords std::string
    key package std::string
    key version std::string
    key is_bundle bool
    key is_bundle_member bool

    allow_named_args

    doxygen_comment << "END"
        /**
         * Version metadata for CRAN packages.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}

make_class_VersionMetadataVirtualInterface()
{
    inherit "public virtual VersionMetadataHasInterfaces"

    key virtual_for PackageDatabaseEntry

    doxygen_comment << "END"
        /**
         * Version metadata for virtual packages.
         *
         * \see VersionMetadata
         * \ingroup grpversions
         */
END
}