1
- use std:: collections:: { BTreeMap , BTreeSet } ;
1
+ use std:: collections:: { BTreeMap , BTreeSet , HashMap } ;
2
2
use std:: str:: FromStr ;
3
3
4
- use crate :: config:: Config ;
4
+ use crate :: config:: { Config , LibraryData } ;
5
5
use crate :: library:: Library ;
6
6
use crate :: stmt:: Stmt ;
7
7
@@ -11,10 +11,10 @@ pub struct Output {
11
11
}
12
12
13
13
impl Output {
14
- pub fn from_libraries ( libraries : impl IntoIterator < Item = impl Into < String > > ) -> Self {
14
+ pub fn from_libraries ( libraries : & HashMap < String , LibraryData > ) -> Self {
15
15
let libraries = libraries
16
- . into_iter ( )
17
- . map ( |name| ( name. into ( ) , Library :: new ( ) ) )
16
+ . iter ( )
17
+ . map ( |( name, data ) | ( name. into ( ) , Library :: new ( name , data ) ) )
18
18
. collect ( ) ;
19
19
Self { libraries }
20
20
}
@@ -58,6 +58,7 @@ impl Output {
58
58
]
59
59
. into_iter ( )
60
60
. collect ( ) ;
61
+ let mut gnustep_features: BTreeSet < String > = vec ! [ ] . into_iter ( ) . collect ( ) ;
61
62
62
63
for ( mut library_name, library) in & config. libraries {
63
64
if let Some ( alias) = & library. name {
@@ -83,6 +84,10 @@ impl Output {
83
84
macos_13_features. insert ( format ! ( "{library_name}_all" ) ) ;
84
85
}
85
86
}
87
+
88
+ if library. gnustep_library . is_some ( ) {
89
+ gnustep_features. insert ( format ! ( "{library_name}_all" ) ) ;
90
+ }
86
91
}
87
92
88
93
let _ = features. insert (
@@ -105,6 +110,10 @@ impl Output {
105
110
"unstable-frameworks-macos-13" . into ( ) ,
106
111
macos_13_features. into_iter ( ) . collect ( ) ,
107
112
) ;
113
+ let _ = features. insert (
114
+ "unstable-frameworks-gnustep" . into ( ) ,
115
+ gnustep_features. into_iter ( ) . collect ( ) ,
116
+ ) ;
108
117
109
118
for ( library_name, library) in & self . libraries {
110
119
let library_alias = config. get_library_alias ( library_name. clone ( ) ) ;
0 commit comments