Updated то 2.4.83

This commit is contained in:
VictorR2007 2017-09-25 13:22:37 +03:00
parent bd596ed0ec
commit e6f30c6083
6 changed files with 285 additions and 75 deletions

View file

@ -1,12 +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
diff -rupN libdrm-2.4.63.old/xf86drm.h libdrm-2.4.63/xf86drm.h
--- libdrm-2.4.63.old/xf86drm.h 2015-08-14 00:27:03.000000000 +0200
+++ libdrm-2.4.63/xf86drm.h 2015-08-17 18:08:29.512407916 +0200
@@ -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)
+#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#ifdef __OpenBSD__
#define DRM_DIR_NAME "/dev"

View file

@ -1,7 +1,7 @@
diff -Naur libdrm-2.4.70-orig/xf86drm.c libdrm-2.4.70/xf86drm.c
--- libdrm-2.4.70-orig/xf86drm.c 2016-07-21 02:42:21.000000000 +0300
+++ libdrm-2.4.70/xf86drm.c 2016-09-19 12:33:25.987660245 +0300
@@ -484,11 +484,6 @@
diff -rupN libdrm-2.4.70.old/xf86drm.c libdrm-2.4.70/xf86drm.c
--- libdrm-2.4.70.old/xf86drm.c 2016-07-21 01:42:21.000000000 +0200
+++ libdrm-2.4.70/xf86drm.c 2016-07-25 14:46:13.224165554 +0200
@@ -484,11 +484,6 @@ int drmAvailable(void)
int fd;
if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
@ -13,7 +13,7 @@ diff -Naur libdrm-2.4.70-orig/xf86drm.c libdrm-2.4.70/xf86drm.c
return 0;
}
@@ -661,37 +656,6 @@
@@ -661,38 +656,6 @@ static int drmOpenByName(const char *nam
}
}
@ -48,6 +48,7 @@ diff -Naur libdrm-2.4.70-orig/xf86drm.c libdrm-2.4.70/xf86drm.c
- }
- }
-#endif
-
return -1;
}

View file

@ -1 +1 @@
KERNEL=="controlD[0-9]*", SUBSYSTEM=="drm", MODE="0600"
KERNEL=="controlD[0-9]*", NAME="dri/%k", MODE="0666"

View file

@ -0,0 +1,10 @@
diff -rupN libdrm-2.4.75.old/tests/Makefile.am libdrm-2.4.75/tests/Makefile.am
--- libdrm-2.4.75.old/tests/Makefile.am 2016-12-13 03:45:20.000000000 +0100
+++ libdrm-2.4.75/tests/Makefile.am 2017-02-03 11:22:01.425214620 +0100
@@ -45,3 +45,6 @@ TESTS = \
check_PROGRAMS = \
$(TESTS) \
drmdevice
+
+check-programs:
+ @echo $(check_PROGRAMS)

8
libdrm.rpmlintrc Normal file
View file

@ -0,0 +1,8 @@
# There is no manual page for test programs
addFilter("W: no-manual-page-for-binary")
# We use %%apply_patches macro
addFilter("W: patch-not-applied")
# Sorry the rules for udev don't end by ".conf"
addFilter("W: non-conffile-in-etc")

View file

