diff --git a/srcpkgs/libGL/patches/configure.ac.patch b/srcpkgs/libGL/patches/configure.ac.patch new file mode 100644 index 00000000000..68c55514737 --- /dev/null +++ b/srcpkgs/libGL/patches/configure.ac.patch @@ -0,0 +1,26 @@ +- remove libpthread stubs +- detect static_assert() correctly for musl + +--- configure.ac.orig 2016-11-01 14:39:59.000000000 +0100 ++++ configure.ac 2016-11-04 13:07:05.317813259 +0100 +@@ -828,7 +828,7 @@ + + dnl pthread-stubs is mandatory on targets where it exists + case "$host_os" in +-cygwin* ) ++cygwin* | linux* ) + pthread_stubs_possible="no" + ;; + * ) +@@ -1919,6 +1919,11 @@ + fi + AM_CONDITIONAL(HAVE_ST_NINE, test "x$enable_nine" = xyes) + ++AC_CHECK_DECL(static_assert, [], ++ [AC_DEFINE(static_assert(...), [/* */], [noop static_assert() replacement]), ++ AC_MSG_RESULT([no])], ++ [[#include ]]) ++ + dnl + dnl OpenCL configuration + dnl diff --git a/srcpkgs/libGL/patches/musl-endian.patch b/srcpkgs/libGL/patches/musl-endian.patch new file mode 100644 index 00000000000..c53196e0af6 --- /dev/null +++ b/srcpkgs/libGL/patches/musl-endian.patch @@ -0,0 +1,11 @@ +--- src/util/u_endian.h.orig 2016-11-04 12:16:00.480356454 +0100 ++++ src/util/u_endian.h 2016-11-04 12:16:11.984347944 +0100 +@@ -27,7 +27,7 @@ + #ifndef U_ENDIAN_H + #define U_ENDIAN_H + +-#if defined(__GLIBC__) || defined(ANDROID) ++#if defined(__linux__) || defined(ANDROID) + #include + + #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/srcpkgs/libGL/patches/remove-libpthread-stubs.patch b/srcpkgs/libGL/patches/remove-libpthread-stubs.patch deleted file mode 100644 index 642b915cc8b..00000000000 --- a/srcpkgs/libGL/patches/remove-libpthread-stubs.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git configure.ac configure.ac -index 54416b4..8a708d3 100644 ---- configure.ac -+++ configure.ac -@@ -824,7 +824,7 @@ test -z "$PTHREAD_LIBS" && PTHREAD_LIBS="-lpthread" - - dnl pthread-stubs is mandatory on targets where it exists - case "$host_os" in --cygwin* ) -+cygwin* | linux* ) - pthread_stubs_possible="no" - ;; - * ) diff --git a/srcpkgs/libGL/template b/srcpkgs/libGL/template index d061bbde4de..35adadeada7 100644 --- a/srcpkgs/libGL/template +++ b/srcpkgs/libGL/template @@ -1,7 +1,7 @@ # Template build file for 'libGL'. pkgname=libGL version=13.0.0 -revision=1 +revision=2 wrksrc="mesa-${version}" build_style=gnu-configure configure_args="--enable-shared-glapi --enable-gbm @@ -15,6 +15,9 @@ license="MIT, LGPL-2.1" distfiles="https://mesa.freedesktop.org/archive/${version}/mesa-${version}.tar.xz" checksum=94edb4ebff82066a68be79d9c2627f15995e1fe10f67ab3fc63deb842027d727 +# static_assert() +CFLAGS="-std=c11" + hostmakedepends=" automake libtool flex pkg-config llvm python-Mako libxml2-python wayland-devel" makedepends="