master hovercats/oakiss / pkg / libplacebo / gen.lua
 1cflags{
 2	'-std=c11', '-Wall',
 3	'-D _XOPEN_SOURCE=700',
 4	'-I $srcdir/src',
 5	'-I $srcdir/src/include',
 6	'-I $outdir/include',
 7	'-I $outdir',
 8	'-I $dir',
 9}
10
11pkg.hdrs = copy('$outdir/include/libplacebo', '$srcdir/src/include/libplacebo', {
12	-- src/src/meson.build:/^headers =/
13	'cache.h',
14	'colorspace.h',
15	'common.h',
16	'd3d11.h',
17	'dispatch.h',
18	'dither.h',
19	'dummy.h',
20	'filters.h',
21	'gamut_mapping.h',
22	'gpu.h',
23	'log.h',
24	'opengl.h',
25	'options.h',
26	'renderer.h',
27	'shaders/colorspace.h',
28	'shaders/custom.h',
29	'shaders/deinterlacing.h',
30	'shaders/dithering.h',
31	'shaders/film_grain.h',
32	'shaders/icc.h',
33	'shaders/lut.h',
34	'shaders/sampling.h',
35	'shaders.h',
36	'swapchain.h',
37	'tone_mapping.h',
38	'utils/dav1d.h',
39	'utils/dav1d_internal.h',
40	'utils/dolbyvision.h',
41	'utils/frame_queue.h',
42	'utils/libav.h',
43	'utils/libav_internal.h',
44	'utils/upload.h',
45	'vulkan.h',
46})
47pkg.deps = {
48	'$gendir/headers',
49	'$outdir/version.h',
50	'$outdir/include/libplacebo/config.h',
51}
52
53build('awk', '$outdir/version.h', '$dir/ver', {
54	expr=[['{printf "#define BUILD_VERSION \"%s\"\n", $$1}']],
55})
56build('sed', '$outdir/include/libplacebo/config.h', '$srcdir/src/include/libplacebo/config.h.in', {
57	expr={
58		'-e s,@majorver@,7,',
59		'-e s,@apiver@,349,',
60		'-e /@extra_defs@/d',
61	}
62})
63
64-- just enough to build mpv
65lib('libplacebo.a', [[
66	src/(
67		colorspace.c
68		common.c
69	)
70
71]])
72
73fetch 'git'