summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2011-01-21 18:50:56 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2011-01-21 18:50:56 +0000
commit417675e3c39a8547c399e365eb0c564f4a5b450d (patch)
treec6d848415675a32ef2b5066ff9cfe48bf9685194 /games-util
parentlicenses/ CCPL-Attribution-2.5: New license for bug #352188 (diff)
downloadsunrise-417675e3c39a8547c399e365eb0c564f4a5b450d.tar.gz
sunrise-417675e3c39a8547c399e365eb0c564f4a5b450d.tar.bz2
sunrise-417675e3c39a8547c399e365eb0c564f4a5b450d.zip
games-util/pyfa: New ebuild for bug #352188
svn path=/sunrise/; revision=11699
Diffstat (limited to 'games-util')
-rw-r--r--games-util/pyfa/ChangeLog9
-rw-r--r--games-util/pyfa/Manifest6
-rw-r--r--games-util/pyfa/files/pyfa-1.0_rc1-paths.patch49
-rw-r--r--games-util/pyfa/files/pyfa.desktop8
-rw-r--r--games-util/pyfa/metadata.xml15
-rw-r--r--games-util/pyfa/pyfa-1.0_rc1.ebuild55
6 files changed, 142 insertions, 0 deletions
diff --git a/games-util/pyfa/ChangeLog b/games-util/pyfa/ChangeLog
new file mode 100644
index 000000000..1ab2353f0
--- /dev/null
+++ b/games-util/pyfa/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for games-util/pyfa
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 21 Jan 2011; Alexandre Rostovtsev (tetromino) <tetromino@gmail.com>
+ +pyfa-1.0_rc1.ebuild, +files/pyfa-1.0_rc1-paths.patch,
+ +files/pyfa.desktop, +metadata.xml:
+ New ebuild for bug #352188
+
diff --git a/games-util/pyfa/Manifest b/games-util/pyfa/Manifest
new file mode 100644
index 000000000..4baf204a3
--- /dev/null
+++ b/games-util/pyfa/Manifest
@@ -0,0 +1,6 @@
+AUX pyfa-1.0_rc1-paths.patch 1900 RMD160 12510b06a7d258f8f50c2bb9467432613f8fbddf SHA1 1e3e63b9c10ab8ab06af9e7cc9ab9a4258aa9300 SHA256 5e50fc62faa8fbeea792d23f9bc644b2d1d67e26fc4bab9d7cda0b1a7df79323
+AUX pyfa.desktop 155 RMD160 37f31fe5d62b2690b7761babb0dfeb8c0171ae80 SHA1 cb3a43b949524de9692f323cda9e7adad2efe218 SHA256 c395891d87eaaac64e3ba7954d623efaf161d906527099ed4b0c680c63a041eb
+DIST pyfa-1.0-stable-RC1-src.tar.bz2 5572232 RMD160 16c52ee488951e7fd3a0241bfd8770a28a8c334a SHA1 f6945d6aa7a0861f770bfa70415025ac74d730db SHA256 f54038db30dccdf5de7c6c5729d0e3c92ac95daa9370e6642cf64a413147781e
+EBUILD pyfa-1.0_rc1.ebuild 1264 RMD160 b309fd48709042de93417b11ebf194b5687847ed SHA1 580aaef22dc7a61e8330dd56b7d4064f7df8bb44 SHA256 d06418a0f59e5826fb3c59d89aa2381744469f1e89d89ab520d84dd2de0e3bcf
+MISC ChangeLog 311 RMD160 679ef05ed53a1a0e8f309a712cc1a58419e29837 SHA1 29f002b8e53c0c8c41dde35ab5f6131137db8eb8 SHA256 1e5bbdd97a2a9e43583d8fbaf1a5859436d31ac6a423143fc733ffd45e686be0
+MISC metadata.xml 582 RMD160 3f0d62cc7468e86f1f5d0ebc5476b43fc7ec5a36 SHA1 25396574747d7aff13fb415ba67753a50ef7e692 SHA256 f57c21ddd3e1d285ae34b20f4bc34cdd7e1b08f964b5a3b2151f5dfb564a750e
diff --git a/games-util/pyfa/files/pyfa-1.0_rc1-paths.patch b/games-util/pyfa/files/pyfa-1.0_rc1-paths.patch
new file mode 100644
index 000000000..124b3a655
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.0_rc1-paths.patch
@@ -0,0 +1,49 @@
+diff -ru pyfa-orig/config.py pyfa/config.py
+--- pyfa-orig/config.py 2010-11-13 22:10:04.000000000 -0500
++++ pyfa/config.py 2011-01-20 17:34:51.435713844 -0500
+@@ -1,5 +1,6 @@
+ import os
+ import sys
++import sysconfig
+
+ # Turns on debug mode
+ debug = False
+@@ -8,14 +9,16 @@
+
+ # The main pyfa directory which contains run.py
+ # python 2.X uses ansi by default, so we need to convert the character encoding :(
+-pyfaPath = unicode(os.path.join(os.getcwd(), os.path.dirname(sys.modules['__main__'].__file__)),
+- sys.getfilesystemencoding())
++# pyfaPath = os.path.join(os.getcwd(), os.path.dirname(sys.modules['__main__'].__file__)),
++# sys.getfilesystemencoding())
++pyfaPath = os.path.join(sysconfig.get_path("purelib"), "pyfa")
+
+ # Where we store the saved fits etc, default is the current users home directory
+ savePath = os.path.expanduser(os.path.join("~", ".pyfa"))
+
+ # Static EVE Data from the staticdata repository, should be in the staticdata directory in our pyfa directory
+-staticPath = os.path.join(pyfaPath, "staticdata")
++# staticPath = os.path.join(pyfaPath, "staticdata")
++staticPath = os.path.join(sysconfig.get_path("data"), "share", "pyfa", "staticdata")
+
+ # The database where we store all the fits etc
+ saveDB = os.path.join(savePath, "saveddata.db")
+diff -ru pyfa-orig/run.py pyfa/run.py
+--- pyfa-orig/run.py 2010-11-13 11:58:28.000000000 -0500
++++ pyfa/run.py 2011-01-19 17:53:01.236136058 -0500
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ #===============================================================================
+ # Copyright (C) 2010 Diego Duclos
+ #
+@@ -18,6 +18,9 @@
+ # along with pyfa. If not, see <http://www.gnu.org/licenses/>.
+ #===============================================================================
+
++import os, sys, sysconfig
++sys.path.append(os.path.join(sysconfig.get_path("purelib"), "pyfa"))
++
+ import config
+
+ # try:
diff --git a/games-util/pyfa/files/pyfa.desktop b/games-util/pyfa/files/pyfa.desktop
new file mode 100644
index 000000000..07f3f0ee2
--- /dev/null
+++ b/games-util/pyfa/files/pyfa.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Pyfa
+Comment=Ship fitting application for EVE Online
+Icon=pyfa
+Terminal=false
+Type=Application
+Categories=Game;RolePlaying;
+Exec=pyfa
diff --git a/games-util/pyfa/metadata.xml b/games-util/pyfa/metadata.xml
new file mode 100644
index 000000000..d04fb5b3d
--- /dev/null
+++ b/games-util/pyfa/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer>
+<longdescription lang="en">
+Pyfa is the Python Fitting Assistant, a standalone application for creating
+fittings for the EVE Online SciFi MMORPG. It provides many advanced features
+such as graphs and full calculations of any possible combination of modules,
+fits, etc.
+</longdescription>
+<use>
+<flag name="graph">Enable support for graphs</flag>
+</use>
+</pkgmetadata>
diff --git a/games-util/pyfa/pyfa-1.0_rc1.ebuild b/games-util/pyfa/pyfa-1.0_rc1.ebuild
new file mode 100644
index 000000000..e08ed96d7
--- /dev/null
+++ b/games-util/pyfa/pyfa-1.0_rc1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python
+
+if [[ ${PV/_rc*/} == ${PV} ]] ; then
+ MY_PV=${PV}-stable-src
+else
+ MY_PV=${PV/_rc/-stable-RC}-src
+fi
+
+DESCRIPTION="Python Fitting Assistant - a ship fitting application for EVE Online"
+HOMEPAGE="http://www.evefit.org/Pyfa"
+SRC_URI="http://dl.evefit.org/stable/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-3 LGPL-2.1 CCPL-Attribution-2.5"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+graph"
+
+RDEPEND="dev-python/sqlalchemy
+ dev-python/wxpython
+ graph? ( dev-python/matplotlib[wxwidgets] dev-python/numpy )"
+DEPEND=${RDEPEND}
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-paths.patch"
+}
+
+src_install() {
+ newbin run.py ${PN} || die "newbin failed"
+ rm run.py
+ insinto "$(python_get_sitedir)/${PN}"
+ doins -r eos gui icons service *.py *.txt || die "doins failed"
+ insinto /usr/share/${PN}
+ doins -r staticdata || die "doins failed"
+ dodoc README || die "dodoc failed"
+ doicon icons/${PN}.png || die "doicon failed"
+ domenu "${FILESDIR}/${PN}.desktop" || die "domenu failed"
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}