Mercurial > gub
changeset 255:d39902f0d9cb
Build numbers, inactive.
author | janneke <janneke@gnu.org> |
---|---|
date | Sat, 17 Dec 2005 21:33:26 +0100 |
parents | 5f0e3838bde6 |
children | 42420350d064 |
files | GNUmakefile driver.py specs/cpm.py specs/framework.py specs/gub.py specs/mingw.py |
diffstat | 6 files changed, 66 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- a/GNUmakefile Sat Dec 17 21:31:08 2005 +0100 +++ b/GNUmakefile Sat Dec 17 21:33:26 2005 +0100 @@ -61,4 +61,10 @@ ./cyg-apt.py list gpm-install: test-gub + mkdir -p target/i686-mingw32/status + mkdir -p target/i686-mingw32/tools + tar -C target/i686-mingw32/tools -xzf uploads/gub/binutils-2.16.1-0.i486-linux-gnu-i686-mingw32.gub + touch target/i686-mingw32/status/binutils-2.16.1-0-{untar,patch,configure,compile,install,package,sysinstall} + tar -C target/i686-mingw32/tools -xzf uploads/gub/gcc-3.4.5-0.i486-linux-gnu-i686-mingw32.gub + touch target/i686-mingw32/status/gcc-3.4.5-0-{untar,patch,configure,compile,install,package,sysinstall} ./cyg-apt.py install $$(./cyg-apt.py available)
--- a/driver.py Sat Dec 17 21:31:08 2005 +0100 +++ b/driver.py Sat Dec 17 21:33:26 2005 +0100 @@ -13,18 +13,6 @@ import gub import framework -def grok_sh_variables (self, file): - dict = {} - for i in open (file).readlines (): - m = re.search ('^(\w+)\s*=\s*(\w*)', i) - if m: - k = m.group (1) - s = m.group (2) - dict[k] = s - - return dict - - class Settings: def __init__ (self, arch): self.target_gcc_flags = '' @@ -179,20 +167,10 @@ init = { 'darwin': 'powerpc-apple-darwin7', 'mingw': 'i686-mingw32', - 'xmingw': 'i586-mingw32msvc', - 'xmingw-fedora': 'i386-mingw32', 'linux': 'linux' }[platform] settings = Settings (init) - if platform == 'mingw': - settings.system_target_architecture = 'i586-mingw32msvc' - settings.system_toolprefix = settings.system_target_architecture + '-' - if platform == 'mingw-fedora': - platform = 'mingw' - settings.system_target_architecture = 'i386-mingw32' - settings.system_toolprefix = settings.system_target_architecture + '-' - settings.platform = platform if platform == 'darwin':
--- a/specs/cpm.py Sat Dec 17 21:31:08 2005 +0100 +++ b/specs/cpm.py Sat Dec 17 21:33:26 2005 +0100 @@ -241,7 +241,7 @@ packages = self.read_setup_ini (setup_ini) for name in packages.keys (): if name not in self.installed ().keys (): - s += '\n@ ' + packages[name] + s += '\n\n@ ' + packages[name] for name in self.installed ().keys (): Name = name[0].upper () + name[1:]
--- a/specs/framework.py Sat Dec 17 21:31:08 2005 +0100 +++ b/specs/framework.py Sat Dec 17 21:33:26 2005 +0100 @@ -94,7 +94,6 @@ chmod 755 %(install_root)s/usr/bin/* ''') - class Gmp (gub.Target_package): def patch (self): self.system (''' @@ -225,15 +224,22 @@ def configure_command (self): ## FIXME: pickup $target-guile-config - cmd = 'PATH=%(system_root)s/usr/bin:$PATH ' + return ('PATH=%(system_root)s/usr/bin:$PATH ' + + gub.Target_package.configure_command (self) + + ' --disable-documentation') - cmd += gub.Target_package.configure_command (self) - cmd += ' --disable-documentation' - return cmd - def clean (self): - # don't throw CVS directory. - pass - + def name_version (self): + # whugh + if os.path.exists (self.srcdir ()): + d = gub.grok_sh_variables (self.srcdir () + '/VERSION') + return 'lilypond-%(MAJOR_VERSION)s.%(MINOR_VERSION)s.%(PATCH_LEVEL)s' % d + return gub.Target_package.name_version (self) + + def gub_name (self): + nv = self.name_version () + b = self.build () + return '%(nv)s-%(b)s.%(platform)s.gub' + class LilyPond__mingw (LilyPond): def __init__ (self, settings): LilyPond.__init__ (self, copy.deepcopy (settings)) @@ -380,24 +386,6 @@ + ' --disable-csharp' class Gettext__mingw (Gettext): - # using gcc-3.4.5 - def xx__init__ (self, settings): - Gettext.__init__ (self, copy.deepcopy (settings)) - # gettext-0.14.1-1 does not compile with gcc-4.0.2 - self.settings.tool_prefix = self.settings.system_toolprefix - - def mingw_org_untar (self): - Gettext.untar (self) - broken_untar_dir = re.sub ('-200.*', '', - '%(srcdir)s' % self.package_dict ()) - - self.system (''' -mv %(broken_untar_dir)s %(srcdir)s -''', locals ()) - - def xxpatch (self): - Gettext.autoupdate (self) - def config_cache_overrides (self, str): return re.sub ('ac_cv_func_select=yes', 'ac_cv_func_select=no', str) \ @@ -704,4 +692,3 @@ } return installers[settings.platform] -
--- a/specs/gub.py Sat Dec 17 21:31:08 2005 +0100 +++ b/specs/gub.py Sat Dec 17 21:33:26 2005 +0100 @@ -4,6 +4,7 @@ import download import glob +import pickle import os import re import string @@ -15,6 +16,16 @@ log_file = None +def grok_sh_variables (file): + dict = {} + for i in open (file).readlines (): + m = re.search ('^(\w+)\s*=\s*(\w*)', i) + if m: + k = m.group (1) + s = m.group (2) + dict[k] = s + return dict + def now (): return time.asctime (time.localtime ()) @@ -110,6 +121,7 @@ self.settings = settings self.url = '' self.download = self.wget + self.build_db = self.settings.topdir + '/.build_db.pickle' def package_dict (self, env={}): dict = self.settings.get_substitution_dict () @@ -220,7 +232,19 @@ def version (self): return cpm.split_version (self.ball_version)[0] + def name_version (self): + return '%s-%s' % (self.name (), self.version ()) + + def get_builds (self): + if os.path.exists (self.build_db): + return pickle.load (open (self.build_db)) + return {} + def build (self): + k = self.name_version () + builds = self.get_builds () + if builds.has_key (k): + return builds[k] return cpm.split_version (self.ball_version)[-1] def srcdir (self): @@ -238,7 +262,7 @@ def done (self, stage): return ('%(statusdir)s/%(name)s-%(version)s-%(build)s-%(stage)s' % self.package_dict (locals ())) - + def is_done (self, stage): return os.path.exists (self.done (stage)) @@ -357,6 +381,21 @@ self.system (''' cp -pv %(uploads)s/setup.ini %(system_root)s/etc/setup/ ''') + # FIXME: should do this right after successful package () + # but then sysinstall uses bumped version number + builds = self.get_builds () + + ## Hmm, when/how to bump build number? Manually? + ## Cygwin just uses the -BUILD from the srcdir name, + ## bumping is done my mv'ing the srcdir to -BUILD+1 + + ## Bumping here does not work, it will trigger a + ## rebuild each time, because we save a higher build + ## version than we have installed and in status/* files. + ##builds[self.name_version ()] = '%d' % (int (self.build ()) + 1) + + builds[self.name_version ()] = '%d' % (int (self.build ()) + 0) + pickle.dump (builds, open (self.build_db, 'w')) def clean (self): self.system ('''echo rm -rf %(srcdir)s %(builddir)s %(install_root)s @@ -383,6 +422,9 @@ d.update (locals ()) self.url = mirror () % d self.download = lambda : download (self) + if self.download == self.cvs: + # preserve CVS checkouts + self.clean = self.skip def with (self, version='HEAD', mirror=download.gnu, format='gz', download=wget, depends=[]): self.ball_version = version
--- a/specs/mingw.py Sat Dec 17 21:31:08 2005 +0100 +++ b/specs/mingw.py Sat Dec 17 21:33:26 2005 +0100 @@ -54,7 +54,7 @@ class Gs (gub.Binary_package): def untar (self): gub.Binary_package.untar (self) - self.system ('cd %(srcdir)s && mv root/gs-%(version)s-%(build)s/* .') + self.system ('cd %(srcdir)s && mv root/gs-%(ball_version)s/* .') def install (self): gs_prefix = '/usr/share/gs'