tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
build: no more go build in meson
Eli Mallon
6 months ago
c00aaef3
2ccfe454
+13
-100
3 changed files
expand all
collapse all
unified
split
Makefile
cmd
streamplace
empty.c
meson.build
+1
-2
Makefile
···
75
75
76
76
.PHONY: dev-setup-meson-compile
77
77
dev-setup-meson-compile:
78
78
-
meson compile -C $(BUILDDIR) streamplace
79
79
-
meson install --no-rebuild -C $(BUILDDIR)
78
78
+
meson install -C $(BUILDDIR)
80
79
81
80
.PHONY: dev-rust
82
81
dev-rust:
+4
cmd/streamplace/empty.c
···
1
1
+
int main(int argc, char *argv[])
2
2
+
{
3
3
+
return 0;
4
4
+
}
+8
-98
meson.build
···
253
253
]
254
254
endif
255
255
256
256
-
libstreamplace = custom_target(
257
257
-
'libstreamplace',
258
258
-
input: [streamplace_go, flags],
259
259
-
output: ['streamplace.a', 'streamplace.h'],
260
260
-
command: [
261
261
-
prog_go,
262
262
-
'build',
263
263
-
'-o', '@OUTPUT0@',
264
264
-
'-buildmode', 'c-archive',
265
265
-
'-tags', 'netgo',
266
266
-
'@INPUT@',
267
267
-
],
268
268
-
build_always_stale: true,
269
269
-
env: env,
270
270
-
)
271
271
-
272
256
subdir('rust/iroh-streamplace')
273
257
274
258
if host_machine.system() == 'darwin'
···
300
284
description: 'all streamplace dependencies bundled for easy inclusion',
301
285
)
302
286
303
303
-
if build_machine.system() == 'linux' and host_machine.system() == 'darwin'
304
304
-
# this only exists to convince meson to build all of the streamplace dependencies
305
305
-
# the real binary comes from the `go build` command below
306
306
-
cstreamplace = executable(
307
307
-
'cstreamplace',
308
308
-
['cmd/streamplace/streamplace.c', libstreamplace],
309
309
-
dependencies: [
310
310
-
streamplace_deps,
311
311
-
],
312
312
-
link_with: [c2pa_go_dep, iroh_streamplace_dep],
313
313
-
)
314
314
-
315
315
-
streamplace = custom_target(
316
316
-
'streamplace',
317
317
-
input: [cstreamplace, flags],
318
318
-
output: ['streamplace'],
319
319
-
command: [
320
320
-
prog_go,
321
321
-
'build',
322
322
-
'-o', '@OUTPUT0@',
323
323
-
'-tags', 'netgo',
324
324
-
'streamplace.go',
325
325
-
'@INPUT1@',
326
326
-
],
327
327
-
build_always_stale: true,
328
328
-
env: env,
329
329
-
)
330
330
-
else
331
331
-
streamplace = executable(
332
332
-
'streamplace',
333
333
-
['cmd/streamplace/streamplace.c', libstreamplace],
334
334
-
dependencies: [
335
335
-
streamplace_deps,
336
336
-
],
337
337
-
link_with: [c2pa_go_dep, iroh_streamplace_dep],
338
338
-
)
339
339
-
endif
340
340
-
341
341
-
if not meson.is_cross_build()
342
342
-
test(
343
343
-
'go-tests',
344
344
-
prog_go,
345
345
-
depends: [streamplace],
346
346
-
env: env,
347
347
-
verbose: true,
348
348
-
timeout: 0,
349
349
-
args: [
350
350
-
'test',
351
351
-
'-p', '1',
352
352
-
'-timeout', '600s',
353
353
-
'@0@/pkg/...'.format(meson.current_source_dir()),
354
354
-
'@0@/cmd/...'.format(meson.current_source_dir()),
355
355
-
],
356
356
-
)
357
357
-
endif
358
358
-
359
359
-
if host_machine.system() == 'windows'
360
360
-
prog_zip = find_program('zip')
361
361
-
archive_name = 'streamplace-' + version + '-' + GOOS + '-' + GOARCH + '.zip'
362
362
-
custom_target(
363
363
-
'archive',
364
364
-
input: [streamplace],
365
365
-
output: ['streamplace.zip'],
366
366
-
command: [prog_zip, '../bin/' + archive_name, '@INPUT@'],
367
367
-
install: true,
368
368
-
install_dir: './bin',
369
369
-
build_by_default: false,
370
370
-
)
371
371
-
else
372
372
-
prog_tar = find_program('tar')
373
373
-
# archive_name = streamplace-$(VERSION)-$$GOOS-$$GOARCH.tar.gz
374
374
-
archive_name = 'streamplace-' + version + '-' + GOOS + '-' + GOARCH + '.tar.gz'
375
375
-
custom_target(
376
376
-
'archive',
377
377
-
input: [streamplace],
378
378
-
output: ['streamplace.tar.gz'],
379
379
-
command: [prog_tar, '-czvf', '../bin/' + archive_name, '@INPUT@'],
380
380
-
install: true,
381
381
-
install_dir: './bin',
382
382
-
build_by_default: false,
383
383
-
)
384
384
-
endif
287
287
+
streamplacedeps = executable(
288
288
+
'streamplacedeps',
289
289
+
['cmd/streamplace/empty.c'],
290
290
+
dependencies: [
291
291
+
streamplace_deps,
292
292
+
],
293
293
+
link_with: [c2pa_go_dep, iroh_streamplace_dep],
294
294
+
)