1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
%define bcond_meson() %{lua: do
local option = rpm.expand("%{1}")
local with = rpm.expand("%{?with_" .. option .. "}")
local value = (with ~= '') and "enabled" or "disabled"
option = option:gsub('_', '-')
print(string.format("-D%s=%s", option, value))
end}
%define bcond_meson_tf() %{lua: do
local option = rpm.expand("%{1}")
local with = rpm.expand("%{?with_" .. option .. "}")
local value = (with ~= '') and "true" or "false"
option = option:gsub('_', '-')
print(string.format("-D%s=%s", option, value))
end}
%ifarch %{ix86} x86_64
%bcond_without intel
%else
%bcond_with intel
%endif
%bcond_without radeon
%bcond_without amdgpu
%bcond_without nouveau
%bcond_without vmwgfx
%ifarch %{arm}
%bcond_without omap
%else
%bcond_with omap
%endif
%ifarch %{arm} aarch64
%bcond_without exynos
%bcond_without freedreno
%bcond_without tegra
%bcond_without vc4
%bcond_without etnaviv
%else
%bcond_with exynos
%bcond_with freedreno
%bcond_with tegra
%bcond_with vc4
%bcond_with etnaviv
%endif
%bcond_with cairo_tests
%bcond_without man_pages
%ifarch %{valgrind_arches}
%bcond_without valgrind
%else
%bcond_with valgrind
%endif
%bcond_with freedreno_kgsl
%bcond_without install_test_programs
%bcond_without udev
Name: libdrm
Version: 2.4.124
Release: 1
License: MIT
Summary: library for direct rendering manager
URL: https://dri.freedesktop.org
Source0: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz
Source2: 91-drm-modeset.rules
BuildRequires: meson >= 0.43 gcc kernel-headers
%if %{with intel}
BuildRequires: pkgconfig(pciaccess) >= 0.10
%endif
%if %{with cairo_tests}
BuildRequires: pkgconfig(cairo)
%endif
%if %{with man_pages}
BuildRequires: %{_bindir}/xsltproc
BuildRequires: %{_bindir}/sed
BuildRequires: python3-docutils chrpath
%endif
%if %{?openEuler:1}0
%if %{with valgrind}
BuildRequires: valgrind-devel
%endif
%endif
%if %{with udev}
BuildRequires: pkgconfig(udev)
%endif
Patch1001: %{name}-make-dri-perms-okay.patch
Patch1002: %{name}-2.4.0-no-bc.patch
Patch1003: libdrm-2.4.109-sw.patch
%description
%{name} provides a user space library for accessing the DRM, direct rendering manager,
on operating systems that support the ioctl interface. libdrm is a low-level library,
typically used by graphics drivers such as the Mesa DRI drivers, the X drivers, libva
and similar projects.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: kernel-headers
%description devel
%{name}-devel contains the header files for developing
applications that want to make use of %{name}.
%if %{with install_test_programs}
%package -n drm-utils
Summary: Utilities programs for %{name}
Requires: %{name} = %{version}-%{release}
%description -n drm-utils
Utility programs for the kernel DRM interface.
%endif
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%meson \
%{bcond_meson intel} %{bcond_meson radeon} %{bcond_meson amdgpu} \
%{bcond_meson nouveau} %{bcond_meson vmwgfx} %{bcond_meson omap} %{bcond_meson exynos} \
%{bcond_meson freedreno} %{bcond_meson tegra} %{bcond_meson vc4} %{bcond_meson etnaviv} \
%{bcond_meson cairo_tests} %{bcond_meson man_pages} \
%if %{?openEuler:1}0
%{bcond_meson valgrind} \
%endif
%{bcond_meson_tf freedreno_kgsl} %{bcond_meson_tf install_test_programs} %{bcond_meson_tf udev} \
%{nil}
%meson_build
%check
%meson_test
%install
%meson_install
%if %{with install_test_programs}
install -Dpm0755 -t %{buildroot}%{_bindir} %{_vpath_builddir}/tests/drmdevice
%endif
%if %{with udev}
install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%endif
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/drmdevice
%files
%{_libdir}/%{name}.so.*
%dir %{_datadir}/%{name}/
%if %{with intel}
%{_libdir}/%{name}_intel.so.*
%endif
%if %{with radeon}
%{_libdir}/%{name}_radeon.so.*
%endif
%if %{with amdgpu}
%{_libdir}/%{name}_amdgpu.so.*
%{_datadir}/%{name}/amdgpu.ids
%endif
%if %{with nouveau}
%{_libdir}/%{name}_nouveau.so.*
%endif
%if %{with omap}
%{_libdir}/%{name}_omap.so.*
%endif
%if %{with exynos}
%{_libdir}/%{name}_exynos.so.*
%endif
%if %{with freedreno}
%{_libdir}/%{name}_freedreno.so.*
%endif
%if %{with tegra}
%{_libdir}/%{name}_tegra.so.*
%endif
%if %{with etnaviv}
%{_libdir}/%{name}_etnaviv.so.*
%endif
%if %{with udev}
%{_udevrulesdir}/91-drm-modeset.rules
%endif
%files devel
%{_includedir}/%{name}/drm*.h
%{_includedir}/%{name}/*_drm.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%if %{with intel}
%{_includedir}/%{name}/intel_*.h
%{_libdir}/%{name}_intel.so
%{_libdir}/pkgconfig/%{name}_intel.pc
%endif
%if %{with radeon}
%{_includedir}/%{name}/radeon_*.h
%{_includedir}/%{name}/r600_pci_ids.h
%{_libdir}/%{name}_radeon.so
%{_libdir}/pkgconfig/%{name}_radeon.pc
%endif
%if %{with amdgpu}
%{_includedir}/%{name}/amdgpu.h
%{_libdir}/%{name}_amdgpu.so
%{_libdir}/pkgconfig/%{name}_amdgpu.pc
%endif
%if %{with nouveau}
%{_includedir}/%{name}/nouveau/
%{_libdir}/%{name}_nouveau.so
%{_libdir}/pkgconfig/%{name}_nouveau.pc
%endif
%if %{with omap}
%{_includedir}/%{name}/omap_*.h
%{_includedir}/omap/
%{_libdir}/%{name}_omap.so
%{_libdir}/pkgconfig/%{name}_omap.pc
%endif
%if %{with exynos}
%{_includedir}/%{name}/exynos_*.h
%{_includedir}/exynos/
%{_libdir}/%{name}_exynos.so
%{_libdir}/pkgconfig/%{name}_exynos.pc
%endif
%if %{with freedreno}
%{_includedir}/freedreno/
%{_libdir}/%{name}_freedreno.so
%{_libdir}/pkgconfig/%{name}_freedreno.pc
%endif
%if %{with tegra}
%{_includedir}/%{name}/tegra.h
%{_libdir}/%{name}_tegra.so
%{_libdir}/pkgconfig/%{name}_tegra.pc
%endif
%if %{with vc4}
%{_includedir}/%{name}/vc4_*.h
%{_libdir}/pkgconfig/%{name}_vc4.pc
%endif
%if %{with etnaviv}
%{_includedir}/%{name}/etnaviv_*.h
%{_libdir}/%{name}_etnaviv.so
%{_libdir}/pkgconfig/%{name}_etnaviv.pc
%endif
%{_includedir}/*.h
%if %{with install_test_programs}
%files -n drm-utils
%defattr(-,root,root)
%{_bindir}/amdgpu_stress
%{_bindir}/drmdevice
%if %{with etnaviv}
%exclude %{_bindir}/etnaviv_*
%endif
%if %{with exynos}
%exclude %{_bindir}/exynos_*
%endif
%if %{with tegra}
%exclude %{_bindir}/tegra-*
%endif
%{_bindir}/modeprint
%{_bindir}/modetest
%{_bindir}/proptest
%{_bindir}/vbltest
%endif
%files help
%if %{with man_pages}
%{_mandir}/man3/drm*.3*
%{_mandir}/man7/drm*.7*
%endif
%changelog
* Thu Dec 05 2024 Funda Wang <fundawang@yeah.net> - 2.4.124-1
- update to version 2.4.124
* Fri Aug 30 2024 Funda Wang <fundawang@yeah.net> - 2.4.123-1
- update to version 2.4.123
* Fri Aug 16 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 2.4.122-1
- update to version 2.4.122
* Thu Jul 18 2024 yangchenguang <yangchenguang@kylinsec.com.cn> - 2.4.120-2
- Modify sw_64 patch use all arch
* Tue Mar 12 2024 liweigang <liweiganga@uniontech.com> - 2.4.120-1
- update to version 2.4.120
* Thu Dec 28 2023 Paul Thomas <paulthomas100199@gmail.com> - 2.4.119-1
- update to version 2.4.119
* Wed Nov 15 2023 lvgenggeng <lvgenggeng@uniontech.com> - 2.4.117-1
- update to 2.4.117
* Tue Jul 11 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 2.4.115-1
- update to 2.4.115
* Thu Dec 08 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 2.4.109-7
- remove rpath
* Fri Nov 18 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 2.4.109-6
- Optimize the patch for add sw architecture
* Fri Nov 18 2022 wuzx<wuzx1226@qq.com> - 2.4.109-5
- Add sw64 architecture
* Tue Oct 18 2022 Liu Zixian <liuzixian4@huawei.com> - 2.4.109-4
- remove unused BuildRequires
* Wed Mar 30 2022 liuyumeng <liuyumeng5@h-partners.com> - 2.4.109-3
- enable tests
* Tue Mar 1 2022 hanhui <hanhui15@h-partners.com> - 2.4.109-2
* customized valgrind
* Fri Dec 3 2021 xingxing <xingxing9@huawei.com> - 2.4.109-1
- update to 2.4.109
* Fri Jan 29 2021 zhanzhimin <zhanzhimin@huawei.com> - 2.4.103-1
- update to 2.4.103
* Mon Jul 27 2020 chengguipeng<chengguipeng1@huawei.com> - 2.4.102-1
- Type:bugfix
- Id:NA
- SUG:NA
- update to 2.4.102
* Wed Apr 15 2020 songnannan <songnannan2@huawei.com> - 2.4.100-1
- Type:bugfix
- Id:NA
- SUG:NA
- update to 2.4.100
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.95-2
- Package init
|