Ravenports generated: 15 Feb 2023 23:13
[ravenports.git] / bucket_9F / ada_spawn
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               ada_spawn
4 VERSION=                23.0.0
5 REVISION=               1
6 KEYWORDS=               devel ada
7 VARIANTS=               standard
8 SDESC[standard]=        Simple API to spawn communicating processes
9 HOMEPAGE=               none
10 CONTACT=                John_Marino[draco@marino.st]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            GITHUB/AdaCore:spawn:v23.0.0
14 DISTFILE[1]=            generated:main
15 DF_INDEX=               1
16 SPKGS[standard]=        single
17
18 OPTIONS_AVAILABLE=      none
19 OPTIONS_STANDARD=       none
20
21 BUILDRUN_DEPENDS=       gtkada:primary:standard
22                         harfbuzz:dev:standard
23                         glib:dev:standard
24                         gettext:solinks:standard
25
26 USES=                   gmake gprbuild fontconfig zlib:build gettext:build
27 GNOME_COMPONENTS=       gtk3
28
29 LICENSE=                APACHE20:single
30 LICENSE_TERMS=          single:{{WRKDIR}}/TERMS
31 LICENSE_FILE=           APACHE20:{{WRKSRC}}/LICENSE
32 LICENSE_AWK=            TERMS:"^$$"
33 LICENSE_SOURCE=         TERMS:{{WRKSRC}}/source/spawn/spawn.ads
34 LICENSE_SCHEME=         solo
35
36 MAKE_ENV=               BUILD_MODE=prod
37
38 INSTALL_REQ_TOOLCHAIN=  yes
39
40 do-build:
41 .for LT in relocatable static-pic static
42 . for GPR in spawn.gpr spawn_glib.gpr
43         ${SETENV} ${MAKE_ENV} gprbuild -p -j0 -XLIBRARY_TYPE=${LT} -P ${WRKSRC}/gnat/${GPR}
44 . endfor
45 .endfor
46
47 post-extract:
48         ${CP} ${FILESDIR}/ptsname_r.c ${WRKSRC}/source/spawn
49
50 do-install:
51 .for LT in relocatable static-pic static
52 . for GPR in spawn spawn_glib
53         ${SETENV} ${MAKE_ENV} gprinstall\
54                 --prefix=${STAGEDIR}${PREFIX}\
55                 --lib-subdir=lib/${GPR}.${LT}\
56                 --sources-subdir=include/${GPR}\
57                 -p -P ${WRKSRC}/gnat/${GPR}.gpr
58 . endfor
59 .endfor
60         ${RM} -r ${STAGEDIR}${PREFIX}/share/gpr/manifests
61         # override generated gpr with our own
62         ${INSTALL_DATA} ${FILESDIR}/*.gpr ${STAGEDIR}${PREFIX}/share/gpr
63         # I don't know where these lines are coming from
64         ${SED} -i'' -e '/spawn-processes__posix.adb/d' \
65                 ${STAGEDIR}${PREFIX}/share/gpr/spawn.gpr
66         ${SED} -i'' -e '/spawn-processes__glib.adb/d' \
67                 ${STAGEDIR}${PREFIX}/share/gpr/spawn_glib.gpr
68
69 [FILE:208:descriptions/desc.single]
70 Ada Process API (spawn)
71
72 This library provides simple API to spawn processes and communicate with
73 them. Two implementations of the same API are provided:
74  * The integrated into Glib event loop
75  * Independent
76
77
78 [FILE:106:distinfo]
79 1487fef86433d1d06c5c3af3c012aac9eae8d2f4b7f8c1d2fdbe2be0b1770fa8        43449 AdaCore-spawn-23.0.0.tar.gz
80
81
82 [FILE:2797:manifests/plist.single]
83 include/spawn/
84  posix_const.c
85  ptsname_r.c
86  spawn-environments-initialize_default__posix.adb
87  spawn-environments-internal__posix.adb
88  spawn-environments-internal__posix.ads
89  spawn-environments-search_in_path__posix.adb
90  spawn-environments.adb
91  spawn-environments.ads
92  spawn-internal__posix.adb
93  spawn-internal__posix.ads
94  spawn-posix.ads
95  spawn-processes-monitor-osx_initialize.adb
96  spawn-processes-monitor-unix_initialize.adb
97  spawn-processes-monitor.ads
98  spawn-processes-monitor__posix.adb
99  spawn-processes-monitor_loop.adb
100  spawn-processes-monitor_loop.ads
101  spawn-processes-platform__posix.adb
102  spawn-processes.adb
103  spawn-processes.ads
104  spawn-string_vectors.ads
105  spawn.ads
106 include/spawn_glib/
107  pipe2.c
108  posix_const.c
109  ptsname_r.c
110  spawn-channels.adb
111  spawn-channels.ads
112  spawn-environments-initialize_default__glib.adb
113  spawn-environments-internal__glib.adb
114  spawn-environments-internal__glib.ads
115  spawn-environments-search_in_path__posix.adb
116  spawn-environments.adb
117  spawn-environments.ads
118  spawn-internal__glib.ads
119  spawn-internal__posix.adb
120  spawn-posix.ads
121  spawn-processes-monitor-osx_initialize.adb
122  spawn-processes-monitor-unix_initialize.adb
123  spawn-processes-platform__glib.adb
124  spawn-processes.adb
125  spawn-processes.ads
126  spawn-string_vectors.ads
127  spawn.ads
128 lib/spawn.relocatable/
129  libspawn.a
130  spawn-environments-internal__posix.ali
131  spawn-environments.ali
132  spawn-internal__posix.ali
133  spawn-posix.ali
134  spawn-processes-monitor__posix.ali
135  spawn-processes-monitor_loop.ali
136  spawn-processes.ali
137  spawn-string_vectors.ali
138  spawn.ali
139 lib/spawn.static/
140  libspawn.a
141  spawn-environments-internal__posix.ali
142  spawn-environments.ali
143  spawn-internal__posix.ali
144  spawn-posix.ali
145  spawn-processes-monitor__posix.ali
146  spawn-processes-monitor_loop.ali
147  spawn-processes.ali
148  spawn-string_vectors.ali
149  spawn.ali
150 lib/spawn.static-pic/
151  libspawn.a
152  spawn-environments-internal__posix.ali
153  spawn-environments.ali
154  spawn-internal__posix.ali
155  spawn-posix.ali
156  spawn-processes-monitor__posix.ali
157  spawn-processes-monitor_loop.ali
158  spawn-processes.ali
159  spawn-string_vectors.ali
160  spawn.ali
161 lib/spawn_glib.relocatable/
162  libspawn_glib.a
163  spawn-channels.ali
164  spawn-environments-internal__glib.ali
165  spawn-environments.ali
166  spawn-internal__posix.ali
167  spawn-posix.ali
168  spawn-processes.ali
169  spawn-string_vectors.ali
170  spawn.ali
171 lib/spawn_glib.static/
172  libspawn_glib.a
173  spawn-channels.ali
174  spawn-environments-internal__glib.ali
175  spawn-environments.ali
176  spawn-internal__posix.ali
177  spawn-posix.ali
178  spawn-processes.ali
179  spawn-string_vectors.ali
180  spawn.ali
181 lib/spawn_glib.static-pic/
182  libspawn_glib.a
183  spawn-channels.ali
184  spawn-environments-internal__glib.ali
185  spawn-environments.ali
186  spawn-internal__posix.ali
187  spawn-posix.ali
188  spawn-processes.ali
189  spawn-string_vectors.ali
190  spawn.ali
191 share/gpr/
192  spawn.gpr
193  spawn_glib.gpr
194
195
196 [FILE:529:patches/patch-Makefile]
197 --- Makefile.orig       2022-09-26 13:44:48 UTC
198 +++ Makefile
199 @@ -19,7 +19,7 @@ endif
200  
201  all:
202         gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn.gpr
203 -       gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn_tests.gpr
204 +       gprbuild $(GPRBUILD_FLAGS) -P gnat/spawn_glib.gpr
205  check:
206         export LD_LIBRARY_PATH=.libs/spawn/relocatable; \
207         for TEST in ${SPAWN_TESTS}; do \
208 @@ -28,6 +28,7 @@ check:
209  
210  install:
211         gprinstall $(GPRINSTALL_FLAGS) -p -P gnat/spawn.gpr
212 +       gprinstall $(GPRINSTALL_FLAGS) -f -p -P gnat/spawn_glib.gpr
213  clean:
214         gprclean -q -P gnat/spawn.gpr
215  
216
217
218 [FILE:521:patches/patch-source_spawn_spawn-posix.ads]
219 --- source/spawn/spawn-posix.ads.orig   2022-09-26 13:44:48 UTC
220 +++ source/spawn/spawn-posix.ads
221 @@ -154,7 +154,7 @@ package Spawn.Posix is
222       (fd     : Interfaces.C.int;
223        buf    : out Interfaces.C.char_array;
224        buflen : Interfaces.C.size_t) return Interfaces.C.int
225 -     with Import, Convention => C, External_Name => "ptsname_r";
226 +     with Import, Convention => C, External_Name => "__ptsname_r";
227  
228     function setsid return Interfaces.C.int
229       with Import, Convention => C, External_Name => "setsid";
230
231
232 [FILE:1353:files/ptsname_r.c]
233 #ifdef __DragonFly__
234 # define __NEEDS_PTSNAME_R__
235 #endif
236 #ifdef __FreeBSD__
237 # include <sys/param.h>
238 # if __FreeBSD_version < 1203000
239 #  define __NEEDS_PTSNAME_R__
240 # endif
241 #endif
242
243 #ifdef __NEEDS_PTSNAME_R__
244
245 #include <stdlib.h>
246 #include <errno.h>
247 #include <string.h>
248
249 /* Store at most BUFLEN characters of the pathname of the slave pseudo
250    terminal associated with the master FD is open on in BUF.
251    Return 0 on success, otherwise an error number.  */
252 int
253 __ptsname_r (int fd, char *buf, size_t buflen)
254 {
255   int saved_errno = errno;
256   char tmpbuf[5 + 4 + 10 + 1];
257   int ret;
258   int n;
259   if (buf == NULL)
260     {
261       errno = EINVAL;
262       return errno;
263     }
264   /* The result of fdevname_r is typically of the form ptm/N.  */
265   ret = fdevname_r (fd, tmpbuf + 5, sizeof (tmpbuf) - 5);
266   if (ret < 0 || strncmp (tmpbuf + 5, "ptm/", 4) != 0)
267     {
268       errno = ENOTTY;
269       return errno;
270     }
271   /* Turn it into /dev/pts/N.  */
272   memcpy (tmpbuf, "/dev/pts/", 5 + 4);
273   n = strlen (tmpbuf);
274   if (n >= buflen)
275     {
276       errno = ERANGE;
277       return errno;
278     }
279   memcpy (buf, tmpbuf, n + 1);
280   /* Don't do a final stat(), since the file name /dev/pts/N does not actually
281      exist.  */
282   errno = saved_errno;
283   return 0;
284 }
285
286 #else
287
288 #include <stdlib.h>
289
290 int
291 __ptsname_r (int fd, char *buf, size_t buflen)
292 {
293   return ptsname_r (fd, buf, buflen);
294 }
295
296 #endif
297
298
299 [FILE:2515:files/spawn.gpr]
300 library project Spawn is
301    type BUILD_KIND is ("static", "static-pic", "relocatable");
302    BUILD : BUILD_KIND := external("SPAWN_BUILD", external("LIBRARY_TYPE", "static-pic"));
303
304    for Languages use ("Ada", "c");
305
306    case BUILD is
307       when "static" =>
308          for Source_Dirs use ("../../include/spawn/");
309          for Library_Dir use "../../lib/spawn.static/";
310          for Library_Kind use "static";
311       when "static-pic" =>
312          for Source_Dirs use ("../../include/spawn");
313          for Library_Dir use "../../lib/spawn.static-pic";
314          for Library_Kind use "static-pic";
315       when "relocatable" =>
316          for Source_Dirs use ("../../include/spawn");
317          for Library_Dir use "../../lib/spawn.relocatable";
318          for Library_Kind use "relocatable";
319    end case;
320
321    for Library_Name use "spawn";
322
323    package Naming is
324       for dot_replacement use "-";
325       for casing use "lowercase";
326       for spec_suffix ("c") use ".h";
327       for spec_suffix ("ada") use ".ads";
328       for body_suffix ("c") use ".c";
329       for body_suffix ("ada") use ".adb";      
330       for body ("spawn.processes.monitor.initialize") use "spawn-processes-monitor-unix_initialize.adb";
331       for body ("spawn.processes.monitor") use "spawn-processes-monitor__posix.adb";
332       for body ("spawn.environments.search_in_path") use "spawn-environments-search_in_path__posix.adb";
333       for body ("spawn.processes") use "spawn-processes__posix.adb";
334       for body ("spawn.environments.internal") use "spawn-environments-internal__posix.adb";
335       for body ("spawn.environments.initialize_default") use "spawn-environments-initialize_default__posix.adb";
336       for body ("spawn.internal") use "spawn-internal__posix.adb";
337       for spec ("spawn.environments.internal") use "spawn-environments-internal__posix.ads";
338       for spec ("spawn.internal") use "spawn-internal__posix.ads";
339    end Naming;
340
341    package Linker is
342       null;
343    end Linker;
344
345    package Install is
346       for Active use "False";
347    end Install;
348
349    for Externally_Built use "True";
350
351    type Os_Api_Kind is
352      ("unix", "osx", "Windows_NT");
353
354    type Spawn_Build_Kind is
355      ("dev", "prod", "coverage");
356
357    type Any_Boolean is
358      ("false", "true");
359
360    linker_options     := ();
361    ada_switches       := ("-gnatwe", "-O2", "-g");
362    common_excluded    := ();
363    warnings_as_errors : any_boolean := "true";
364    superproject       := "";
365    build_mode         : spawn_build_kind := "prod";
366    os_api             : os_api_kind := "unix";
367 end Spawn;
368
369
370 [FILE:2381:files/spawn_glib.gpr]
371 with "gtkada";
372
373 library project Spawn_Glib is
374    type BUILD_KIND is ("static", "static-pic", "relocatable");
375    BUILD : BUILD_KIND := external("SPAWN_GLIB_BUILD", external("LIBRARY_TYPE", "static-pic"));
376
377    for Languages use ("Ada");
378
379    case BUILD is
380       when "static" =>
381          for Source_Dirs use ("../../include/spawn_glib/");
382          for Library_Dir use "../../lib/spawn_glib.static/";
383          for Library_Kind use "static";
384       when "static-pic" =>
385          for Source_Dirs use ("../../include/spawn_glib");
386          for Library_Dir use "../../lib/spawn_glib.static-pic";
387          for Library_Kind use "static-pic";
388       when "relocatable" =>
389          for Source_Dirs use ("../../include/spawn_glib");
390          for Library_Dir use "../../lib/spawn_glib.relocatable";
391          for Library_Kind use "relocatable";
392    end case;
393
394    for Library_Name use "spawn_glib";
395
396    package Naming is
397       for dot_replacement use "-";
398       for casing use "lowercase";
399       for spec_suffix ("ada") use ".ads";
400       for body_suffix ("ada") use ".adb";
401       for body ("spawn.processes") use "spawn-processes__glib.adb";
402       for body ("spawn.environments.search_in_path") use "spawn-environments-search_in_path__posix.adb";
403       for body ("spawn.environments.internal") use "spawn-environments-internal__glib.adb";
404       for body ("spawn.environments.initialize_default") use "spawn-environments-initialize_default__glib.adb";
405       for body ("spawn.internal") use "spawn-internal__posix.adb";
406       for spec ("spawn.environments.internal") use "spawn-environments-internal__glib.ads";
407       for spec ("spawn.internal") use "spawn-internal__glib.ads";
408    end Naming;
409
410    package Linker is
411       null;
412    end Linker;
413
414    package Install is
415       for Active use "False";
416    end Install;
417
418    for Externally_Built use "True";
419
420    type Os_Api_Kind is
421      ("unix", "osx", "Windows_NT");
422
423    type Spawn_Glib_Build_Kind is
424      ("dev", "prod", "coverage");
425
426    type Any_Boolean is
427      ("false", "true");
428
429    linker_options     := ();
430    ada_switches       := ("-gnatwe", "-O2", "-g");
431    common_excluded    := ("spawn-processes-monitor.ads", "spawn-processes-monitor_loop.ads", "spawn-processes-monitor_loop.adb");
432    warnings_as_errors : any_boolean := "true";
433    build_mode         : spawn_glib_build_kind := "prod";
434    os_api             : os_api_kind := "unix";
435 end Spawn_Glib;
436