From 1ddb13fd4e28c0897266c2d680f05718c7ffe8a2 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 23 Mar 2017 12:35:42 -0400 Subject: [PATCH] Fix pkg-config detection on non-Intel --- ...itly-check-for-pkg-config-at-the-top.patch | 34 +++++++++++++++++++ libdrm.spec | 13 ++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0001-configure-Explicitly-check-for-pkg-config-at-the-top.patch diff --git a/0001-configure-Explicitly-check-for-pkg-config-at-the-top.patch b/0001-configure-Explicitly-check-for-pkg-config-at-the-top.patch new file mode 100644 index 0000000..427eaed --- /dev/null +++ b/0001-configure-Explicitly-check-for-pkg-config-at-the-top.patch @@ -0,0 +1,34 @@ +From b983b054d4f1a6be67105e90f0ae2064f91a762c Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Thu, 23 Mar 2017 12:07:03 -0400 +Subject: [PATCH] configure: Explicitly check for pkg-config at the top level + +If you don't, then the first place the m4 expands is: + + if test "x$INTEL" != "xno"; then + PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) + fi + +So on non-Intel architectures we never find it in the path, and all +subsequent PKG_CHECK_MODULESes fail. Boo autoconf. + +Signed-off-by: Adam Jackson +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 8e593324..2e50d3ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -28,6 +28,7 @@ AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_SRCDIR([Makefile.am]) + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_AUX_DIR([build-aux]) ++PKG_PROG_PKG_CONFIG + + # Require xorg-macros minimum of 1.12 for XORG_WITH_XSLTPROC + m4_ifndef([XORG_MACROS_VERSION], +-- +2.12.0 + diff --git a/libdrm.spec b/libdrm.spec index 912d022..1558742 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -7,7 +7,7 @@ Name: libdrm Summary: Direct Rendering Manager runtime library Version: 2.4.75 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT URL: https://dri.freedesktop.org @@ -27,6 +27,9 @@ BuildRequires: valgrind-devel %endif BuildRequires: xorg-x11-util-macros +# sodding autoconf +Patch0: 0001-configure-Explicitly-check-for-pkg-config-at-the-top.patch + # hardcode the 666 instead of 660 for device nodes Patch3: libdrm-make-dri-perms-okay.patch # remove backwards compat not needed on Fedora @@ -74,6 +77,11 @@ autoreconf -vfi --enable-install-test-programs \ --enable-udev +echo this is for right now +cat configure + +exit 1 + %make_build V=1 pushd tests %make_build `make check-programs` V=1 @@ -227,6 +235,9 @@ rm -f %{buildroot}%{_includedir}/%{name}/{r300_reg.h,via_3d_reg.h} %{_mandir}/man7/drm*.7* %changelog +* Thu Mar 23 2017 Adam Jackson - 2.4.75-3 +- Fix pkg-config detection on non-Intel + * Fri Feb 10 2017 Fedora Release Engineering - 2.4.75-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild