linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
gen.sh
(1681B)
1 git libdrm-2.4.120
2
3 driver_flag() {
4 has_video_driver $1 && printf 1 || printf 0
5 }
6
7 cflags "
8 -DHAVE_INTEL=$(driver_flag intel)
9 -DHAVE_NOUVEAU=$(driver_flag nouveau)
10 -DHAVE_AMDGPU=$(driver_flag amdgpu)
11 -include $dir/config.h
12 -I$dir
13 -I$outdir
14 -I$srcdir
15 -I$srcdir/include/drm
16 -isystem $pkgdir/linux-headers/include
17 -Wno-format
18 -Wno-unused-parameter
19 -Wno-overflow
20 "
21
22 include "
23 xf86drm.h
24 xf86drmMode.h
25 amdgpu/amdgpu.h
26 include/drm/drm.h
27 include/drm/drm_fourcc.h
28 include/drm/drm_mode.h
29 include/drm/drm_sarea.h
30 include/drm/i915_drm.h
31 include/drm/amdgpu_drm.h
32 "
33
34 dep "
35 libpciaccess/headers
36 linux-headers/headers
37 $outdir/generated_static_table_fourcc.h
38 "
39
40 rule fourcc 'lua $dir/fourcc.lua <$in >$out'
41 bind description 'FOURCC $out'
42
43 fourcc generated_static_table_fourcc.h include/drm/drm_fourcc.h
44
45 lib libdrm.a "
46 xf86drm.c
47 xf86drmHash.c
48 xf86drmMode.c
49 xf86drmRandom.c
50 xf86drmSL.c
51 "
52
53 if has_video_driver intel; then
54 lib libdrm_intel.a --src-prefix intel -isystem $pkgdir/libpciaccess/include \
55 -Wno-pedantic -Wno-missing-field-initializers "
56 intel_bufmgr.c
57 intel_bufmgr_fake.c
58 intel_bufmgr_gem.c
59 intel_decode.c
60 mm.c
61 $pkgdir/libpciaccess/libpciaccess.a
62 "
63 fi
64
65 if has_video_driver nouveau; then
66 lib libdrm_nouveau.a --src-prefix nouveau -Wno-pedantic "
67 abi16.c
68 bufctx.c
69 nouveau.c
70 pushbuf.c
71 "
72 fi
73
74 if has_video_driver amdgpu; then
75 lib libdrm_amdgpu.a --src-prefix amdgpu -Wno-pedantic -Wno-attributes \
76 -D'AMDGPU_ASIC_ID_TABLE=\"%s/share/libdrm/amdgpu.ids\"' "
77 amdgpu_asic_id.c
78 amdgpu_bo.c
79 amdgpu_cs.c
80 amdgpu_device.c
81 amdgpu_gpu_info.c
82 amdgpu_vamgr.c
83 amdgpu_vm.c
84 handle_table.c
85 "
86
87 share --prefix libdrm data/amdgpu.ids
88 fi