@ -1,45 +1,98 @@
%define major 2
%define libname %mklibname drm %{major}
%define devname %mklibname drm -d
%define major 2
%define libname %mklibname drm %{major}
%define develname %mklibname drm -d
%define kms_major 1
%define libkms %mklibname kms %{kms_major}
%define intel_major 1
%define libintel %mklibname drm_intel %{intel_major}
%define nouveau_major 2
%define libnouveau %mklibname drm_nouveau %{nouveau_major}
%define radeon_major 1
%define libradeon %mklibname drm_radeon %{radeon_major}
%define amdgpu_major 1
%define libamdgpu %mklibname drm_amdgpu %{amdgpu_major}
%define kms_major 1
%define libkms %mklibname kms %{kms_major}
%ifarch %{ix86} x86_64
%define intel_major 1
%define libintel %mklibname drm_intel %{intel_major}
%endif
%define nouveau_major 2
%define libnouveau %mklibname drm_nouveau %{nouveau_major}
%define radeon_major 1
%define libradeon %mklibname drm_radeon %{radeon_major}
%define amdgpu_major 1
%define libamdgpu %mklibname drm_amdgpu %{amdgpu_major}
%define omap_major 1
%define libomap %mklibname drm_omap %{omap_major}
%define exynos_major 1
%define libexynos %mklibname drm_exynos %{exynos_major}
%define freedreno_major 1
%define libfreedreno %mklibname drm_freedreno %{freedreno_major}
%define tegra_major 0
%define libtegra %mklibname drm_tegra %{tegra_major}
# Workaround freedreno issue with clock_gettime
#define _disable_ld_no_undefined 1
# Build options
%define with_manpages 1
%define with_tests 1
%define with_cairo_tests 1
# It builds only on arm
%define with_freedreno 0
%define with_tegra 1
Summary: Userspace interface to kernel DRM services
Name: libdrm
Version: 2.4.80
Version: 2.4.83
Release: 1
License: MIT/X11
Group: System/Libraries
Url: http://xorg.freedesktop.org
Source0: http://dri.freedesktop.org/libdrm/libdrm-%{version}.tar.bz2
License: MIT/X11
URL: http://xorg.freedesktop.org
Source0: http://dri.freedesktop.org/%{name}/%{name}-%{version}.tar.bz2
Source1: 91-drm-modeset.rules
# From Fedora:
Patch0100: libdrm-2.4.64-make-dri-perms-okay.patch
Patch0101: libdrm-2.4.70-no-bc.patch
BuildRequires: docbook-style-xsl
BuildRequires: kernel-headers
BuildRequires: libpthread-stubs
BuildRequires: x11-util-macros
Source2: %{name}.rpmlintrc
# Revert nouveau api so mesa 7.10.1 can build:
# Patch0050: 0050-revert-nouveau-split-pushbuf-macros.patch
# Backports from git:
# (from mageia) Revert nouveau merge to allow mesa build.
#Patch0900: 0900-Revert-nouveau-silence-some-remaining-valgrind-warni.patch
#Patch0901: 0901-Revert-nouveau-fix-channel-closing.patch
#Patch0902: 0902-Revert-nouveau-expose-notifier-handle-on-nvc0-as-wel.patch
#Patch0903: 0903-Revert-nouveau-remove-unnecessary-EAGAIN-loops.patch
#Patch0904: 0904-Revert-nouveau-init-nvc0-channel-alloc-req-structure.patch
Patch0100: 0100-RH-libdrm-make-dri-perms-okay-v1.2.patch
# Do not try proc for backward Linux compatibility:
Patch0101: 0101-RH-libdrm-2.4.70-no-bc-v1.4.patch
#Patch0500: 0500-improve-waiting-for-dri-device-to-appear-when-system.patch
# MIPS-specific - No more useful
#Patch1005: libdrm_mips_drm_cas.patch
#Patch1006: libdrm_mips_sarea_max.patch
# Make rule to print the list of test programs
Patch0102: libdrm-2.4.75-check-programs.patch
BuildRequires: kernel-headers > 1:3.2.0
BuildRequires: pkgconfig(pthread-stubs)
BuildRequires: pkgconfig(xorg-macros) >= 1.19.1
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(pciaccess) >= 0.13.2
%if %{with_manpages}
# To build man7 pages
BuildRequires: xsltproc
BuildRequires: pkgconfig(atomic_ops)
BuildRequires: pkgconfig(pciaccess)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(xcb)
BuildRequires: docbook-style-xsl
%endif
%if %{with_cairo_tests}
BuildRequires: pkgconfig(cairo)
%endif
Conflicts: kernel-headers <= 1:3.2.0
%description
Userspace interface to kernel DRM services.
Userspace interface to kernel DRM services
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package common
Summary: Common files for the userspace interface to kernel DRM services
@ -49,87 +102,161 @@ Group: System/Libraries
Common files for the userspace interface to kernel DRM services
%files common
%doc README
%{_sysconfdir}/udev/rules.d/91-drm-modeset.rules
%{_datadir}/libdrm/amdgpu.ids
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{libname}
%package -n %{libname}
Summary: Userspace interface to kernel DRM services
Group: System/Libraries
Provides: %{name} = %{EVRD}
Requires: %{name}-common
Requires: %{name}-common = %{EVRD}
%description -n %{libname}
Userspace interface to kernel DRM services.
%description -n %{libname}
Userspace interface to kernel DRM services
%files -n %{libname}
%doc README
%{_libdir}/libdrm.so.%{major}*
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{libkms}
Summary: Shared library for KMS
Group: System/Libraries
Summary: Shared library for KMS
Group: System/Libraries
%description -n %{libkms}
Shared library for kernel mode setting.
%files -n %{libkms}
%doc README
%{_libdir}/libkms.so.%{kms_major}*
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%ifarch %{ix86} x86_64
%package -n %{libintel}
%package -n %{libintel}
Summary: Shared library for Intel kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.40
%description -n %{libintel}
Shared library for Intel kernel Direct Rendering Manager services.
%files -n %{libintel}
%doc README
%{_libdir}/libdrm_intel.so.%{intel_major}*
%endif
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{libnouveau}
%package -n %{libnouveau}
Summary: Shared library for Nouveau kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.35
%description -n %{libnouveau}
Shared library for Nouveau kernel Direct Rendering Manager services.
%files -n %{libnouveau}
%doc README
%{_libdir}/libdrm_nouveau.so.%{nouveau_major}*
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{libradeon}
%package -n %{libradeon}
Summary: Shared library for Radeon kernel DRM services
Group: System/Libraries
# Radeonsi needs at least 2.4.42
Conflicts: %{_lib}drm2 < 2.4.53
%description -n %{libradeon}
Shared library for Radeon kernel Direct Rendering Manager services.
%files -n %{libradeon}
%doc README
%{_libdir}/libdrm_radeon.so.%{radeon_major}*
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{libamdgpu}
Summary: Shared library for AMDGPU kernel DRM services
%package -n %{libamdgpu}
Summary: Shared library for Amdgpu kernel DRM services
Group: System/Libraries
# Amdgpu needs at least 2.4.61
Conflicts: %{_lib}drm2 < 2.4.61
%description -n %{libamdgpu}
Shared library for AMDGPU kernel Direct Rendering Manager services.
Shared library for Amdgpu kernel Direct Rendering Manager services.
%files -n %{libamdgpu}
%doc README
%{_libdir}/libdrm_amdgpu.so.%{amdgpu_major}*
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package -n %{devname}
%package -n %{libomap}
Summary: Shared library for OMAP kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.40
%description -n %{libomap}
Shared library for Omap kernel Direct Rendering Manager services.
%files -n %{libomap}
%doc README
%{_libdir}/libdrm_omap.so.%{omap_major}*
#-----------------------------------------------------------------------------
%package -n %{libexynos}
Summary: Shared library for Exynos kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.33
%description -n %{libexynos}
Shared library for Exynos kernel Direct Rendering Manager services.
%files -n %{libexynos}
%doc README
%{_libdir}/libdrm_exynos.so.%{exynos_major}*
#-----------------------------------------------------------------------------
%if %{with_freedreno}
%package -n %{libfreedreno}
Summary: Shared library for Freedreno kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.43
%description -n %{libfreedreno}
Shared library for Freedreno kernel Direct Rendering Manager services.
%files -n %{libfreedreno}
%doc README
%{_libdir}/libdrm_freedreno.so.%{freedreno_major}*
%endif
#-----------------------------------------------------------------------------
%if %{with_tegra}
%package -n %{libtegra}
Summary: Shared library for Tegra kernel DRM services
Group: System/Libraries
Conflicts: %{_lib}drm2 < 2.4.59
%description -n %{libtegra}
Shared library for Tegra kernel Direct Rendering Manager services.
%files -n %{libtegra}
%doc README
%{_libdir}/libdrm_tegra.so.%{tegra_major}*
%endif
#-----------------------------------------------------------------------------
%package -n %{develname}
Summary: Development files for %{name}
Group: Development/X11
Requires: %{libname} = %{EVRD}
@ -140,46 +267,110 @@ Requires: %{libintel} = %{EVRD}
Requires: %{libnouveau} = %{EVRD}
Requires: %{libradeon} = %{EVRD}
Requires: %{libamdgpu} = %{EVRD}
Requires: %{libomap} = %{EVRD}
Requires: %{libexynos} = %{EVRD}
%if %{with_freedreno}
Requires: %{libfreedreno} = %{EVRD}
%endif
%if %{with_tegra}
Requires: %{libtegra} = %{EVRD}
%endif
Provides: %{name}-devel = %{EVRD}
%rename %{_lib}drm2-devel
%rename %{_lib}drm-static-devel
%rename drm-nouveau-devel
%description -n %{devname}
Development files for %{name}.
%description -n %{develname}
Development files for %{name}
%files -n %{devname}
%files -n %{develname}
%doc README
%{_includedir}/libdrm
%{_includedir}/libkms
%{_includedir}/omap
%{_includedir}/exynos
#if %%{with_tegra}
#{_includedir}/tegra
#endif
%{_includedir}/*.h
%{_libdir}/libdrm*.so
%{_libdir}/libkms.so
%{_libdir}/pkgconfig/libdrm*.pc
%{_libdir}/pkgconfig/libkms*.pc
%{_libdir}/pkgconfig/libkms.pc
%if %{with_manpages}
%{_mandir}/man3/*
%{_mandir}/man7/*
%endif
#----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%package utils
Summary: Test programs for %{name}
Group: Video
Requires: %{name} = %{EVRD}
Requires: %{libkms} = %{EVRD}
Conflicts: %{name} < 2.4.42
%description utils
This package contains some little test programs for %{name}.
%files utils
%doc README
%{_bindir}/*
#-----------------------------------------------------------------------------
%prep
%setup -q
%apply_patches
%build
# Needed for patch4
# Needed for P102
autoreconf -fv --install
%configure2_5x \
--enable-udev \
%build
%configure2_5x --enable-udev \
%ifnarch %{ix86} x86_64
--disable-intel \
--disable-intel \
%endif
--disable-valgrind
--enable-omap-experimental-api \
--enable-exynos-experimental-api \
%if %{with_freedreno}
--enable-freedreno \
--enable-freedreno-kgsl \
%else
--disable-freedreno \
--disable-freedreno-kgsl \
%endif
%if %{with_tegra}
--enable-tegra-experimental-api \
%else
--disable-tegra-experimental-api \
%endif
%if %{with_cairo_tests}
--enable-cairo-tests \
%endif
--enable-install-test-programs
%make
%install
%makeinstall_std
%install
%makeinstall_std
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/udev/rules.d/
#find %%{buildroot} -type f -name '*.la' -exec rm -f {} \;
# (cg) Note that RH remove drm.h drm_mode.h drm_sarea.h r300_reg.h via_3d_reg.h
# and we should perhaps do the same? (previous attempts have not gone well :)
%check
cd tests
make check-TESTS
cd ..
%changelog