diff options
author | 2009-12-11 10:32:52 +0000 | |
---|---|---|
committer | 2009-12-11 10:32:52 +0000 | |
commit | 40617727ba4fe8c69946e24ed5ad60f00eef00b8 (patch) | |
tree | cf8937717411a26fb131ef74a967899669494660 /x11-libs | |
parent | Fixed webkit USE flag logic, bug 296424, thank Nikoli for report. Updated lan... (diff) | |
download | historical-40617727ba4fe8c69946e24ed5ad60f00eef00b8.tar.gz historical-40617727ba4fe8c69946e24ed5ad60f00eef00b8.tar.bz2 historical-40617727ba4fe8c69946e24ed5ad60f00eef00b8.zip |
x11-libs/libdrm: fix build on !intel arches wrt atomic ops (see bug #296482)
Package-Manager: portage-2.2_rc58/cvs/Linux i686
Diffstat (limited to 'x11-libs')
6 files changed, 185 insertions, 5 deletions
diff --git a/x11-libs/libdrm/ChangeLog b/x11-libs/libdrm/ChangeLog index a6e63e7b1c60..51ff02be238c 100644 --- a/x11-libs/libdrm/ChangeLog +++ b/x11-libs/libdrm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for x11-libs/libdrm # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/libdrm/ChangeLog,v 1.92 2009/12/11 09:50:22 remi Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/libdrm/ChangeLog,v 1.93 2009/12/11 10:32:52 remi Exp $ + + 11 Dec 2009; Rémi Cardona <remi@gentoo.org> + +files/2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch, + libdrm-2.4.15.ebuild, + +files/2.4.15-0002-configure-Typo-in-error-message.patch, + +files/2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch: + fix build on !intel arches wrt atomic ops (see bug #296482) 11 Dec 2009; Rémi Cardona <remi@gentoo.org> -libdrm-2.4.11.ebuild, -libdrm-2.4.12.ebuild, -libdrm-2.4.14.ebuild: diff --git a/x11-libs/libdrm/Manifest b/x11-libs/libdrm/Manifest index 0370f7e18798..2f0b74ef78df 100644 --- a/x11-libs/libdrm/Manifest +++ b/x11-libs/libdrm/Manifest @@ -1,3 +1,6 @@ +AUX 2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch 2255 RMD160 ac0534ce5dffb7b60d1fdd115fea09b3217fee0e SHA1 38b37d6b77bca429bed3de54be8213dc4f02616e SHA256 dc8a064518fac48f69732074298d1cde7ff2fcbd2edb3de028ae772dc65818fd +AUX 2.4.15-0002-configure-Typo-in-error-message.patch 1098 RMD160 a732fb1a2d51c921e2b6cfdd5ef090940c127076 SHA1 9f5a3bee36b5fd445f8be2edb5ac0a712852bca1 SHA256 e3e0b847e2b4fe4703573e5fd3b5d78d8d409670d023d5a164e9916688d9838b +AUX 2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch 2773 RMD160 3855124cf786e2c5d8b59450988d1de89a74439f SHA1 347c46a966eb12d642b976dbf57e55553cd76285 SHA256 42b004be6d5ca582119daf2df57a334f53ea01678460941dbd441d73eec36355 AUX 2.4.9-0001-nouveau-store-bo-handle-in-public-struct-in-bo_ref_.patch 711 RMD160 6942f00eb8e45868fdcb1f52f2583cacf3806a0d SHA1 1c889f475e7e1ee6a03dabdf66088b787c0a0ceb SHA256 adb1d9052789290078315e14e7cd3e4a202f649bf8ad37181bc67caf38520849 AUX 2.4.9-0002-nouveau-write-posting-got-lost-somewhere-bring-it.patch 708 RMD160 795b4dbf84914bbc13c5db086769d0b500385441 SHA1 187780606e0100c8d2de251af4af8cb773955180 SHA256 cfc0325d305c5d534a0c564d90f63f2ff27a45968203453defd531d38d853c3e AUX 2.4.9-0003-libdrm-mode-align-subpixel-results.patch 901 RMD160 1a66e30396a1c6a04d8e398dabe7f42c975e8327 SHA1 12eb648b7f41de9e5ce4f2a3dcec32d1d93e07a6 SHA256 567f496c402ee78ad99d4a95e2ee297208ea4593d1be2040eaf368edc6a2d7ba @@ -11,8 +14,8 @@ DIST libdrm-2.4.9.tar.gz 523793 RMD160 2d988da67c343dc480a46ea4370dbe0067c47212 EBUILD libdrm-2.3.0.ebuild 1152 RMD160 d1f1a92e4ac176a50515dd857230f437c7d7e9b2 SHA1 f1ebd83178480469441fe405821a910177da90e3 SHA256 4a765c2a6de992b21718bcb183be1cfabd72d3f5f54b8a6f336094ebf1f02e1d EBUILD libdrm-2.3.1.ebuild 1162 RMD160 c4462641ad27a4dc22e466c7c25d5d8d8520b93d SHA1 2cd1e453f3912bc93a7bc2086c8ca75055db0147 SHA256 506a5ed5303babd4a91b66fa312f2ad6b309bc3cba9a1ce74f1d238ad7beeea3 EBUILD libdrm-2.4.13.ebuild 1065 RMD160 3ed597bff4c8c865f4f879a05c842b5c0dfcd951 SHA1 fe6a8f1bb4a8e7ff88a7e58c2c9590d7aca2224a SHA256 cba38f4c55e8782769e13bbe19cb6589b0ef522ccae9fbf33458766555335eda -EBUILD libdrm-2.4.15.ebuild 1060 RMD160 f0248d36c40c130e72a1a4596a549a087c2a93cf SHA1 2a1f763b40c314ce80ee926c00f33838ddd44303 SHA256 babb97f44befb0bce020058eca82e917b564e0df41dc6808f009535d5926694d +EBUILD libdrm-2.4.15.ebuild 1291 RMD160 326c7fc97ac71591de47f6c9b6f14b8bb9a6a6e3 SHA1 91b7d47cec4b6550809e938f6ef0b1e4646be093 SHA256 61d6145cf0338cb7a8efebbc209414ff556548c697521843f70b001de372d55f EBUILD libdrm-2.4.5.ebuild 920 RMD160 6d1901bf7dafbabad63f0491a25bbb9eaed4b0bc SHA1 9e2c82cf78b7133e8f6ddb08a3129515ef0a0d67 SHA256 4507280973a34e3ae6af8bc2f3bd6c2b8e6c80b1e48833b2b48a1b624b4855c1 EBUILD libdrm-2.4.9.ebuild 1259 RMD160 70226a0b568e48ffa7ac75cf3e094407cfbdae37 SHA1 468788f080a5e082201d31474699e9ba6e2a5fa5 SHA256 f22dc2bc83a725d222716cd0c940de0139388e93ee83c81323e74b8fd9a4208d -MISC ChangeLog 12207 RMD160 cecaa35e6df0c486086aefd90c597230c9e3adf1 SHA1 062e8548142f337b51d22aa987c1be5c7de20774 SHA256 1acc8345104e6e2f588eb51d4dc35e1ac232b923e58a2f8d2fee3793f3391aed +MISC ChangeLog 12549 RMD160 2866472da7d8d37b7d7c7334068915de90d92926 SHA1 d7c6306644135f242b199df6037c8df6a332ffca SHA256 24707aa52482e0d423da687ef6b6e92a7b921db3d9145975e3cb495d8725213b MISC metadata.xml 156 RMD160 c1274bdccf57603d580de0075ba07a35b7509560 SHA1 6f78f604e3d079d39189b40aaaa1ddb06182ad91 SHA256 5101ab0d4cc8c7125eea733c44e86962769bd77acaf53b69223b9cadcdd29055 diff --git a/x11-libs/libdrm/files/2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch b/x11-libs/libdrm/files/2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch new file mode 100644 index 000000000000..fa800efdf72d --- /dev/null +++ b/x11-libs/libdrm/files/2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch @@ -0,0 +1,64 @@ +From fc8f6be5a9bd84e10149770b76ff9353d25ce2a7 Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Mon, 12 Oct 2009 23:58:47 +0100 +Subject: [PATCH 1/3] configure: Conditionally build libdrm_intel + +Only build libdrm_intel automatically if we have support for atomic +operations. To force configure to build drm pass --enable-intel, which +will cause the configure to error if no support is found. Or pass +--disable-intel to explicitly prevent libdrm_intel from being built. + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +--- + configure.ac | 19 ++++++++++++++----- + 1 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 870c056..0c216ce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,8 +45,8 @@ AC_ARG_ENABLE(udev, AS_HELP_STRING([--enable-udev], + + AC_ARG_ENABLE(intel, + AS_HELP_STRING([--disable-intel], +- [Enable support for intel's KMS API (default: enabled)]), +- [INTEL=$enableval], [INTEL=yes]) ++ [Enable support for intel's KMS API (default: auto)]), ++ [INTEL=$enableval], [INTEL=auto]) + + AC_ARG_ENABLE(nouveau-experimental-api, + AS_HELP_STRING([--enable-nouveau-experimental-api], +@@ -151,9 +151,7 @@ if test "x$HAVE_LIBUDEV" = xyes; then + fi + AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) + +-AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes]) +- +-if test "x$INTEL" = xyes; then ++if test "x$INTEL" != "xno"; then + # Check for atomic intrinsics + AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, + [ +@@ -170,8 +168,19 @@ if test "x$INTEL" = xyes; then + AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, + [Enable if your compiler supports the Intel __sync_* atomic primitives]) + fi ++ ++ if test "x$drm_cv_atomic_primitives" = "xnone"; then ++ if test "x$INTEL" != "xauto"; then ++ AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or disable support for Intel GPUs by passing --disable-intel to ./configue]) ++ else ++ INTEL=no ++ fi ++ fi + fi + ++AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"]) ++ ++ + AC_SUBST(WARN_CFLAGS) + AC_OUTPUT([ + Makefile +-- +1.6.5.5 + diff --git a/x11-libs/libdrm/files/2.4.15-0002-configure-Typo-in-error-message.patch b/x11-libs/libdrm/files/2.4.15-0002-configure-Typo-in-error-message.patch new file mode 100644 index 000000000000..4cc3e907b941 --- /dev/null +++ b/x11-libs/libdrm/files/2.4.15-0002-configure-Typo-in-error-message.patch @@ -0,0 +1,26 @@ +From 24c905f84120a7b0bcd7c5e86c58e908b9e850f9 Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue, 13 Oct 2009 14:25:54 +0100 +Subject: [PATCH 2/3] configure: Typo in error message. + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +--- + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0c216ce..fd6f696 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -171,7 +171,7 @@ if test "x$INTEL" != "xno"; then + + if test "x$drm_cv_atomic_primitives" = "xnone"; then + if test "x$INTEL" != "xauto"; then +- AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or disable support for Intel GPUs by passing --disable-intel to ./configue]) ++ AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or disable support for Intel GPUs by passing --disable-intel to ./configure]) + else + INTEL=no + fi +-- +1.6.5.5 + diff --git a/x11-libs/libdrm/files/2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch b/x11-libs/libdrm/files/2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch new file mode 100644 index 000000000000..98d043131774 --- /dev/null +++ b/x11-libs/libdrm/files/2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch @@ -0,0 +1,74 @@ +From 901bacd29cb5b242f68302b8384de6e193413a49 Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Tue, 13 Oct 2009 15:13:00 +0100 +Subject: [PATCH 3/3] intel: Fallback to atomic-ops.h [libatomic-ops-dev] + +Use the external implementation for atomic operations across a wide +range of architectures. + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +--- + configure.ac | 10 +++++++++- + libdrm/intel/intel_atomic.h | 17 +++++++++++++++++ + 2 files changed, 26 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fd6f696..7efc4d4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -163,15 +163,23 @@ if test "x$INTEL" != "xno"; then + ], [], + drm_cv_atomic_primitives="Intel" + ) ++ ++ if test "x$drm_cv_atomic_primitives" = "xnone"; then ++ AC_CHECK_HEADER([atomic_ops.h], drm_cv_atomic_primitives="libatomic-ops") ++ fi ++ + ]) + if test "x$drm_cv_atomic_primitives" = xIntel; then + AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, + [Enable if your compiler supports the Intel __sync_* atomic primitives]) + fi ++ if test "x$drm_cv_atomic_primitives" = "xlibatomic-ops"; then ++ AC_DEFINE(HAVE_LIB_ATOMIC_OPS, 1, [Enable if you have libatomic-ops-dev installed]) ++ fi + + if test "x$drm_cv_atomic_primitives" = "xnone"; then + if test "x$INTEL" != "xauto"; then +- AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or disable support for Intel GPUs by passing --disable-intel to ./configure]) ++ AC_MSG_ERROR([libdrm_intel depends upon atomic operations, which were not found for your compiler/cpu. Try compiling with -march=native, or install the libatomics-op-dev package, or, failing both of those, disable support for Intel GPUs by passing --disable-intel to ./configure]) + else + INTEL=no + fi +diff --git a/libdrm/intel/intel_atomic.h b/libdrm/intel/intel_atomic.h +index 9eb50a1..e725c4a 100644 +--- a/libdrm/intel/intel_atomic.h ++++ b/libdrm/intel/intel_atomic.h +@@ -54,6 +54,23 @@ typedef struct { + + #endif + ++#if HAVE_LIB_ATOMIC_OPS ++#include <atomic_ops.h> ++ ++#define HAS_ATOMIC_OPS 1 ++ ++typedef struct { ++ AO_t atomic; ++} atomic_t; ++ ++# define atomic_read(x) AO_load_full(&(x)->atomic) ++# define atomic_set(x, val) AO_store_full(&(x)->atomic, (val)) ++# define atomic_inc(x) ((void) AO_fetch_and_add1_full(&(x)->atomic)) ++# define atomic_dec_and_test(x) (AO_fetch_and_sub1_full(&(x)->atomic) == 1) ++# define atomic_cmpxchg(x, oldv, newv) AO_compare_and_swap_full(&(x)->atomic, oldv, newv) ++ ++#endif ++ + #if ! HAS_ATOMIC_OPS + #error libdrm-intel requires atomic operations, please define them for your CPU/compiler. + #endif +-- +1.6.5.5 + diff --git a/x11-libs/libdrm/libdrm-2.4.15.ebuild b/x11-libs/libdrm/libdrm-2.4.15.ebuild index a21ed8be7e71..a3a00be2ca79 100644 --- a/x11-libs/libdrm/libdrm-2.4.15.ebuild +++ b/x11-libs/libdrm/libdrm-2.4.15.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/libdrm/libdrm-2.4.15.ebuild,v 1.3 2009/12/10 19:45:46 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/libdrm/libdrm-2.4.15.ebuild,v 1.4 2009/12/11 10:32:52 remi Exp $ # Must be before x-modular eclass is inherited -#SNAPSHOT="yes" +SNAPSHOT="yes" inherit x-modular @@ -26,6 +26,12 @@ DEPEND="${RDEPEND}" CONFIGURE_OPTIONS="--enable-udev --enable-nouveau-experimental-api --enable-radeon-experimental-api" +PATCHES=( +"${FILESDIR}/2.4.15-0001-configure-Conditionally-build-libdrm_intel.patch" +"${FILESDIR}/2.4.15-0002-configure-Typo-in-error-message.patch" +"${FILESDIR}/2.4.15-0003-intel-Fallback-to-atomic-ops.h-libatomic-ops-dev.patch" +) + pkg_postinst() { x-modular_pkg_postinst |