void-packages/srcpkgs/xf86-video-mach64/patches/0002-configure-Include-xorg-server.h-before-exa.h.patch
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

38 lines
1.2 KiB
Diff

From ca72e41e15fb9b59b367cba2baca0d5467dcc8c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 5 Jul 2019 11:01:56 +0200
Subject: [PATCH xf86-video-mach64 2/4] configure: Include xorg-server.h before
exa.h
Fixes EXA detection spuriously failing with current xserver.
---
configure.ac | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git configure.ac configure.ac
index d3933b2..b8b722b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,7 +169,8 @@ if test "x$EXA" = xyes; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
AC_CHECK_HEADER(exa.h,
- [have_exa_h="yes"], [have_exa_h="no"])
+ [have_exa_h="yes"], [have_exa_h="no"],
+ [#include <xorg-server.h>])
CPPFLAGS="$SAVE_CPPFLAGS"
else
AC_MSG_RESULT(no)
@@ -180,7 +181,8 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
if test "x$have_exa_h" = xyes; then
AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
-#include "exa.h"
+#include <xorg-server.h>
+#include <exa.h>
#if EXA_VERSION_MAJOR < 2
#error OLD EXA!
#endif
--
2.25.0