1 Star 0 Fork 3

dpd/libdrm

forked from OpenCloudOS Stream/libdrm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
libdrm.spec 8.75 KB
一键复制 编辑 原始数据 按行查看 历史
dpd 提交于 2024-06-07 10:06 . add support for loongarch64
%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}
# because Intel has released ARC discrete GPU
%bcond_without intel
# old ATI GPU
%bcond_without radeon
%bcond_without amdgpu
# opensource nvidia driver
%bcond_without nouveau
%bcond_without vmwgfx
%bcond_without install_test_programs
%bcond_without udev
%bcond_without man_pages
%bcond_with omap
%bcond_with cairo_tests
%bcond_with freedreno_kgsl
%ifarch 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
%ifarch x86_64 aarch64 ppc64le
%bcond_without valgrind
%else
%bcond_with valgrind
%endif
Summary: Userspace library for drm
Name: libdrm
Version: 2.4.115
Release: 3%{?dist}
License: MIT
URL: https://dri.freedesktop.org
Source0: %{url}/libdrm/%{name}-%{version}.tar.xz
Source2: 91-drm-modeset.rules
# hardcode the 666 instead of 660 for device nodes
Patch0001: libdrm-2.4.112-make-dri-perms-okay.patch
BuildRequires: meson >= 0.43, chrpath, gcc, libatomic_ops-devel, kernel-headers
%ifarch x86_64 aarch64 loongarch64
BuildRequires: libpciaccess-devel >= 0.10
%endif
%if %{with cairo_tests}
BuildRequires: pkgconfig(cairo)
%endif
%if %{with man_pages}
BuildRequires: python3-docutils
%endif
%if %{with valgrind}
BuildRequires: valgrind-devel
%endif
%if %{with udev}
BuildRequires: pkgconfig(udev)
%endif
%description
Libdrm is a userspace library for accessing the DRM, direct rendering manager,
on Linux, BSD and other operating systems that support the ioctl interface. It
is a low-level library, typically used by graphics drivers such as
the Mesa drivers, the X drivers, libva and similar projects.
The library provides wrapper functions for the ioctls to avoid exposing the
kernel interface directly, and for chipsets with drm memory manager, support
for tracking relocations and buffers.
%package devel
Summary: Direct Rendering Manager development package
Requires: %{name} = %{version}-%{release}
Requires: kernel-headers
%description devel
Libdrm is a userspace library for accessing the DRM, direct rendering manager,
on Linux, BSD and other operating systems that support the ioctl interface. It
is a low-level library, typically used by graphics drivers such as
the Mesa drivers, the X drivers, libva and similar projects.
The library provides wrapper functions for the ioctls to avoid exposing the
kernel interface directly, and for chipsets with drm memory manager, support
for tracking relocations and buffers.
This package provides the header files.
%if %{with install_test_programs}
%package -n drm-utils
Summary: Direct Rendering Manager utilities
Requires: %{name} = %{version}-%{release}
%description -n drm-utils
Libdrm is a userspace library for accessing the DRM, direct rendering manager,
on Linux, BSD and other operating systems that support the ioctl interface. It
is a low-level library, typically used by graphics drivers such as
the Mesa drivers, the X drivers, libva and similar projects.
The library provides wrapper functions for the ioctls to avoid exposing the
kernel interface directly, and for chipsets with drm memory manager, support
for tracking relocations and buffers.
This package provides the utility programs.
%endif
%prep
%autosetup -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} \
%{bcond_meson valgrind} \
%{bcond_meson_tf freedreno_kgsl} \
%{bcond_meson_tf install_test_programs} \
%{bcond_meson_tf udev} \
%{nil}
%meson_build
%install
%meson_install
%if %{with install_test_programs}
chrpath -d %{_vpath_builddir}/tests/drmdevice
install -Dpm0755 -t %{buildroot}%{_bindir} %{_vpath_builddir}/tests/drmdevice
%endif
%if %{with udev}
install -Dpm0644 -t %{buildroot}%{_udevrulesdir} %{S:2}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README.rst CONTRIBUTING.rst
%{_libdir}/libdrm.so.2
%{_libdir}/libdrm.so.2.4.0
%dir %{_datadir}/libdrm
%if %{with intel}
%{_libdir}/libdrm_intel.so.1
%{_libdir}/libdrm_intel.so.1.0.0
%endif
%if %{with radeon}
%{_libdir}/libdrm_radeon.so.1
%{_libdir}/libdrm_radeon.so.1.0.1
%endif
%if %{with amdgpu}
%{_libdir}/libdrm_amdgpu.so.1
%{_libdir}/libdrm_amdgpu.so.1.0.0
%{_datadir}/libdrm/amdgpu.ids
%endif
%if %{with nouveau}
%{_libdir}/libdrm_nouveau.so.2
%{_libdir}/libdrm_nouveau.so.2.0.0
%endif
%if %{with omap}
%{_libdir}/libdrm_omap.so.1
%{_libdir}/libdrm_omap.so.1.0.0
%endif
%if %{with exynos}
%{_libdir}/libdrm_exynos.so.1
%{_libdir}/libdrm_exynos.so.1.0.0
%endif
%if %{with freedreno}
%{_libdir}/libdrm_freedreno.so.1
%{_libdir}/libdrm_freedreno.so.1.0.0
%endif
%if %{with tegra}
%{_libdir}/libdrm_tegra.so.0
%{_libdir}/libdrm_tegra.so.0.0.0
%endif
%if %{with etnaviv}
%{_libdir}/libdrm_etnaviv.so.1
%{_libdir}/libdrm_etnaviv.so.1.0.0
%endif
%if %{with udev}
%{_udevrulesdir}/91-drm-modeset.rules
%endif
%files devel
%dir %{_includedir}/libdrm
%{_includedir}/libdrm/drm.h
%{_includedir}/libdrm/drm_fourcc.h
%{_includedir}/libdrm/drm_mode.h
%{_includedir}/libdrm/drm_sarea.h
%{_includedir}/libdrm/*_drm.h
%{_libdir}/libdrm.so
%{_libdir}/pkgconfig/libdrm.pc
%if %{with intel}
%{_includedir}/libdrm/intel_*.h
%{_libdir}/libdrm_intel.so
%{_libdir}/pkgconfig/libdrm_intel.pc
%endif
%if %{with radeon}
%{_includedir}/libdrm/radeon_{bo,cs,surface}*.h
%{_includedir}/libdrm/r600_pci_ids.h
%{_libdir}/libdrm_radeon.so
%{_libdir}/pkgconfig/libdrm_radeon.pc
%endif
%if %{with amdgpu}
%{_includedir}/libdrm/amdgpu.h
%{_libdir}/libdrm_amdgpu.so
%{_libdir}/pkgconfig/libdrm_amdgpu.pc
%endif
%if %{with nouveau}
%{_includedir}/libdrm/nouveau/
%{_libdir}/libdrm_nouveau.so
%{_libdir}/pkgconfig/libdrm_nouveau.pc
%endif
%if %{with omap}
%{_includedir}/libdrm/omap_*.h
%{_includedir}/omap/
%{_libdir}/libdrm_omap.so
%{_libdir}/pkgconfig/libdrm_omap.pc
%endif
%if %{with exynos}
%{_includedir}/libdrm/exynos_*.h
%{_includedir}/exynos/
%{_libdir}/libdrm_exynos.so
%{_libdir}/pkgconfig/libdrm_exynos.pc
%endif
%if %{with freedreno}
%{_includedir}/freedreno/
%{_libdir}/libdrm_freedreno.so
%{_libdir}/pkgconfig/libdrm_freedreno.pc
%endif
%if %{with tegra}
%{_includedir}/libdrm/tegra.h
%{_libdir}/libdrm_tegra.so
%{_libdir}/pkgconfig/libdrm_tegra.pc
%endif
%if %{with vc4}
%{_includedir}/libdrm/vc4_*.h
%{_libdir}/pkgconfig/libdrm_vc4.pc
%endif
%if %{with etnaviv}
%{_includedir}/libdrm/etnaviv_*.h
%{_libdir}/libdrm_etnaviv.so
%{_libdir}/pkgconfig/libdrm_etnaviv.pc
%endif
%{_includedir}/libsync.h
%{_includedir}/xf86drm.h
%{_includedir}/xf86drmMode.h
%if %{with man_pages}
%{_mandir}/man3/drm*.3*
%{_mandir}/man7/drm*.7*
%endif
%if %{with install_test_programs}
%files -n drm-utils
%if %{with amdgpu}
%{_bindir}/amdgpu_stress
%endif
%{_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
%changelog
* Fri Jun 7 2024 Pengda Dou <doupengda@loongson.cn> - 2.4.115-3
- [Type] other
- [DESC] add support for loongarch64
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.4.115-2
- Rebuilt for OpenCloudOS Stream 23.09
* Wed Jul 12 2023 Shuo Wang <abushwang@tencent.com> - 2.4.115-1
- update to 2.4.115
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.4.112-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 2.4.112-2
- Rebuilt for OpenCloudOS Stream 23
* Mon Nov 07 2022 Zhao Zhen <jeremiazhao@tencent.com> - 2.4.112-2
- fixd building on aarch64.
- making Intel driver enabled by default.
* Mon Jul 11 2022 cunshunxia <cunshunxia@tencent.com> - 2.4.112-1
- initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dpdwaj/libdrm.git
git@gitee.com:dpdwaj/libdrm.git
dpdwaj
libdrm
libdrm
master

搜索帮助