diff --git a/libdrm-drop-valgrind-dep.patch b/libdrm-drop-valgrind-dep.patch new file mode 100644 index 0000000..67c2761 --- /dev/null +++ b/libdrm-drop-valgrind-dep.patch @@ -0,0 +1,24 @@ +Index: pkgconfig/libdrm.pc +=================================================================== +--- pkgconfig.orig/libdrm.pc ++++ pkgconfig/libdrm.pc +@@ -5,7 +5,6 @@ libdir=${prefix}/lib64 + Name: libdrm + Description: Userspace interface to kernel DRM services + Version: 2.4.114 +-Requires.private: valgrind + Libs: -L${libdir} -ldrm + Libs.private: -lm + Cflags: -I${includedir} -I${includedir}/libdrm +Index: pkgconfig/libdrm_intel.pc +=================================================================== +--- pkgconfig.orig/libdrm_intel.pc ++++ pkgconfig/libdrm_intel.pc +@@ -6,6 +6,6 @@ Name: libdrm_intel + Description: Userspace interface to intel kernel DRM services + Version: 2.4.114 + Requires: libdrm +-Requires.private: pciaccess >= 0.10, valgrind ++Requires.private: pciaccess >= 0.10 + Libs: -L${libdir} -ldrm_intel + Cflags: -I${includedir} -I${includedir}/libdrm diff --git a/libdrm.changes b/libdrm.changes index be98bd6..3fdcb4a 100644 --- a/libdrm.changes +++ b/libdrm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Nov 22 08:26:28 UTC 2022 - Dominique Leuenberger + +- Add libdrm-drop-valgrind-dep.patch (as source): drop dependency + on valgrind on generated pkgconfig files. The .pc files are + auto-generated by meson and are 'technically' correct, but we do + not want to inject valgrind here (we can get away with this hack + as it's only relevant when using pkg-config --static, and we + do not provide static libs anyway). + ------------------------------------------------------------------- Thu Nov 3 15:11:15 UTC 2022 - Stefan Dirsch diff --git a/libdrm.spec b/libdrm.spec index d389285..ebd7f41 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -34,6 +34,7 @@ URL: https://dri.freedesktop.org/ # Source URL: https://dri.freedesktop.org/libdrm/ Source: https://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.xz Source2: baselibs.conf +Source3: libdrm-drop-valgrind-dep.patch BuildRequires: fdupes BuildRequires: meson >= 0.43 BuildRequires: pkgconfig @@ -256,6 +257,10 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %install %meson_install +# patch the generated pkgconfig files to not have a dependency on valgrind +# intentionally using a patch file to catch if we need to adjust +(cd %{buildroot}%{_libdir}/pkgconfig +patch -p1 < %{SOURCE3}) %fdupes %{buildroot}/%{_prefix} %post -n libdrm2 -p /sbin/ldconfig