summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-03-21 22:45:58 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-03-21 22:45:58 +0000
commitb1141da2408523c1fb92759f539bcaa304cbfe7e (patch)
treebef690931743ccced137232e14eeb8270675728e /games-util
parentAdd in dependency on app-arch/unzip fixing bug 409123. (diff)
downloadgentoo-2-b1141da2408523c1fb92759f539bcaa304cbfe7e.tar.gz
gentoo-2-b1141da2408523c1fb92759f539bcaa304cbfe7e.tar.bz2
gentoo-2-b1141da2408523c1fb92759f539bcaa304cbfe7e.zip
Pyfa only supports wxpython:2.8. Fix dependency, add patch to select correct slot of wxpython at runtime, and drop broken versions. Thanks to Samuli Suominen for noticing.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'games-util')
-rw-r--r--games-util/pyfa/ChangeLog10
-rw-r--r--games-util/pyfa/files/pyfa-1.1.4-wxversion.patch40
-rw-r--r--games-util/pyfa/pyfa-1.1.4-r1.ebuild (renamed from games-util/pyfa/pyfa-1.1.3.ebuild)7
-rw-r--r--games-util/pyfa/pyfa-1.1.4.ebuild79
4 files changed, 54 insertions, 82 deletions
diff --git a/games-util/pyfa/ChangeLog b/games-util/pyfa/ChangeLog
index 13f81e19af62..bb73e3ed2a2f 100644
--- a/games-util/pyfa/ChangeLog
+++ b/games-util/pyfa/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for games-util/pyfa
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-util/pyfa/ChangeLog,v 1.7 2012/03/21 21:13:33 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-util/pyfa/ChangeLog,v 1.8 2012/03/21 22:45:57 tetromino Exp $
+
+*pyfa-1.1.4-r1 (21 Mar 2012)
+
+ 21 Mar 2012; Alexandre Rostovtsev <tetromino@gentoo.org> -pyfa-1.1.3.ebuild,
+ -pyfa-1.1.4.ebuild, +pyfa-1.1.4-r1.ebuild, +files/pyfa-1.1.4-wxversion.patch:
+ Pyfa only supports wxpython:2.8. Fix dependency, add patch to select correct
+ slot of wxpython at runtime, and drop broken versions. Thanks to Samuli
+ Suominen for noticing.
*pyfa-1.1.4 (21 Mar 2012)
diff --git a/games-util/pyfa/files/pyfa-1.1.4-wxversion.patch b/games-util/pyfa/files/pyfa-1.1.4-wxversion.patch
new file mode 100644
index 000000000000..624068b2bc9d
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.1.4-wxversion.patch
@@ -0,0 +1,40 @@
+From 6971971729dbbea1db8c1006c99b1035f30214a2 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 21 Mar 2012 18:24:26 -0400
+Subject: [PATCH] Use wxversion.select('2.8') to support systems that have
+ wxpython-2.9 installed
+
+Pyfa-1.x supports only wxpython-2.8, but multiple wxpython versions can
+be installed in parallel, and by default, 'import wx' pulls in the
+latest one.
+
+To support systems that have both wxpython-2.8 and 2.9 installed, pyfa
+needs to call wxversion.select.
+
+Note that wxversion.select can potentially fail with several exceptions
+internal to the wxversion module, so for simplicity, just check for all
+of them with an 'except:'.
+
+http://trac.evefit.org/ticket/475
+---
+ pyfa.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pyfa.py b/pyfa.py
+index aedb718..6992aaf 100755
+--- a/pyfa.py
++++ b/pyfa.py
+@@ -29,8 +29,8 @@ if not hasattr(sys, 'frozen'):
+
+ try:
+ import wxversion
+- wxversion.ensureMinimal('2.8')
+- except ImportError:
++ wxversion.select('2.8')
++ except:
+ print "Cannot find wxPython or the installed wxPython version doesn't meet the min. requirements.\nYou can download wxPython (2.8) from http://www.wxpython.org/"
+ sys.exit(1)
+
+--
+1.7.8.5
+
diff --git a/games-util/pyfa/pyfa-1.1.3.ebuild b/games-util/pyfa/pyfa-1.1.4-r1.ebuild
index 3f4180909d5d..df5f6a4f60b2 100644
--- a/games-util/pyfa/pyfa-1.1.3.ebuild
+++ b/games-util/pyfa/pyfa-1.1.4-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-util/pyfa/pyfa-1.1.3.ebuild,v 1.1 2012/03/14 06:41:11 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-util/pyfa/pyfa-1.1.4-r1.ebuild,v 1.1 2012/03/21 22:45:57 tetromino Exp $
EAPI="4"
PYTHON_DEPEND="2:2.6"
@@ -26,7 +26,7 @@ KEYWORDS="~amd64 ~x86"
IUSE="+graph"
RDEPEND="dev-python/sqlalchemy
- >=dev-python/wxpython-2.8
+ dev-python/wxpython:2.8
graph? ( dev-python/matplotlib[wxwidgets] dev-python/numpy )"
DEPEND=""
@@ -41,6 +41,9 @@ src_prepare() {
# make staticPath settable from configforced again
epatch "${FILESDIR}/${PN}-1.1-staticPath.patch"
+ # use correct slot of wxpython, http://trac.evefit.org/ticket/475
+ epatch "${FILESDIR}/${PN}-1.1.4-wxversion.patch"
+
python_convert_shebangs -r -x 2 .
sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
-e "s:%%EPREFIX%%:${EPREFIX}:" \
diff --git a/games-util/pyfa/pyfa-1.1.4.ebuild b/games-util/pyfa/pyfa-1.1.4.ebuild
deleted file mode 100644
index a502b62403a2..000000000000
--- a/games-util/pyfa/pyfa-1.1.4.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-util/pyfa/pyfa-1.1.4.ebuild,v 1.1 2012/03/21 21:13:33 tetromino Exp $
-
-EAPI="4"
-PYTHON_DEPEND="2:2.6"
-PYTHON_USE_WITH="sqlite threads"
-
-inherit eutils gnome2-utils python
-
-if [[ ${PV/_rc*/} == ${PV} ]] ; then
- MY_PV=${PV}-crucible-src
- FOLDER=stable/${PV}
-else
- MY_PV=${PV/_rc/-stable-RC}-src
- FOLDER=stable/${PV/*_rc/RC}
-fi
-
-DESCRIPTION="Python Fitting Assistant - a ship fitting application for EVE Online"
-HOMEPAGE="http://www.evefit.org/Pyfa"
-SRC_URI="http://dl.evefit.org/${FOLDER}/${PN}-${MY_PV}.tar.bz2"
-
-LICENSE="GPL-3 LGPL-2.1 CCPL-Attribution-2.5 free-noncomm"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="+graph"
-
-RDEPEND="dev-python/sqlalchemy
- >=dev-python/wxpython-2.8
- graph? ( dev-python/matplotlib[wxwidgets] dev-python/numpy )"
-DEPEND=""
-
-S=${WORKDIR}/${PN}
-
-pkg_setup() {
- python_set_active_version 2
- python_pkg_setup
-}
-
-src_prepare() {
- # make staticPath settable from configforced again
- epatch "${FILESDIR}/${PN}-1.1-staticPath.patch"
-
- python_convert_shebangs -r -x 2 .
- sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
- -e "s:%%EPREFIX%%:${EPREFIX}:" \
- "${FILESDIR}/configforced.py" > configforced.py
-}
-
-src_install() {
- local packagedir=$(python_get_sitedir)/${PN}
- insinto "${packagedir}"
- doins -r eos gui icons service config*.py info.py gpl.txt
- exeinto "${packagedir}"
- doexe ${PN}.py
- dosym "${packagedir}/${PN}.py" /usr/bin/${PN}
- insinto /usr/share/${PN}
- doins -r staticdata
- dodoc readme.txt
- insinto /usr/share/icons/hicolor/32x32/apps
- doins icons/pyfa.png
- insinto /usr/share/icons/hicolor/64x64/apps
- newins icons/pyfa64.png pyfa.png
- domenu "${FILESDIR}/${PN}.desktop"
-}
-
-pkg_preinst() {
- gnome2_icon_savelist
-}
-
-pkg_postinst() {
- gnome2_icon_cache_update
- python_mod_optimize ${PN}
-}
-
-pkg_postrm() {
- gnome2_icon_cache_update
- python_mod_cleanup ${PN}
-}