summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesus Rivero <neurogeek@gentoo.org>2009-07-15 02:00:13 +0000
committerJesus Rivero <neurogeek@gentoo.org>2009-07-15 02:00:13 +0000
commitc2c5a33ea076aa0fc00ffe2f67f91965baf7915d (patch)
tree0ed52ed91734fe827a3398f8de385d26ecc51552 /dev-python
parentFix build ignoring --disable-gtk-doc. (diff)
downloadgentoo-2-c2c5a33ea076aa0fc00ffe2f67f91965baf7915d.tar.gz
gentoo-2-c2c5a33ea076aa0fc00ffe2f67f91965baf7915d.tar.bz2
gentoo-2-c2c5a33ea076aa0fc00ffe2f67f91965baf7915d.zip
Fixed some tests that failed. Closes Bug #223055.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pygame/ChangeLog6
-rw-r--r--dev-python/pygame/files/pygame-1.8.1_icon_path.patch30
-rw-r--r--dev-python/pygame/pygame-1.8.1-r1.ebuild22
3 files changed, 53 insertions, 5 deletions
diff --git a/dev-python/pygame/ChangeLog b/dev-python/pygame/ChangeLog
index 988a47bffb40..316daf1a660b 100644
--- a/dev-python/pygame/ChangeLog
+++ b/dev-python/pygame/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/pygame
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/ChangeLog,v 1.60 2009/04/09 10:04:56 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/ChangeLog,v 1.61 2009/07/15 02:00:12 neurogeek Exp $
+
+ 15 Jul 2009; Jesus Rivero <neurogeek@gentoo.org>
+ +files/pygame-1.8.1_icon_path.patch, pygame-1.8.1-r1.ebuild:
+ Fixed some tests that failed. Closes Bug #223055.
*pygame-1.8.1-r1 (09 Apr 2009)
diff --git a/dev-python/pygame/files/pygame-1.8.1_icon_path.patch b/dev-python/pygame/files/pygame-1.8.1_icon_path.patch
new file mode 100644
index 000000000000..d2f1eb7385de
--- /dev/null
+++ b/dev-python/pygame/files/pygame-1.8.1_icon_path.patch
@@ -0,0 +1,30 @@
+Patch: Patch to make tests works
+Added: 14 Jul 2009
+By: Jesus Rivero (Neurogeek)
+
+diff -uNr pygame-1.8.1release.orig/test/image_test.py pygame-1.8.1release/test/image_test.py
+--- pygame-1.8.1release.orig/test/image_test.py 2009-07-14 19:20:38.000000000 -0430
++++ pygame-1.8.1release/test/image_test.py 2009-07-14 19:34:11.000000000 -0430
+@@ -27,7 +27,7 @@
+ def testLoadIcon(self):
+ """ see if we can load the pygame icon.
+ """
+- f = pygame.pkgdata.getResource("pygame_icon.bmp")
++ f = pygame.pkgdata.getResource("../../../lib/pygame_icon.bmp")
+ self.assertEqual(f.mode, "rb")
+
+ surf = pygame.image.load_basic(f)
+
+diff -uNtr pygame-1.8.1release.orig/test/font_test.py pygame-1.8.1release.new/test/font_test.py
+--- pygame-1.8.1release.orig/test/font_test.py 2009-07-14 19:20:38.000000000 -0430
++++ pygame-1.8.1release.new/test/font_test.py 2009-07-14 20:53:02.000000000 -0430
+@@ -11,7 +11,7 @@
+ """
+ #print __file__
+ pygame.font.init ()
+- f = pygame.font.Font(None, 20)
++ f = pygame.font.Font("lib/freesansbold.ttf", 20)
+ s = f.render("foo", True, [0, 0, 0], [255, 255, 255])
+ s = f.render("xxx", True, [0, 0, 0], [255, 255, 255])
+ s = f.render("", True, [0, 0, 0], [255, 255, 255])
+
diff --git a/dev-python/pygame/pygame-1.8.1-r1.ebuild b/dev-python/pygame/pygame-1.8.1-r1.ebuild
index 3df5775901df..775a3943a099 100644
--- a/dev-python/pygame/pygame-1.8.1-r1.ebuild
+++ b/dev-python/pygame/pygame-1.8.1-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/pygame-1.8.1-r1.ebuild,v 1.1 2009/04/09 10:04:56 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/pygame-1.8.1-r1.ebuild,v 1.2 2009/07/15 02:00:12 neurogeek Exp $
EAPI="2"
-inherit distutils multilib eutils
+inherit distutils
DESCRIPTION="python bindings to sdl and other libs that facilitate game production"
HOMEPAGE="http://www.pygame.org/"
@@ -26,6 +26,10 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${P}release
+src_prepare(){
+ epatch "${FILESDIR}/${P}_icon_path.patch"
+}
+
src_compile() {
python config.py
sed -i -e 's:X11R6/lib:lib64:g' Setup
@@ -34,18 +38,28 @@ src_compile() {
}
src_install() {
- DOCS=WHATSNEW
+ DOCS="WHATSNEW"
distutils_src_install
if use doc; then
dohtml -r docs/*
- insinto /usr/share/doc/${PF}
+ insinto "/usr/share/doc/${PF}"
doins -r "${S}/examples"
fi
}
src_test() {
python_version
+
+ #Skip tests that depend on DISPLAY being set. Bug #223055
+ SKIP_TESTS="display_test image__save_gl_surface_test movie_test"
+
+ for test_ in $SKIP_TESTS
+ do
+ einfo "Removing test: ${test_}"
+ rm -rf "${S}/test/${test_}.py"
+ done
+
PYTHONPATH="$(ls -d build/lib.*)" "${python}" run_tests.py || die "tests failed"
}