summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Cardona <remi@gentoo.org>2014-08-17 23:03:10 +0000
committerRemi Cardona <remi@gentoo.org>2014-08-17 23:03:10 +0000
commitd233c4ad4ccf99335fc432a9fa679281dc176be7 (patch)
treed10086f1cf760eba7984e63bb9dafaba58217cf7 /x11-apps
parentKeyword ~ppc ~ppc64, bug #513108 (diff)
downloadhistorical-d233c4ad4ccf99335fc432a9fa679281dc176be7.tar.gz
historical-d233c4ad4ccf99335fc432a9fa679281dc176be7.tar.bz2
historical-d233c4ad4ccf99335fc432a9fa679281dc176be7.zip
x11-apps/intel-gpu-tools: Fix python script to handle non-UTF-8 locales
Package-Manager: portage-2.2.12/cvs/Linux x86_64
Diffstat (limited to 'x11-apps')
-rw-r--r--x11-apps/intel-gpu-tools/ChangeLog7
-rw-r--r--x11-apps/intel-gpu-tools/Manifest5
-rw-r--r--x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch37
-rw-r--r--x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild4
4 files changed, 49 insertions, 4 deletions
diff --git a/x11-apps/intel-gpu-tools/ChangeLog b/x11-apps/intel-gpu-tools/ChangeLog
index 2d136a83de95..3bc9dc8c173f 100644
--- a/x11-apps/intel-gpu-tools/ChangeLog
+++ b/x11-apps/intel-gpu-tools/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for x11-apps/intel-gpu-tools
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-apps/intel-gpu-tools/ChangeLog,v 1.18 2014/08/01 22:00:34 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/intel-gpu-tools/ChangeLog,v 1.19 2014/08/17 23:03:08 remi Exp $
+
+ 17 Aug 2014; Rémi Cardona <remi@gentoo.org> intel-gpu-tools-1.7.ebuild,
+ +files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patc
+ h:
+ Fix python script to handle non-UTF-8 locales, see bug #519434.
01 Aug 2014; Rémi Cardona <remi@gentoo.org> intel-gpu-tools-1.7.ebuild:
Add missing pkg_setup for proper python-single-r1 use. See bug #518538.
diff --git a/x11-apps/intel-gpu-tools/Manifest b/x11-apps/intel-gpu-tools/Manifest
index 116f4388899e..5907823f3b4f 100644
--- a/x11-apps/intel-gpu-tools/Manifest
+++ b/x11-apps/intel-gpu-tools/Manifest
@@ -1,8 +1,9 @@
+AUX intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch 1304 SHA256 e63d273740876669482e459a1bef21bb4d3207004695776b21a8311cd58546a1 SHA512 10f9722367c3f060725218161d4b0774f17f23ea6cd9cc5a19cde068bdca2f933f84243ccc2af6157dadd94c0b67284f826ca9829050a69a3c0310b252ec0019 WHIRLPOOL f22811cef57178bbab517aa0d2d4b488065f0d20c10e2250ac876bad0b9cc1b007c731bb77eb68c21b2a4b48033383fb6e15f04e961a52afef9431ea2b2ffc3f
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.7.tar.bz2 11780573 SHA256 22612343bbd9b518b9f92a983555dbbcae8040ee577a38277dbf873c8900207a SHA512 13181db6d2424fa27c97c30ecb83b8554fc2e9ce98bec7b7735f919aa9d7e2563c3e1860dc6e5aedf3918c029acb205b8fcf6a32de1567f557f8cd98c09a5d98 WHIRLPOOL f66e0710377aa4f46067840efd1cf70814e10cd81ff24ebb5db21b901787846f63b1461502ec01ba7383ead76e985c25860801355a9582d5509a861fa70aacb0
EBUILD intel-gpu-tools-1.2.ebuild 458 SHA256 fdad3dbf94c6b85fa6731441358ddebf3592c3f958a17ba80be5a608b2f9a6d9 SHA512 89f084c31683674e22a18175d0ea40eb5ef64d7753d5fb9f79548fa28aa6ed26e4b00ab988a92a0ac222251020be0ccd5501e257c685b2d3b73a71a1a558bd9c WHIRLPOOL a086480bf28b211867405023d163d7b5382ea553fbccd3fdb8848415f56b149cffed88f944bbcbce46b2d2643869f421981f8c62fd87e208479291f64528b308
EBUILD intel-gpu-tools-1.3.ebuild 631 SHA256 8b2d645170e4ab0ed6fd90a7305dd66cc0213987f1cf93dfd11a988562e70f7e SHA512 538ab6e5c42e91365876a83c2db8e7f73a2ab9844d0e909aeb32c45b9d815e54a8f60682bf534e0feba0e82f50d80f437fc5b5b6eadc831bf8a7663ff00fe212 WHIRLPOOL d232fb9bf0a32c9c1ea96adb204ce9ad640f2015ede74f3839acf125036d622b6f58669168b4bc7a33ed6af7cddddee9e06ef01abc9b04384aa2e202e2d50205
-EBUILD intel-gpu-tools-1.7.ebuild 896 SHA256 d49c0319a167fb5391b0fdc8a3be4e481bf7a1065c312aa1a0185faef720898a SHA512 725c1fc4503f029267a1ac090a65b28249d4b3d4dfd06c1b0d24fa4724e8f1bd86558509484b3cefcaf1701307e6cd12969731b0d9c24c0189a35f9e94e03088 WHIRLPOOL 32df440466757fa7c6787c79aa8226a8b7cbae6f08ed3a191893f125b0d5a4d5e5aad597152af237845fbef42ea3f3788c7721f2d1977a34fcbc32f556648b2f
-MISC ChangeLog 2874 SHA256 e10dd0dd84ec759843aa2829e9f96ca15a925813d70346666acf67e97e34ee35 SHA512 25266f8596b4fd81b2520c465e23d59f55b6d906411d76cfeeaffbcd849d3931c3156d6954971257bcc065234baa8ecc0c163a5fd34a396866ad886791e7623e WHIRLPOOL 256ba352dda8514c4aaae6d150da7df39d8b3d6a491db33225d6eca396c84781cddd42b640897ea1459d97c21e572e9448f6c34d4a5325eb7d43611c3151b783
+EBUILD intel-gpu-tools-1.7.ebuild 980 SHA256 30afc6ebbe4af3a2ee283fcc0ad128b0ba6a0e8292f93c537740f083b7b25d7f SHA512 d6d2550aed6fec783094d07eda6dcf09dcaedbabf820fb72c6f8afe69cecfd77aad69c2f234027490ad68baa1528e1024962bfca361f31cedbd9630e069ec830 WHIRLPOOL 5038a47d99a7284812ca33b680941d5a1523737d16c7281b5e8cba7831a481f18506dd1b5589da66f525bbeac19552bfeda85deabc5551e1d37db5876798cf20
+MISC ChangeLog 3101 SHA256 052fe3552ddd79a9f44c54e4c3a86fcdb991ffd00d46baef211f5043c82598db SHA512 8e3220f7cb266f7af85febccef7b30a24fcab5abcdfc734439ba86cc81ea2dd4f8d275bd0d3a09827bf66ab386ba70a0f5789e95fe8bc59be7219f8635c5c675 WHIRLPOOL 639ca8a62fbdcc06c852dea4314448fa68f78e3f7dd05736189b3fc92c15ec8a478a2738559b2d3625a2b91d422837289f742568c668fa0b7f390f5098edcbf2
MISC metadata.xml 244 SHA256 547b97ccf3e24541c0b9a797343afe3c0fcfc3889efe8b2587c3f9afeb26372f SHA512 3baef52bdbf05bdbe102a310aa00f92a29f0db7aa29ff365f189e1e5945c6909e391874460844d262e43c49f9fbf38371399b25153e23af4910323cc042845bb WHIRLPOOL 63fd6766f029d37c0a46734974328905066e381c8167ba1ebac0a133565fc82d4c1bcf7516ba0deb98eab4c28c6a70edf60ebd2b53c74b1185cadf675e5a06a5
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
new file mode 100644
index 000000000000..3b87f69ac590
--- /dev/null
+++ b/x11-apps/intel-gpu-tools/files/intel-gpu-tools-1.7-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch
@@ -0,0 +1,37 @@
+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.7.ebuild b/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild
index bffc13a2c858..5633ccfb0fba 100644
--- a/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild
+++ b/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 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.3 2014/08/01 22:00:34 remi Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/intel-gpu-tools/intel-gpu-tools-1.7.ebuild,v 1.4 2014/08/17 23:03:08 remi Exp $
EAPI=5
@@ -21,6 +21,8 @@ DEPEND="dev-libs/glib:2
python? ( ${PYTHON_DEPS} )"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-shader-debugger-Force-file-stdout-IO-as-UTF-8.patch" )
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}