Ticket #51619: qt5.depcomp.diff

File qt5.depcomp.diff, 1.5 KB (added by RJVB (René Bertin), 8 years ago)
Line 
1284a285,319
2>
3> # a procedure for declaring dependencies on Qt5 components, which will expand them
4> # into the appropriate subports for the Qt5 flavour installed
5> # e.g. qt5.depends_component qtbase qtsvg qtdeclarative
6> proc qt5.depends_component {first args} {
7>     global qt5_component_lib
8>     global qt5.using_kde1
9>     # join ${first} and (the optional) ${args}
10>     set args [linsert $args[set list {}] 0 ${first}]
11>     # select the Qt5 port prefix, depending on which Qt5 port is installed
12>     if {[info exists qt5.using_kde] && ${qt5.using_kde}} {
13>         set qt5pprefix "qt5-kde"
14>     } else {
15>         set qt5pprefix "qt5"
16>     }
17>     foreach comp ${args} {
18>         if {${comp} eq "qt5"} {
19>             if {[info exists qt5.using_kde] && ${qt5.using_kde}} {
20>                 global qt5_dependency
21>                 # qt5-kde-1.0.tcl exports the dependency expression in a variable
22>                 depends_lib-append ${qt5_dependency}
23>             } else {
24>                 depends_lib-append port:${qt5pprefix}
25>             }
26>         } else {
27>             set portname "${qt5pprefix}-${comp}"
28>             if {[info exists qt5_component_lib] && [info exists qt5_component_lib(${comp})]} {
29>                 # an explicit dependency pattern was given, e.g. path:foo
30>                 depends_lib-append "$qt5_component_lib(${comp}):${portname}"
31>             } else {
32>                 depends_lib-append port:${portname}
33>             }
34>         }
35>     }
36> }