intel-gpu-tools: upgraded package to upstream

Upgraded x11-apps/intel-gpu-tools to version 1.12 on amd64, x86

i915 developers have been requesting debugging info from some of the
newer tools. This rev makes tools like "intel_reg" available to us in
test images. Also, remove old patch files.

Note: It was necessary to pass the "--unstable-ok" option when running
cros_portage_upgrade to make this version available.

BUG=None
TEST=`emerge --search intel-gpu-tools` shows version 1.12

Change-Id: I8d81c8a2e5fff27d1c8ff021b664c90d081995eb
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/302779
Tested-by: Brian Wilson <brian.wilson@intel.com>
Reviewed-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: James Ausmus <james.ausmus@intel.com>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/metadata/md5-cache/x11-apps/intel-gpu-tools-1.7 b/metadata/md5-cache/x11-apps/intel-gpu-tools-1.12
similarity index 70%
rename from metadata/md5-cache/x11-apps/intel-gpu-tools-1.7
rename to metadata/md5-cache/x11-apps/intel-gpu-tools-1.12
index 9d9a413..774068f 100644
--- a/metadata/md5-cache/x11-apps/intel-gpu-tools-1.7
+++ b/metadata/md5-cache/x11-apps/intel-gpu-tools-1.12
@@ -1,15 +1,15 @@
 DEFINED_PHASES=compile configure install postinst postrm prepare setup test unpack
-DEPEND=dev-libs/glib:2 >=x11-libs/cairo-1.12.0 >=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?] >=x11-libs/libpciaccess-0.10 python? ( python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?] ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.13:1.13 >=sys-devel/automake-1.15:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) virtual/pkgconfig
+DEPEND=dev-libs/glib:2 >=x11-libs/cairo-1.12.0 >=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?] >=x11-libs/libpciaccess-0.10 python? ( python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?] ) unwind? ( sys-libs/libunwind ) !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.13:1.13 >=sys-devel/automake-1.15:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 x86-interix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) ppc-aix? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) x86-winnt? ( >=sys-devel/libtool-2.2.6a sys-devel/m4 >=x11-misc/util-macros-1.18 >=media-fonts/font-util-1.2.0 ) virtual/pkgconfig
 DESCRIPTION=Intel GPU userland tools
 EAPI=5
 HOMEPAGE=http://xorg.freedesktop.org/
-IUSE=python video_cards_nouveau python_targets_python3_3 python_targets_python3_4 python_single_target_python3_3 python_single_target_python3_4
-KEYWORDS=-* amd64 x86
+IUSE=python test-programs unwind video_cards_nouveau python_targets_python3_3 python_targets_python3_4 python_single_target_python3_3 python_single_target_python3_4
+KEYWORDS=*
 LICENSE=MIT
-RDEPEND=dev-libs/glib:2 >=x11-libs/cairo-1.12.0 >=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?] >=x11-libs/libpciaccess-0.10 python? ( python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?] )
+RDEPEND=dev-libs/glib:2 >=x11-libs/cairo-1.12.0 >=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?] >=x11-libs/libpciaccess-0.10 python? ( python_single_target_python3_3? ( >=dev-lang/python-3.3.2-r2:3.3 ) python_single_target_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python3_3(-)?,python_targets_python3_4(-)?,-python_single_target_jython2_5(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),python_single_target_python3_3(+)?,python_single_target_python3_4(+)?] ) unwind? ( sys-libs/libunwind )
 REQUIRED_USE=python? ( ^^ ( python_single_target_python3_3 python_single_target_python3_4 ) python_single_target_python3_3? ( python_targets_python3_3 ) python_single_target_python3_4? ( python_targets_python3_4 ) )
 RESTRICT=test
 SLOT=0
-SRC_URI=http://xorg.freedesktop.org/releases/individual/app/intel-gpu-tools-1.7.tar.bz2
+SRC_URI=http://xorg.freedesktop.org/releases/individual/app/intel-gpu-tools-1.12.tar.bz2
 _eclasses_=autotools	999c8f6cf5d91495cb0779588f20716c	autotools-utils	3727db64c7b960903d5033280f108080	eutils	06133990e861be0fe60c2b428fd025d9	flag-o-matic	5d5921a298e95441da2f85be419894c0	libtool	52d0e17251d04645ffaa61bfdd858944	multilib	3bf24e6abb9b76d9f6c20600f0b716bf	python-single-r1	f782db6207752efeca1d59c016d8c813	python-utils-r1	42cc5b750abbcf9d4389848380bbef91	toolchain-funcs	48b38a216afb92db6314d6c3187abea3	xorg-2	50dd640df6d0554c259daa81531ed3ee
