summaryrefslogtreecommitdiff
path: root/games-util/pyfa/files
diff options
context:
space:
mode:
Diffstat (limited to 'games-util/pyfa/files')
-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
6 files changed, 166 insertions, 0 deletions
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