diff options
Diffstat (limited to 'games-strategy/lightyears/files/lightyears-1.4-gentoo.patch')
-rw-r--r-- | games-strategy/lightyears/files/lightyears-1.4-gentoo.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch b/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch new file mode 100644 index 000000000000..063dbab3c1e8 --- /dev/null +++ b/games-strategy/lightyears/files/lightyears-1.4-gentoo.patch @@ -0,0 +1,45 @@ +--- lightyears ++++ lightyears +@@ -1,7 +1,6 @@ + #!/usr/bin/python + + # Set the location of the LightYears files here: +-LIGHTYEARS_DIR = "." + # LIGHTYEARS_DIR = "/usr/share/games/lightyears" # (for Debian) + + # Save games and configuration files are stored in the user's +@@ -10,31 +9,6 @@ + import sys, os + + if __name__ == "__main__": +- # Path to data/code dir can be overridden by environment variable +- LIGHTYEARS_DIR = os.environ.get("LIGHTYEARS_DIR", LIGHTYEARS_DIR) +- +- # Path does not exist? Try current directory. +- if ((LIGHTYEARS_DIR == None) +- or (not os.path.isdir(LIGHTYEARS_DIR)) +- or (not os.path.isfile(os.path.join(LIGHTYEARS_DIR, +- 'code', 'startup.py')))): +- LIGHTYEARS_DIR = os.getcwd() +- +- # Paths obtained +- sys.path.insert(0, os.path.join(LIGHTYEARS_DIR, 'code')) +- data_dir = os.path.join(LIGHTYEARS_DIR, 'data') +- +- # Go +- try: +- import startup +- assert os.path.isdir(data_dir) +- except: +- print "Unable to find LightYears code & data in:" +- for p in sys.path: +- print ' ', p +- +- sys.exit(1) +- +- startup.Main(data_dir) +- +- ++ sys.path.insert(0, "@GENTOO_LIBDIR@") ++ import startup ++ startup.Main("@GENTOO_DATADIR@/data") |