summaryrefslogtreecommitdiff
path: root/games-util/pyfa
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-util/pyfa
reinit the tree, so we can have metadata
Diffstat (limited to 'games-util/pyfa')
-rw-r--r--games-util/pyfa/Manifest12
-rw-r--r--games-util/pyfa/files/configforced-1.15.1.py4
-rw-r--r--games-util/pyfa/files/pyfa-1.15.1-import-pyfa.patch27
-rw-r--r--games-util/pyfa/files/pyfa-1.15.1-staticdata.patch61
-rw-r--r--games-util/pyfa/files/pyfa-1.20.2-html-export-path.patch33
-rw-r--r--games-util/pyfa/files/pyfa-1.21.4-html-export-path.patch33
-rw-r--r--games-util/pyfa/files/pyfa.desktop8
-rw-r--r--games-util/pyfa/metadata.xml20
-rw-r--r--games-util/pyfa/pyfa-1.21.3.ebuild104
-rw-r--r--games-util/pyfa/pyfa-9999.ebuild104
10 files changed, 406 insertions, 0 deletions
diff --git a/games-util/pyfa/Manifest b/games-util/pyfa/Manifest
new file mode 100644
index 000000000000..b29cecdbf8dc
--- /dev/null
+++ b/games-util/pyfa/Manifest
@@ -0,0 +1,12 @@
+AUX configforced-1.15.1.py 153 SHA256 07ae0cfb8272f94146c4df113538574ced6920697d14243cf3a89801ed7788f6 SHA512 632576b9fbff3e93c26b6c2d4be74298aa8657affe82d2c5d571a645d733a7b96d5db6b89b819d3aec9ca68e4bef11e368f7c1cbac416e9bfed88a1025a46bfe WHIRLPOOL 0a6c91e5f093285ac9e3f2b8a7344e6c8603ac13f9845cb5523216ebd9a46b0b4948ff62ba74238dd1736e003a98bd78ffc5a802ed7f83774f1abb93cc6cd491
+AUX pyfa-1.15.1-import-pyfa.patch 590 SHA256 1bc8160c42ead9c4e8610ce858d3e584bdb479643dc9aaa52725e2702196c15f SHA512 2e0088a4a82fadb399f58faa5d7fec8a6a2f0471fad91a103cc486c249fde019dad4fc955b19ae8b19b239a864cf1e09574a4f6af965faa78efb0abe9b46ecf3 WHIRLPOOL 34160870583dd3d435c2dcd1b751b73978ab5fdef0a96280f66c498d6d48bd1894b9158c0f14ee1021d2e8ab7470cb689ca4f6f2c7048055951f117006b926eb
+AUX pyfa-1.15.1-staticdata.patch 1740 SHA256 5316688fe931f83f1b924fd1fcb463ae8f527cbe7f0b85e26f267c07d1281463 SHA512 be6fffc663f0b8fd12ad9414244cd1f411b47535065fd8209ccf37b8cbb4422bef9c51606a1d2442a1ef97f0218ddc0f472527eb2a40952497c4ab3a76aa2134 WHIRLPOOL a5601d3653db81aff0cb47effc01f72e7ecdd69935592e9d3d1314a5d9c812d4a8b104cc61a47ea6fe7aaa8b87be1b6f9b17448e7b59aca830d4625da82e9e16
+AUX pyfa-1.20.2-html-export-path.patch 1259 SHA256 f9093158596ec411337107f8da1f7e646fd98e1aa940d6b1ebd656499ac15c31 SHA512 b294ed71d3be9533f182a43e99a1019e3b9a32f33ffdac9accae98f74345483504549567259472a8a082a2f540bd5264294ea604af1221f30821127d5b0771e0 WHIRLPOOL e80a42493ef3bc07b945134f6a3948b6f36ad5c2569e1ce6510e69d7faba81f73f4d836650ed939d9f591dd8bec4c7c6ddbafc2b9e06ab73a7b96ab5ea46c9f2
+AUX pyfa-1.21.4-html-export-path.patch 1295 SHA256 05e08bb447f03bbfef79091cf5da0dcca63d14f7ec46e3806417e3bb7403e472 SHA512 c67f8a276d13eb39d722d28640a3e17cc8aa971f088256674f925b4b403cfec7a7857cb7150c4b04fa2dbc66318bea5b722c6185c0c9e02671e6af7515642ecf WHIRLPOOL db37aa2746b1b3faaf1dbf9e81eaf62d4178c6b4697c3089bc6f208fe58ea20ab92f1184b1c23c5ede506c90e121c0a07d43b720f1440ceeb61fca74039b2c94
+AUX pyfa.desktop 155 SHA256 c395891d87eaaac64e3ba7954d623efaf161d906527099ed4b0c680c63a041eb SHA512 d62a44e4e724057581a360cc1eb10aa4c7a0c50cb1d95137e58ba14db17644c852da2582be8d508c50b7359e7f99dc893d78d15cb11c46967a9b7896ff667781 WHIRLPOOL 3f68f0cd6942380fc040a3578b054ea7cdb86fbd751ed17aa1fe1e1eda3c7ee6c35645c28c6529605856d5e74765ccd7037abe96c3efe2a5a54cc7fcb6c53793
+DIST pyfa-1.21.3.tar.gz 7793523 SHA256 4ac79598f2e605ba7d5cd29cfef7a94f426d4cd9e934d13cbb2071afd566de3c SHA512 b5a691873421ef2d3b01d8bfd7121c63f07b96c75837fd3b93a5b77b8163943336dcd5bb85f8dcc056ce61b5103d5331afd5a81c09eb06a7050112b5d1a26681 WHIRLPOOL 65d6c9a52f4076d9be620aa3ac2ec5da23aaff32c547925b34480f7fc82ef9334fa737374419f0bf1bd827b3c6e0f34306c0d5de1dc6d441e88e096fd8aadc13
+EBUILD pyfa-1.21.3.ebuild 2771 SHA256 3a187ee43b499ea3074ff9e1d4589fd8eec0b92a99c04957767e18379176f792 SHA512 666063dc166c96c82101e6a2d2b1de73882528784a9a82f6c16ea770facbdff763ea7364f54004d595f5c6fb1511d1dceb5da16b7ead76febce076f4a5d38233 WHIRLPOOL 0064a763c60cd1c7abc67e8b9546388aeae3035986f295344bb58813d665ab48e8125ed70d6250bdaf6f0abb7174034c7d9a87830774d09534c2396410b68705
+EBUILD pyfa-9999.ebuild 2771 SHA256 b9dd64ff29ed58d060a1c20f7ec448c0f1328ecbdf4da39deac7eb510a665aec SHA512 0aef3545089deafbdc52a1ceed41602949a5a30bcd6e6d0512cd0bfc7bb8b564a6b262c3b3bbea6ec6ec02926d65e57e2f730f3eb1052ff44a9bedaf60610af0 WHIRLPOOL 1fae84c5a744b4ce134529af5fefb181c81e1223b2c8a5fe716dd6f178612c0825368108876631df5a9ce76ebc470170abbd47c4f4d20c230d9be7dce2c28c1c
+MISC ChangeLog 4721 SHA256 a024f7bffc96034a55ce735344350f593a0c95a97ebd2e9d6b99402fa9675d5e SHA512 eb6a16366ba996e99411892cf6f19f4ebdbff0996e59da5d4312006fe9150081f3df5bfd25fdad468ee8951dde1084c767ad8c353701bcff4f476ea9552fc2b4 WHIRLPOOL 7726c965f991cb25f127b2ff02a6268fda701f2c554a9578e3389c9df5991bcc0a0880182fb7b1ad7ef1785cda78519870e56bb392296f9431c22d88d8d7187a
+MISC ChangeLog-2015 7528 SHA256 6885426d9198c460a12f8199364898e94f6954678e31773618c20d8708b8f8e3 SHA512 f0d56186c9be334021ba9e4467a5eb549a598b201ba4d515e4006d9c0bc7957f08d4a540b7305a0104a8c7c161f3308c115a267d3d99ac400aea71e5dccbb674 WHIRLPOOL 0c8d74f85d19cfff46ea8a9d4fb917e3bfb007a42b8e2f3bb74f3710619cb2df1c9dba6e3e2e7ded8f445f3e85e0e78729cd9e834049d443baf84a20a935b302
+MISC metadata.xml 707 SHA256 ad9e71bfafb16b320bbebe6f7bd05fbd9e6c887ff4d8f64a6860f09efd6ac4d9 SHA512 73271ded60ce9b02d625f15b19ff7d8737ade6986eb8ea207d3c4d9720789660f65f7c494de8b37af9d59e6c753b2ef9b3c36ccfa96443825326842a89439863 WHIRLPOOL fffe65d3b087750ab3dd52b15cc21068d8c37e8ac57a55abc2d416140474cbc68947d676bd0b0a6225711ee05ce117a8996e48d29c94096effc07b730290ca9c
diff --git a/games-util/pyfa/files/configforced-1.15.1.py b/games-util/pyfa/files/configforced-1.15.1.py
new file mode 100644
index 000000000000..51fcb958cedc
--- /dev/null
+++ b/games-util/pyfa/files/configforced-1.15.1.py
@@ -0,0 +1,4 @@
+# Gentoo-specific settings
+pyfaPath = u'%%SITEDIR%%/pyfa'
+gameDB = u'%%EPREFIX%%/usr/share/pyfa/eve.db'
+imgsZIP = u'%%EPREFIX%%/usr/share/pyfa/imgs.zip'
diff --git a/games-util/pyfa/files/pyfa-1.15.1-import-pyfa.patch b/games-util/pyfa/files/pyfa-1.15.1-import-pyfa.patch
new file mode 100644
index 000000000000..f29b75d7fea0
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.15.1-import-pyfa.patch
@@ -0,0 +1,27 @@
+From 6c7b6ab7d1aae47d3a3f72a7951c7de294be2917 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 6 Oct 2015 22:16:38 -0400
+Subject: [PATCH] Append $(python_get_sitedir)/pyfa to import path
+
+Ensures that pyfa's import statements continue to work for systemwide
+installation.
+---
+ pyfa.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pyfa.py b/pyfa.py
+index 8189918..7b81f10 100755
+--- a/pyfa.py
++++ b/pyfa.py
+@@ -20,6 +20,8 @@
+
+ import sys
+ import re
++import os
++sys.path.append(os.path.join("%%SITEDIR%%", "pyfa"))
+ import config
+
+
+--
+2.6.0
+
diff --git a/games-util/pyfa/files/pyfa-1.15.1-staticdata.patch b/games-util/pyfa/files/pyfa-1.15.1-staticdata.patch
new file mode 100644
index 000000000000..8b8fa913070a
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.15.1-staticdata.patch
@@ -0,0 +1,61 @@
+From c7bb5210ce9feebb753734b5c581acca9f5c9d06 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 6 Oct 2015 21:37:44 -0400
+Subject: [PATCH] make gameDB and imgs.zip paths settable from configforced
+
+---
+ config.py | 10 +++++++++-
+ gui/bitmapLoader.py | 2 +-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/config.py b/config.py
+index 4072236..a9e71ee 100644
+--- a/config.py
++++ b/config.py
+@@ -28,6 +28,7 @@ pyfaPath = None
+ savePath = None
+ saveDB = None
+ gameDB = None
++imgsZIP = None
+
+
+ class StreamToLogger(object):
+@@ -66,6 +67,7 @@ def defPaths():
+ global savePath
+ global saveDB
+ global gameDB
++ global imgsZIP
+ global saveInRoot
+
+ if debug:
+@@ -117,7 +119,13 @@ def defPaths():
+ # The database where the static EVE data from the datadump is kept.
+ # This is not the standard sqlite datadump but a modified version created by eos
+ # maintenance script
+- gameDB = os.path.join(pyfaPath, "eve.db")
++ gameDB = getattr(configforced, "gameDB", None)
++ if gameDB is None:
++ gameDB = os.path.join(pyfaPath, "eve.db")
++
++ imgsZIP = getattr(configforced, "imgsZIP", None)
++ if imgsZIP is None:
++ imgsZIP = os.path.join(pyfaPath, "imgs.zip")
+
+ ## DON'T MODIFY ANYTHING BELOW ##
+ import eos.config
+diff --git a/gui/bitmapLoader.py b/gui/bitmapLoader.py
+index 45026be..02985c1 100644
+--- a/gui/bitmapLoader.py
++++ b/gui/bitmapLoader.py
+@@ -31,7 +31,7 @@ except ImportError:
+ class BitmapLoader():
+
+ try:
+- archive = zipfile.ZipFile(os.path.join(config.pyfaPath, 'imgs.zip'), 'r')
++ archive = zipfile.ZipFile(config.imgsZIP, 'r')
+ except IOError:
+ archive = None
+
+--
+2.6.0
+
diff --git a/games-util/pyfa/files/pyfa-1.20.2-html-export-path.patch b/games-util/pyfa/files/pyfa-1.20.2-html-export-path.patch
new file mode 100644
index 000000000000..b06906a83b58
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.20.2-html-export-path.patch
@@ -0,0 +1,33 @@
+From dc07b64245459ff75c638dedc14ac86bdf9bc176 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Mon, 16 Jul 2012 05:43:38 -0400
+Subject: [PATCH] Export fits to home directory, not python sitedir
+
+---
+ service/settings.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/service/settings.py b/service/settings.py
+index 60627e6..7087e5c 100644
+--- a/service/settings.py
++++ b/service/settings.py
+@@ -21,6 +21,7 @@ import cPickle
+ import os.path
+ import config
+ import urllib2
++import sys
+
+ class SettingsProvider():
+ BASE_PATH = os.path.join(config.savePath, "settings")
+@@ -221,7 +222,7 @@ class HTMLExportSettings():
+ return cls._instance
+
+ def __init__(self):
+- serviceHTMLExportDefaultSettings = {"enabled": False, "path": config.pyfaPath + os.sep + 'pyfaFits.html', "website": "null-sec.com" }
++ serviceHTMLExportDefaultSettings = {"enabled": False, "path": unicode(os.path.expanduser(os.path.join('~', 'pyfaFits.html')), sys.getfilesystemencoding()), "website": "null-sec.com" }
+ self.serviceHTMLExportSettings = SettingsProvider.getInstance().getSettings("pyfaServiceHTMLExportSettings", serviceHTMLExportDefaultSettings)
+
+ def getEnabled(self):
+--
+2.8.1
+
diff --git a/games-util/pyfa/files/pyfa-1.21.4-html-export-path.patch b/games-util/pyfa/files/pyfa-1.21.4-html-export-path.patch
new file mode 100644
index 000000000000..f35dfcbd2d98
--- /dev/null
+++ b/games-util/pyfa/files/pyfa-1.21.4-html-export-path.patch
@@ -0,0 +1,33 @@
+From a596f7f5398f613a607ecc91e06ea651806b8b63 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Mon, 16 Jul 2012 05:43:38 -0400
+Subject: [PATCH] Export fits to home directory, not python sitedir
+
+---
+ service/settings.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/service/settings.py b/service/settings.py
+index cd1b33b..a883ca1 100644
+--- a/service/settings.py
++++ b/service/settings.py
+@@ -21,6 +21,7 @@ import cPickle
+ import os.path
+ import config
+ import urllib2
++import sys
+
+ class SettingsProvider():
+ BASE_PATH = os.path.join(config.savePath, "settings")
+@@ -221,7 +222,7 @@ class HTMLExportSettings():
+ return cls._instance
+
+ def __init__(self):
+- serviceHTMLExportDefaultSettings = {"enabled": False, "path": config.pyfaPath + os.sep + 'pyfaFits.html', "website": "null-sec.com", "minimal": False }
++ serviceHTMLExportDefaultSettings = {"enabled": False, "path": unicode(os.path.expanduser(os.path.join('~', 'pyfaFits.html')), sys.getfilesystemencoding()), "website": "null-sec.com", "minimal": False }
+ self.serviceHTMLExportSettings = SettingsProvider.getInstance().getSettings("pyfaServiceHTMLExportSettings", serviceHTMLExportDefaultSettings)
+
+ def getEnabled(self):
+--
+2.8.3
+
diff --git a/games-util/pyfa/files/pyfa.desktop b/games-util/pyfa/files/pyfa.desktop
new file mode 100644
index 000000000000..07f3f0ee22a7
--- /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 000000000000..2c0b85a4e6ef
--- /dev/null
+++ b/games-util/pyfa/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tetromino@gentoo.org</email>
+ <name>Alexandre Rostovtsev</name>
+ </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>
+ <upstream>
+ <remote-id type="github">pyfa-org/Pyfa</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-util/pyfa/pyfa-1.21.3.ebuild b/games-util/pyfa/pyfa-1.21.3.ebuild
new file mode 100644
index 000000000000..ea133f7beb13
--- /dev/null
+++ b/games-util/pyfa/pyfa-1.21.3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,threads"
+
+inherit eutils gnome2-utils python-r1
+
+DESCRIPTION="Python Fitting Assistant - a ship fitting application for EVE Online"
+HOMEPAGE="https://github.com/pyfa-org/Pyfa"
+
+LICENSE="GPL-3+ LGPL-2.1+ CC-BY-2.5 free-noncomm"
+SLOT="0"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/pyfa-org/Pyfa.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/pyfa-org/Pyfa/archive/v${PV}.tar.gz -> pyfa-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+IUSE="+graph"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/wxpython:3.0[${PYTHON_USEDEP}]
+ graph? (
+ dev-python/matplotlib[wxwidgets,${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}] )
+ ${PYTHON_DEPS}"
+DEPEND="app-arch/zip"
+
+[[ ${PV} = 9999 ]] || S=${WORKDIR}/Pyfa-${PV}
+
+src_prepare() {
+ # get rid of CRLF line endings introduced in 1.1.10 so patches work
+ edos2unix config.py pyfa.py service/settings.py
+
+ # load gameDB and images from separate staticdata directory
+ eapply "${FILESDIR}/${PN}-1.15.1-staticdata.patch"
+
+ # do not try to save exported html to python sitedir
+ eapply "${FILESDIR}/${PN}-1.20.2-html-export-path.patch"
+
+ # fix import path in the main script for systemwide installation
+ eapply "${FILESDIR}/${PN}-1.15.1-import-pyfa.patch"
+
+ eapply_user
+
+ touch __init__.py
+
+ pyfa_make_configforced() {
+ mkdir -p "${BUILD_DIR}" || die
+ sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
+ -e "s:%%EPREFIX%%:${EPREFIX}:" \
+ "${FILESDIR}/configforced-1.15.1.py" > "${BUILD_DIR}/configforced.py"
+ sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
+ pyfa.py > "${BUILD_DIR}/pyfa"
+ }
+ python_foreach_impl pyfa_make_configforced
+}
+
+src_install() {
+ pyfa_py_install() {
+ local packagedir=$(python_get_sitedir)/${PN}
+ insinto "${packagedir}"
+ doins -r eos gui service utils config*.py __init__.py
+ [[ -e info.py ]] && doins info.py # only in zip releases
+ doins "${BUILD_DIR}/configforced.py"
+ python_doscript "${BUILD_DIR}/pyfa"
+ python_optimize
+ }
+ python_foreach_impl pyfa_py_install
+
+ insinto /usr/share/${PN}
+ doins eve.db
+
+ einfo "Compressing images ..."
+ pushd imgs > /dev/null || die
+ zip -r imgs.zip * || die "zip failed"
+ doins imgs.zip
+ popd > /dev/null || die
+
+ dodoc README.md
+ insinto /usr/share/icons/hicolor/32x32/apps
+ doins imgs/gui/pyfa.png
+ insinto /usr/share/icons/hicolor/64x64/apps
+ newins imgs/gui/pyfa64.png pyfa.png
+ domenu "${FILESDIR}/${PN}.desktop"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-util/pyfa/pyfa-9999.ebuild b/games-util/pyfa/pyfa-9999.ebuild
new file mode 100644
index 000000000000..2fa0e26c3620
--- /dev/null
+++ b/games-util/pyfa/pyfa-9999.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite,threads"
+
+inherit eutils gnome2-utils python-r1
+
+DESCRIPTION="Python Fitting Assistant - a ship fitting application for EVE Online"
+HOMEPAGE="https://github.com/pyfa-org/Pyfa"
+
+LICENSE="GPL-3+ LGPL-2.1+ CC-BY-2.5 free-noncomm"
+SLOT="0"
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/pyfa-org/Pyfa.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/pyfa-org/Pyfa/archive/v${PV}.tar.gz -> pyfa-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~x86"
+fi
+IUSE="+graph"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/wxpython:3.0[${PYTHON_USEDEP}]
+ graph? (
+ dev-python/matplotlib[wxwidgets,${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}] )
+ ${PYTHON_DEPS}"
+DEPEND="app-arch/zip"
+
+[[ ${PV} = 9999 ]] || S=${WORKDIR}/Pyfa-${PV}
+
+src_prepare() {
+ # get rid of CRLF line endings introduced in 1.1.10 so patches work
+ edos2unix config.py pyfa.py service/settings.py
+
+ # load gameDB and images from separate staticdata directory
+ eapply "${FILESDIR}/${PN}-1.15.1-staticdata.patch"
+
+ # do not try to save exported html to python sitedir
+ eapply "${FILESDIR}/${PN}-1.21.4-html-export-path.patch"
+
+ # fix import path in the main script for systemwide installation
+ eapply "${FILESDIR}/${PN}-1.15.1-import-pyfa.patch"
+
+ eapply_user
+
+ touch __init__.py
+
+ pyfa_make_configforced() {
+ mkdir -p "${BUILD_DIR}" || die
+ sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
+ -e "s:%%EPREFIX%%:${EPREFIX}:" \
+ "${FILESDIR}/configforced-1.15.1.py" > "${BUILD_DIR}/configforced.py"
+ sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" \
+ pyfa.py > "${BUILD_DIR}/pyfa"
+ }
+ python_foreach_impl pyfa_make_configforced
+}
+
+src_install() {
+ pyfa_py_install() {
+ local packagedir=$(python_get_sitedir)/${PN}
+ insinto "${packagedir}"
+ doins -r eos gui service utils config*.py __init__.py
+ [[ -e info.py ]] && doins info.py # only in zip releases
+ doins "${BUILD_DIR}/configforced.py"
+ python_doscript "${BUILD_DIR}/pyfa"
+ python_optimize
+ }
+ python_foreach_impl pyfa_py_install
+
+ insinto /usr/share/${PN}
+ doins eve.db
+
+ einfo "Compressing images ..."
+ pushd imgs > /dev/null || die
+ zip -r imgs.zip * || die "zip failed"
+ doins imgs.zip
+ popd > /dev/null || die
+
+ dodoc README.md
+ insinto /usr/share/icons/hicolor/32x32/apps
+ doins imgs/gui/pyfa.png
+ insinto /usr/share/icons/hicolor/64x64/apps
+ newins imgs/gui/pyfa64.png pyfa.png
+ domenu "${FILESDIR}/${PN}.desktop"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}