diff options
| author | David Kühling <dvdkhlng@gmx.de> | 2010-09-18 20:47:21 +0200 |
|---|---|---|
| committer | David Kühling <dvdkhlng@gmx.de> | 2010-09-18 20:47:21 +0200 |
| commit | 4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09 (patch) | |
| tree | 58590463ada82a27eca0889312c32450358249a8 /makfa/patches | |
| download | qipackages-fork-4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09.tar.gz | |
Major overhaul and cleanup. Support for .ubi image file installations.grafted
Only compile&install a minimum host Gforth for bootstrapping the target
Gforth, removing strange emacs-dependencies that cropped up earlier.
Image file can now be built on the nanonote using 'gforth-update-image'
command. Also, Gforth is now run through a wrapper that calls
'gforth-update-image' automatically, if necessary.
Also first attempts at supporting libcc C-interface libraries pre-compiled on
the host.
Tested to compile on amd64 and i386.
Diffstat (limited to 'makfa/patches')
| -rw-r--r-- | makfa/patches/00-pickle.patch | 63 | ||||
| -rw-r--r-- | makfa/patches/01-path.patch | 22 | ||||
| -rw-r--r-- | makfa/patches/02-pyexpat.patch | 18 |
3 files changed, 103 insertions, 0 deletions
diff --git a/makfa/patches/00-pickle.patch b/makfa/patches/00-pickle.patch new file mode 100644 index 0000000..a9b0eb5 --- /dev/null +++ b/makfa/patches/00-pickle.patch @@ -0,0 +1,63 @@ +diff --git a/makfa b/makfa +index af7a8b7..488007e 100755 +--- a/makfa ++++ b/makfa +@@ -296,19 +296,16 @@ class Update(object): + """Update dictionary.""" + + def __init__(self): +- self.parser = OptionParser(usage='makfa update [language]', ++ self.parser = OptionParser(usage='makfa update [language] [filename]', + description=self.__class__.__doc__) + + def parse(self, argv): + options, args = self.parser.parse_args(argv) + print 'Updating dictionary...' +- if args: +- try: +- Updater(args[0]) +- except SyntaxError: +- print 'Invalid language code.' +- else: +- Updater() ++ try: ++ Updater(*args) ++ except SyntaxError: ++ print 'Invalid language code.' + + + class Find(object): +@@ -488,7 +485,7 @@ class Type(Command): + + class Updater(object): + +- def __init__(self, lang='en'): ++ def __init__(self, lang='en', filename=os.path.expanduser('~/makfa.dump')): + self.db = {'order': [], 'entries': {}} + url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s' + tree = etree.parse(urllib.urlopen(url % lang)) +@@ -506,7 +503,7 @@ class Updater(object): + self.db['entries'][word]['places'][place] = [] + self.db['entries'][word]['places'][place]. \ + append((valsi.get('word'), sense)) +- pickle.dump(self.db, open(os.path.expanduser('~/.makfa.dump'), 'w'), -1) ++ pickle.dump(self.db, open(filename, 'w'), -1) + + def _save(self, valsi): + word = valsi.get('word') +@@ -618,12 +615,12 @@ class Filter(object): + + class Dictionary(object): + +- def __init__(self): ++ def __init__(self, filename=os.path.expanduser('~/makfa.dump')): + try: +- self._db = pickle.load(open(os.path.expanduser('~/.makfa.dump'))) ++ self._db = pickle.load(open(filename)) + except: + print >>sys.stderr, '(Fetching dictionary, this may take a minute.)' +- self._db = Updater().db ++ self._db = Updater(filename=filename).db + self._longest = max(map(len, self)) + + def definition(self, entry): diff --git a/makfa/patches/01-path.patch b/makfa/patches/01-path.patch new file mode 100644 index 0000000..2be15e8 --- /dev/null +++ b/makfa/patches/01-path.patch @@ -0,0 +1,22 @@ +diff --git a/makfa b/makfa +index 488007e..a19a5c8 100755 +--- a/makfa ++++ b/makfa +@@ -485,7 +485,7 @@ class Type(Command): + + class Updater(object): + +- def __init__(self, lang='en', filename=os.path.expanduser('~/makfa.dump')): ++ def __init__(self, lang='en', filename='/usr/share/makfa/makfa.dump'): + self.db = {'order': [], 'entries': {}} + url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s' + tree = etree.parse(urllib.urlopen(url % lang)) +@@ -615,7 +615,7 @@ class Filter(object): + + class Dictionary(object): + +- def __init__(self, filename=os.path.expanduser('~/makfa.dump')): ++ def __init__(self, filename='/usr/share/makfa/makfa.dump'): + try: + self._db = pickle.load(open(filename)) + except: diff --git a/makfa/patches/02-pyexpat.patch b/makfa/patches/02-pyexpat.patch new file mode 100644 index 0000000..47bf510 --- /dev/null +++ b/makfa/patches/02-pyexpat.patch @@ -0,0 +1,18 @@ +--- a/makfa 2010-09-14 20:40:00.000000000 -0600 ++++ b/makfa 2010-09-14 20:37:31.000000000 -0600 +@@ -8,7 +8,6 @@ + import sys + import textwrap + import urllib +-import xml.etree.cElementTree as etree + + + +@@ -486,6 +485,7 @@ + class Updater(object): + + def __init__(self, lang='en', filename='/usr/share/makfa/makfa.dump'): ++ import xml.etree.cElementTree as etree + self.db = {'order': [], 'entries': {}} + url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s' + tree = etree.parse(urllib.urlopen(url % lang)) |
