From fa0db7481b571eb994450779f76a54850f985ad2 Mon Sep 17 00:00:00 2001 From: Cody Schafer Date: Mon, 30 Oct 2017 22:22:20 -0400 Subject: [PATCH] backport fix for missing _GNU_SOURCE to fix DRI_PRIME --- ...dd-missing-include-of-config.h-to-define-.patch | 32 ++++++++++++++++++++++ trunk/PKGBUILD | 13 +++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 trunk/0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch diff --git a/trunk/0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch b/trunk/0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch new file mode 100644 index 0000000..d2ce09a --- /dev/null +++ b/trunk/0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch @@ -0,0 +1,32 @@ +From 1cda354bdfd0c9ca107293b84b52f4464fdbedcc Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Tue, 1 Sep 2015 10:45:11 +0200 +Subject: [PATCH] mesa_dri2: Add missing include of config.h to define + _GNU_SOURCE + +Fix build with -Wimplicit-function-declaration while secure_getenv() is +guarded by __USE_GNU. + +Reviewed-by: Aaron Plattner +Tested-by: Stefan Dirsch +--- + src/mesa_dri2.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/mesa_dri2.c b/src/mesa_dri2.c +index 51e8794..420ccee 100644 +--- a/src/mesa_dri2.c ++++ b/src/mesa_dri2.c +@@ -33,6 +33,9 @@ + * and José Hiram Soltren (jsoltren@nvidia.com) + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif + + #define NEED_REPLIES + #include +-- +2.14.2 + diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index e1cb7f9..44a787a 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -9,12 +9,21 @@ arch=(i686 x86_64) url='http://cgit.freedesktop.org/~aplattner/libvdpau' depends=('gcc-libs' 'libxext') license=('custom') -source=(http://people.freedesktop.org/~aplattner/vdpau/${pkgname}-${pkgver}.tar.bz2{,.sig}) +source=( + http://people.freedesktop.org/~aplattner/vdpau/${pkgname}-${pkgver}.tar.bz2{,.sig} + 0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch +) makedepends=('dri2proto') sha256sums=('857a01932609225b9a3a5bf222b85e39b55c08787d0ad427dbd9ec033d58d736' - 'SKIP') + 'SKIP' + '3e0b8498ddd5c5d2918908de323ca87cdb6386e37ee32a22f57d066afa1e6b35') validpgpkeys=('BD68A042C603DDAD9AA354B0F56ACC8F09BA9635') # Aaron Plattner +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 <../0001-mesa_dri2-Add-missing-include-of-config.h-to-define-.patch +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr --sysconfdir=/etc -- 2.14.2