-_md5_=a244f2b875866435d52a34d88f8ec2ee
+_md5_=ba1c50b269454da1b1a5c6f5236c3f56
diff --git a/x11-apps/intel-gpu-tools/Manifest b/x11-apps/intel-gpu-tools/Manifest
index 3deef39..439851b 100644
--- a/x11-apps/intel-gpu-tools/Manifest
+++ b/x11-apps/intel-gpu-tools/Manifest
@@ -1,3 +1 @@
-DIST intel-gpu-tools-1.7.tar.bz2 11780573 SHA256 22612343bbd9b518b9f92a983555dbbcae8040ee577a38277dbf873c8900207a SHA512 13181db6d2424fa27c97c30ecb83b8554fc2e9ce98bec7b7735f919aa9d7e2563c3e1860dc6e5aedf3918c029acb205b8fcf6a32de1567f557f8cd98c09a5d98 WHIRLPOOL f66e0710377aa4f46067840efd1cf70814e10cd81ff24ebb5db21b901787846f63b1461502ec01ba7383ead76e985c25860801355a9582d5509a861fa70aacb0
-DIST intel-gpu-tools-1.2.tar.bz2 531491 SHA256 104eeed3087e7eff7aa3a843b3988cb767f013ce2f476d32be8d1dfbb13d7932 SHA512 d4206a0438e1280fd77700dce82a26720ef4ed954d587fb630bd2bf141055c931e0965a7fb4ce685069a8ce18c35866b7e899c53e0a6da262e24e40edf8191d7 WHIRLPOOL 81f10e6e5361cc77a1e7396050d81992ae1bf98fc31925ed172b02f40b634224d94317fffcd069fb498ccfd359c2f45c05ad7147ffc024411fc000621caf9980
-DIST intel-gpu-tools-1.3.tar.bz2 589027 SHA256 51d22fdb3d415a1b3b7d0a172c1bb24dec6f16116e80a9ce49873f44527f20a0 SHA512 de0c8601dc1910b22c343e3709a0f2266b8bd509b582ff0e4d8a0c629a7678f4822e6c7c0e18d06fcd0cfec76e411d0e26b987dc021bb4b948ce64801382b94f WHIRLPOOL 2b513db673e1e337c2590d98850cb5b2f34be3d733738c85f18800539065c29aa65ccb7d9b53c50e9b109f15c9ba20f147e965e6f882a44a36161e2161e98ac0
+DIST intel-gpu-tools-1.12.tar.bz2 1621343 SHA256 143fe0ae4a52560b9c032aa7592fe8d36b1578abb873fa9b026a75acf7e38be3 SHA512 0643ffcc5198ad3c03d7fb2323f95b1a23fabc529ab00b5165a2355fe7b7d4d5e81b76627bf19f41fb6111fc3c9a32e83010e09941aa78097c9e58dce5832c81 WHIRLPOOL cb34e5410ef21ad143ae52c062c5d9b3b388885514364f2aca531746971cbb8775e4d3d26b7fe83ae68cf73eab9a99a1b9d6eeb4b4e5e09e896f872f68dcb905
diff --git a/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.10-clang.patch b/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.10-clang.patch
deleted file mode 100644
index 2f7b7a2..0000000
--- a/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.10-clang.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-fix from upstream for building w/clang
-
-From 95019c2a3c4ed5943ad16e17c8dcf36fd6492adc Mon Sep 17 00:00:00 2001
-From: Yunlian Jiang <yunlian@google.com>
-Date: Tue, 26 May 2015 10:22:31 -0700
-Subject: [PATCH] debugger: remove unnecessary struct per_thread_data
-
-This removes unnecessary 'struct per_thread_data' and avoids the
-compilation error 'variable length array in structure extension
-will never be supported' by clang. The bug entry is
-https://code.google.com/p/chromium/issues/detail?id=476001
-
-Cc: Benjamin Widawsky <benjamin.widawsky@intel.com>
-Cc: Thomas Wood <thomas.wood@intel.com>
-Signed-off-by: Yunlian Jiang <yunlian@google.com>
-Signed-off-by: Thomas Wood <thomas.wood@intel.com>
----
- debugger/eudb.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/debugger/eudb.c b/debugger/eudb.c
-index 0e810db..39c5cca 100644
---- a/debugger/eudb.c
-+++ b/debugger/eudb.c
-@@ -207,15 +207,11 @@ wait_for_attn(int timeout, int *out_bits) {
- #define eu_tid(bit) eu_info->debuggees[bit].tid
- static struct eu_state *
- find_eu_shmem(int bit, volatile uint8_t *buf) {
--	struct per_thread_data {
--		uint8_t ____[dh.per_thread_scratch];
--	}__attribute__((packed)) *data;
- 	struct eu_state *eu;
- 	int mem_tid, mem_euid, i;
- 
--	data = (struct per_thread_data *)buf;
- 	for(i = 0; i < eu_info->num_threads; i++) {
--		eu = (struct eu_state *)&data[i];
-+		eu = (struct eu_state *)(buf + i * dh.per_thread_scratch);
- 		mem_tid = eu->sr0 & 0x7;
- 		mem_euid = (eu->sr0 >> 8) & 0xf;
- 		if (mem_tid == eu_tid(bit) && mem_euid == eu_id(bit))
--- 
-2.4.1
-
diff --git a/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch b/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch
deleted file mode 100644
index 3b87f69..0000000
--- a/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e9e9df216180bcecc5d4c17bbe48b2efd88b3ed2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org>
-Date: Mon, 18 Aug 2014 00:44:32 +0200
-Subject: [PATCH] shader-debugger: Force file/stdout IO as UTF-8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Not all locales on linux are UTF-8, the most notable being the C locale.
-Python will use the ASCII codec for stream IO in this case and will barf
-on the Copyright sign at the top of .g4a files.
-
-Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=519434
-Signed-off-by: Rémi Cardona <remi@gentoo.org>
----
- debugger/system_routine/pre_cpp.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/debugger/system_routine/pre_cpp.py b/debugger/system_routine/pre_cpp.py
-index effea0e..584d2af 100755
---- a/debugger/system_routine/pre_cpp.py
-+++ b/debugger/system_routine/pre_cpp.py
-@@ -33,7 +33,10 @@
- 
- import sys,re
- 
--file = open(sys.argv[1], "r")
-+# make sure both input file and stdout are handled as utf-8 text, regardless
-+# of current locale (eg. LANG=C which tells python to use ascii encoding)
-+sys.stdout = open(sys.__stdout__.fileno(), "a", encoding="utf-8")
-+file = open(sys.argv[1], "r", encoding="utf-8")
- 
- lines = file.readlines()
- len(lines)
--- 
-2.0.4
-
diff --git a/x11-apps/intel-gpu-tools/intel-gpu-tools-1.12.ebuild b/x11-apps/intel-gpu-tools/intel-gpu-tools-1.12.ebuild
new file mode 100644
index 0000000..832b89e
--- /dev/null
+++ b/x11-apps/intel-gpu-tools/intel-gpu-tools-1.12.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit python-single-r1 xorg-2
+
+DESCRIPTION="Intel GPU userland tools"
+KEYWORDS="*"
+IUSE="python test-programs unwind video_cards_nouveau"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="test"
+
+DEPEND="dev-libs/glib:2
+	>=x11-libs/cairo-1.12.0
+	>=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?]
+	>=x11-libs/libpciaccess-0.10
+	python? ( ${PYTHON_DEPS} )
+	unwind? ( sys-libs/libunwind )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+	XORG_CONFIGURE_OPTIONS=(
+		$(use_enable python dumper)
+		$(use_enable video_cards_nouveau nouveau)
+		$(use_enable test-programs tests)
+		$(use_with unwind libunwind)
+	)
+	xorg-2_src_configure
+}
+
+src_install() {
+	xorg-2_src_install
+	if use test-programs; then
+		local testprogram
+		pushd "${AUTOTOOLS_BUILD_DIR}"/tests || die
+			for testprogram in $(<multi-tests.txt) $(<single-tests.txt); do
+				if [[ -f ${testprogram} ]]; then
+					dobin "${testprogram}"
+				fi
+			done
+		popd
+	fi
+}
+
+pkg_postinst() {
+	xorg-2_pkg_postinst
+	if use test-programs; then
+		elog "Test programs for DRM driver development were installed. These are not"
+		elog "designed to run outside their source tree, so may or may not work as"
+		elog "intended."
+	fi
+}
diff --git a/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild b/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild
deleted file mode 100644
index fb78ed7..0000000
--- a/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild,v 1.8 2015/05/30 03:41:38 vapier Exp $
-
-EAPI=5
-
-PYTHON_COMPAT=( python{3_3,3_4} )
-
-inherit python-single-r1 xorg-2
-
-DESCRIPTION="Intel GPU userland tools"
-KEYWORDS="-* amd64 x86"
-IUSE="python video_cards_nouveau"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RESTRICT="test"
-
-DEPEND="dev-libs/glib:2
-	>=x11-libs/cairo-1.12.0
-	>=x11-libs/libdrm-2.4.52[video_cards_intel,video_cards_nouveau?]
-	>=x11-libs/libpciaccess-0.10
-	python? ( ${PYTHON_DEPS} )"
-RDEPEND="${DEPEND}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch"
-	"${FILESDIR}/${PN}-1.10-clang.patch"
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_configure() {
-	XORG_CONFIGURE_OPTIONS=(
-		$(use_enable python dumper)
-		$(use_enable video_cards_nouveau nouveau)
-		--disable-tests #484618
-	)
-	xorg-2_src_configure
-}
diff --git a/x11-apps/intel-gpu-tools/metadata.xml b/x11-apps/intel-gpu-tools/metadata.xml
index 5c370cb..fe76944 100644
--- a/x11-apps/intel-gpu-tools/metadata.xml
+++ b/x11-apps/intel-gpu-tools/metadata.xml
@@ -4,5 +4,7 @@
 <herd>x11</herd>
 <use>
  <flag name='python'>Install python based register dumper utilities</flag>
+ <flag name='test-programs'>Install test programs for DRM driver development</flag>
+ <flag name='unwind'>Provide automatic stack traces on test failures</flag>
 </use>
 </pkgmetadata>