Package init
This commit is contained in:
commit
38dd099779
1
91-drm-modeset.rules
Normal file
1
91-drm-modeset.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
KERNEL=="controlD[0-9]*", SUBSYSTEM=="drm", MODE="0600"
|
||||||
54
libdrm-2.4.0-no-bc.patch
Normal file
54
libdrm-2.4.0-no-bc.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
diff -uNr libdrm-2.4.69.orig/xf86drm.c libdrm-2.4.69/xf86drm.c
|
||||||
|
--- libdrm-2.4.69.orig/xf86drm.c 2016-07-20 20:42:39.000000000 +0200
|
||||||
|
+++ libdrm-2.4.69/xf86drm.c 2016-07-21 08:00:10.411599806 +0200
|
||||||
|
@@ -484,11 +484,6 @@
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* Try proc for backward Linux compatibility */
|
||||||
|
- if (!access("/proc/dri/0", R_OK))
|
||||||
|
- return 1;
|
||||||
|
-#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -661,38 +656,6 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __linux__
|
||||||
|
- /* Backward-compatibility /proc support */
|
||||||
|
- for (i = 0; i < 8; i++) {
|
||||||
|
- char proc_name[64], buf[512];
|
||||||
|
- char *driver, *pt, *devstring;
|
||||||
|
- int retcode;
|
||||||
|
-
|
||||||
|
- sprintf(proc_name, "/proc/dri/%d/name", i);
|
||||||
|
- if ((fd = open(proc_name, 0, 0)) >= 0) {
|
||||||
|
- retcode = read(fd, buf, sizeof(buf)-1);
|
||||||
|
- close(fd);
|
||||||
|
- if (retcode) {
|
||||||
|
- buf[retcode-1] = '\0';
|
||||||
|
- for (driver = pt = buf; *pt && *pt != ' '; ++pt)
|
||||||
|
- ;
|
||||||
|
- if (*pt) { /* Device is next */
|
||||||
|
- *pt = '\0';
|
||||||
|
- if (!strcmp(driver, name)) { /* Match */
|
||||||
|
- for (devstring = ++pt; *pt && *pt != ' '; ++pt)
|
||||||
|
- ;
|
||||||
|
- if (*pt) { /* Found busid */
|
||||||
|
- return drmOpenByBusid(++pt, type);
|
||||||
|
- } else { /* No busid */
|
||||||
|
- return drmOpenDevice(strtol(devstring, NULL, 0),i, type);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
BIN
libdrm-2.4.95.tar.bz2
Normal file
BIN
libdrm-2.4.95.tar.bz2
Normal file
Binary file not shown.
12
libdrm-make-dri-perms-okay.patch
Normal file
12
libdrm-make-dri-perms-okay.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up libdrm-2.4.64/xf86drm.h.forceperms libdrm-2.4.64/xf86drm.h
|
||||||
|
--- libdrm-2.4.64/xf86drm.h.forceperms 2015-08-25 07:25:09.946427122 +1000
|
||||||
|
+++ libdrm-2.4.64/xf86drm.h 2015-08-25 07:28:57.435553839 +1000
|
||||||
|
@@ -74,7 +74,7 @@ extern "C" {
|
||||||
|
/* Default /dev/dri directory permissions 0755 */
|
||||||
|
#define DRM_DEV_DIRMODE \
|
||||||
|
(S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
|
||||||
|
-#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
|
||||||
|
+#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
#define DRM_DIR_NAME "/dev"
|
||||||
262
libdrm.spec
Normal file
262
libdrm.spec
Normal file
@ -0,0 +1,262 @@
|
|||||||
|
%define bcond_meson() %{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}
|
||||||
|
|
||||||
|
%bcond_without libkms
|
||||||
|
%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.95
|
||||||
|
Release: 2
|
||||||
|
License: MIT
|
||||||
|
Summary: library for direct rendering manager
|
||||||
|
|
||||||
|
URL: https://dri.freedesktop.org
|
||||||
|
Source0: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2
|
||||||
|
Source2: 91-drm-modeset.rules
|
||||||
|
|
||||||
|
BuildRequires: meson gcc libatomic_ops-devel 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: docbook-style-xsl
|
||||||
|
%endif
|
||||||
|
%if %{with valgrind}
|
||||||
|
BuildRequires: valgrind-devel
|
||||||
|
%endif
|
||||||
|
%if %{with udev}
|
||||||
|
BuildRequires: pkgconfig(udev)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Patch1001: %{name}-make-dri-perms-okay.patch
|
||||||
|
Patch1002: %{name}-2.4.0-no-bc.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 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%meson \
|
||||||
|
%{bcond_meson libkms} %{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 freedreno_kgsl} %{bcond_meson install_test_programs} %{bcond_meson udev} \
|
||||||
|
%{nil}
|
||||||
|
%meson_build
|
||||||
|
|
||||||
|
%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
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/%{name}.so.*
|
||||||
|
%dir %{_datadir}/%{name}/
|
||||||
|
%if %{with libkms}
|
||||||
|
%{_libdir}/libkms.so.*
|
||||||
|
%endif
|
||||||
|
%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
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_includedir}/%{name}/drm*.h
|
||||||
|
%{_includedir}/%{name}/*_drm.h
|
||||||
|
%{_libdir}/%{name}.so
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
%if %{with libkms}
|
||||||
|
%{_includedir}/libkms/
|
||||||
|
%{_libdir}/libkms.so
|
||||||
|
%{_libdir}/pkgconfig/libkms.pc
|
||||||
|
%endif
|
||||||
|
%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}/drmdevice
|
||||||
|
%exclude %{_bindir}/etnaviv_*
|
||||||
|
%exclude %{_bindir}/exynos_*
|
||||||
|
%{_bindir}/kms-steal-crtc
|
||||||
|
%{_bindir}/kms-universal-planes
|
||||||
|
%if %{with libkms}
|
||||||
|
%{_bindir}/kmstest
|
||||||
|
%endif
|
||||||
|
%{_bindir}/modeprint
|
||||||
|
%{_bindir}/modetest
|
||||||
|
%{_bindir}/proptest
|
||||||
|
%{_bindir}/vbltest
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc README
|
||||||
|
%if %{with man_pages}
|
||||||
|
%{_mandir}/man3/drm*.3*
|
||||||
|
%{_mandir}/man7/drm*.7*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.4.95-2
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user