python312Packages.types-aiobotocore: 2.15.2 -> 2.15.2.post3 (#361801)
[NixPkgs.git] / pkgs / desktops / gnustep / base / fixup-paths.patch
blobfa28412dbf62c925cb943502297adb357ba81784
1 diff -r -u gnustep-base-1.24.7/Makefile.postamble gnustep-base-1.24.7.patched/Makefile.postamble
2 --- gnustep-base-1.24.7/Makefile.postamble 2011-07-15 19:53:45.000000000 +0600
3 +++ gnustep-base-1.24.7.patched/Makefile.postamble 2014-11-29 22:25:07.000000000 +0600
4 @@ -38,13 +38,13 @@
5 # Things to do after compiling
6 # after-all::
8 -$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
9 - $(ECHO_CREATING)$(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
10 +$(DESTDIR_GNUSTEP_MAKEFILES)/Additional:
11 + $(ECHO_CREATING)$(MKDIRS) $(DESTDIR_GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
13 # Things to do before installing
14 -before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
15 +before-install:: $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
16 $(ECHO_NOTHING)$(INSTALL_DATA) base.make \
17 - $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
18 + $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
20 # Things to do after installing
21 # after-install::
22 @@ -54,7 +54,7 @@
24 # Things to do after uninstalling
25 after-uninstall::
26 - $(ECHO_NOTHING)rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
27 + $(ECHO_NOTHING)rm -f $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
29 # Things to do before cleaning
30 # before-clean::
31 diff -r -u gnustep-base-1.24.7/Source/NSPathUtilities.m gnustep-base-1.24.7.patched/Source/NSPathUtilities.m
32 --- gnustep-base-1.24.7/Source/NSPathUtilities.m 2014-01-14 13:21:10.000000000 +0600
33 +++ gnustep-base-1.24.7.patched/Source/NSPathUtilities.m 2015-01-25 13:59:37.000000000 +0600
34 @@ -153,16 +153,27 @@
35 static NSString *gnustepLocalUsersDir = nil;
37 static NSString *gnustepSystemApps = nil;
38 +static NSArray *gnustepSystemAppsNix = nil;
39 static NSString *gnustepSystemAdminApps = nil;
40 +static NSArray *gnustepSystemAdminAppsNix = nil;
41 static NSString *gnustepSystemWebApps = nil;
42 +static NSArray *gnustepSystemWebAppsNix = nil;
43 static NSString *gnustepSystemTools = nil;
44 +static NSArray *gnustepSystemToolsNix = nil;
45 static NSString *gnustepSystemAdminTools = nil;
46 +static NSArray *gnustepSystemAdminToolsNix = nil;
47 static NSString *gnustepSystemLibrary = nil;
48 +static NSArray *gnustepSystemLibraryNix = nil;
49 static NSString *gnustepSystemLibraries = nil;
50 +static NSArray *gnustepSystemLibrariesNix = nil;
51 static NSString *gnustepSystemHeaders = nil;
52 +static NSArray *gnustepSystemHeadersNix = nil;
53 static NSString *gnustepSystemDocumentation = nil;
54 +static NSArray *gnustepSystemDocumentationNix = nil;
55 static NSString *gnustepSystemDocumentationInfo = nil;
56 +static NSArray *gnustepSystemDocumentationInfoNix = nil;
57 static NSString *gnustepSystemDocumentationMan = nil;
58 +static NSArray *gnustepSystemDocumentationManNix = nil;
60 static NSString *gnustepNetworkApps = nil;
61 static NSString *gnustepNetworkAdminApps = nil;
62 @@ -258,6 +269,18 @@
66 +/* Like ASSIGN_PATH, but permits multiple components in a path
67 + */
68 +#define ASSIGN_PATH_NIX(var, dictionary, key) ({\
69 + id val = getPathConfigNix(dictionary, key);\
70 + if (val != nil)\
71 + {\
72 + RELEASE(var);\
73 + var = RETAIN(val);\
74 + [dictionary removeObjectForKey: key];\
75 + }\
76 +})
78 /* Like ASSIGN_PATH(), but permits the result to be a relative path as that
79 * is what we normally use (the path is within the user's home directory).
81 @@ -368,7 +391,7 @@
82 /* Get a full path string */
83 static inline NSString *
84 getPath(NSString *path)
86 +{
87 if ([path hasPrefix: @"./"] == YES)
89 path = [gnustepConfigPath stringByAppendingPathComponent:
90 @@ -383,6 +406,33 @@
91 return path;
94 +static inline NSArray *
95 +getPathConfigNix(NSDictionary *dict, NSString *key)
97 + NSArray *res = nil;
98 + NSMutableArray *paths = nil;
99 + NSString *path;
100 +#if defined(__MINGW_)
101 + NSString *sep = @";";
102 +#else
103 + NSString *sep = @":";
104 +#endif
106 + path = [dict objectForKey: key];
107 + if (path != nil)
109 + if ([path rangeOfString:sep].location != NSNotFound)
111 + res = [path componentsSeparatedByString:sep];
113 + else
115 + res = [[NSArray alloc] initWithObjects:path, nil];
118 + return res;
121 /* Get a full path string from a dictionary */
122 static inline NSString *
123 getPathConfig(NSDictionary *dict, NSString *key)
124 @@ -468,6 +518,29 @@
125 ASSIGN_PATH(gnustepSystemDocumentationInfo, c,
126 @"GNUSTEP_SYSTEM_DOC_INFO");
128 + ASSIGN_PATH_NIX(gnustepSystemAppsNix, c,
129 + @"NIX_GNUSTEP_SYSTEM_APPS");
130 + ASSIGN_PATH_NIX(gnustepSystemAdminAppsNix, c,
131 + @"NIX_GNUSTEP_SYSTEM_ADMIN_APPS");
132 + ASSIGN_PATH_NIX(gnustepSystemWebAppsNix, c,
133 + @"NIX_GNUSTEP_SYSTEM_WEB_APPS");
134 + ASSIGN_PATH_NIX(gnustepSystemToolsNix, c,
135 + @"NIX_GNUSTEP_SYSTEM_TOOLS");
136 + ASSIGN_PATH_NIX(gnustepSystemAdminToolsNix, c,
137 + @"NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS");
138 + ASSIGN_PATH_NIX(gnustepSystemLibraryNix, c,
139 + @"NIX_GNUSTEP_SYSTEM_LIBRARY");
140 + ASSIGN_PATH_NIX(gnustepSystemLibrariesNix, c,
141 + @"NIX_GNUSTEP_SYSTEM_LIBRARIES");
142 + ASSIGN_PATH_NIX(gnustepSystemHeadersNix, c,
143 + @"NIX_GNUSTEP_SYSTEM_HEADERS");
144 + ASSIGN_PATH_NIX(gnustepSystemDocumentationNix, c,
145 + @"NIX_GNUSTEP_SYSTEM_DOC");
146 + ASSIGN_PATH_NIX(gnustepSystemDocumentationManNix, c,
147 + @"NIX_GNUSTEP_SYSTEM_DOC_MAN");
148 + ASSIGN_PATH_NIX(gnustepSystemDocumentationInfoNix, c,
149 + @"NIX_GNUSTEP_SYSTEM_DOC_INFO");
151 ASSIGN_PATH(gnustepNetworkApps, c,
152 @"GNUSTEP_NETWORK_APPS");
153 ASSIGN_PATH(gnustepNetworkAdminApps, c,
154 @@ -1235,6 +1308,18 @@
155 DESTROY(gnustepSystemDocumentationMan);
156 DESTROY(gnustepSystemDocumentationInfo);
158 + DESTROY(gnustepSystemAppsNix);
159 + DESTROY(gnustepSystemAdminAppsNix);
160 + DESTROY(gnustepSystemWebAppsNix);
161 + DESTROY(gnustepSystemToolsNix);
162 + DESTROY(gnustepSystemAdminToolsNix);
163 + DESTROY(gnustepSystemLibraryNix);
164 + DESTROY(gnustepSystemLibrariesNix);
165 + DESTROY(gnustepSystemHeadersNix);
166 + DESTROY(gnustepSystemDocumentationNix);
167 + DESTROY(gnustepSystemDocumentationManNix);
168 + DESTROY(gnustepSystemDocumentationInfoNix);
170 DESTROY(gnustepNetworkApps);
171 DESTROY(gnustepNetworkAdminApps);
172 DESTROY(gnustepNetworkWebApps);
173 @@ -2183,6 +2268,27 @@
174 if ([add_dir length] > 0 && [paths containsObject: add_dir] == NO) \
175 [paths addObject: add_dir]; \
177 +#define ADD_PATH_NIX(mask, base_dirs, add_dir) \
178 +if ((domainMask & mask) && (base_dirs != nil)) \
179 +{ \
180 + NSEnumerator *e = [base_dirs objectEnumerator]; \
181 + NSString *dir = nil; \
182 + while (dir = [e nextObject]) { \
183 + path = [dir stringByAppendingPathComponent: add_dir]; \
184 + if ([path length] > 0 && [paths containsObject: path] == NO) \
185 + [paths addObject: path]; \
186 + } \
188 +#define ADD_PLATFORM_PATH_NIX(mask, add_dirs) \
189 +if ((domainMask & mask) && (add_dirs != nil)) \
190 +{ \
191 + NSEnumerator *e = [add_dirs objectEnumerator]; \
192 + NSString *dir = nil; \
193 + while (dir = [e nextObject]) { \
194 + if ([dir length] > 0 && [paths containsObject: dir] == NO) \
195 + [paths addObject:dir]; \
196 + } \
199 switch (directoryKey)
201 @@ -2191,11 +2297,13 @@
202 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
203 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
204 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
205 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
206 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
208 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserAdminApps);
209 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalAdminApps);
210 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkAdminApps);
211 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminAppsNix);
212 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminApps);
214 break;
215 @@ -2205,6 +2313,7 @@
216 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
217 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
218 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
219 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
220 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
222 break;
223 @@ -2214,6 +2323,7 @@
224 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
225 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
226 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
227 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
228 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
230 /* I imagine if ever wanted a separate Demo directory, the
231 @@ -2231,6 +2341,7 @@
233 case NSCoreServicesDirectory:
235 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"CoreServices");
236 ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"CoreServices");
238 break;
239 @@ -2248,6 +2359,7 @@
240 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
241 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
242 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
243 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
244 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
246 break;
247 @@ -2257,6 +2369,7 @@
248 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserAdminApps);
249 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalAdminApps);
250 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkAdminApps);
251 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminAppsNix);
252 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminApps);
254 break;
255 @@ -2266,6 +2379,7 @@
256 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibrary);
257 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibrary);
258 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibrary);
259 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix);
260 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibrary);
262 break;
263 @@ -2281,6 +2395,7 @@
264 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibrary);
265 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibrary);
266 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibrary);
267 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix);
268 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibrary);
270 break;
271 @@ -2418,6 +2533,7 @@
272 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserDocumentation);
273 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalDocumentation);
274 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkDocumentation);
275 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemDocumentationNix);
276 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemDocumentation);
278 break;
279 @@ -2449,6 +2565,7 @@
280 ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Caches");
281 ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Caches");
282 ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Caches");
283 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Caches");
284 ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Caches");
286 break;
287 @@ -2460,6 +2577,8 @@
288 @"ApplicationSupport");
289 ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary,
290 @"ApplicationSupport");
291 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix,
292 + @"ApplicationSupport");
293 ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary,
294 @"ApplicationSupport");
296 @@ -2471,6 +2590,7 @@
297 ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Frameworks");
298 ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Frameworks");
299 ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Frameworks");
300 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Frameworks");
301 ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Frameworks");
303 break;
304 @@ -2480,6 +2600,7 @@
305 ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Fonts");
306 ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Fonts");
307 ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Fonts");
308 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Fonts");
309 ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Fonts");
311 break;
312 @@ -2518,6 +2639,12 @@
313 if (part)
314 ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, part);
316 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix);
317 + if (full)
318 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix, full);
319 + if (part)
320 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix, part);
322 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibraries);
323 if (full)
324 ADD_PATH(NSSystemDomainMask, gnustepSystemLibraries, full);
325 @@ -2560,6 +2687,12 @@
326 if (part)
327 ADD_PATH(NSNetworkDomainMask, gnustepNetworkTools, part);
329 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix);
330 + if (full)
331 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix, full);
332 + if (part)
333 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix, part);
335 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemTools);
336 if (full)
337 ADD_PATH(NSSystemDomainMask, gnustepSystemTools, full);
338 @@ -2602,6 +2735,18 @@
339 if (part)
340 ADD_PATH(NSNetworkDomainMask, gnustepNetworkAdminTools, part);
342 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix);
343 + if (full)
344 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, full);
345 + if (part)
346 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, part);
348 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix);
349 + if (full)
350 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, full);
351 + if (part)
352 + ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, part);
354 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminTools);
355 if (full)
356 ADD_PATH(NSSystemDomainMask, gnustepSystemAdminTools, full);
357 @@ -2615,6 +2760,7 @@
358 ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserWebApps);
359 ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalWebApps);
360 ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkWebApps);
361 + ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemWebAppsNix);
362 ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemWebApps);
364 break;
365 @@ -2622,6 +2768,8 @@
367 #undef ADD_PATH
368 #undef ADD_PLATFORM_PATH
369 +#undef ADD_PATH_NIX
370 +#undef ADD_PLATFORM_PATH_NIX
372 count = [paths count];
373 for (i = 0; i < count; i++)