Mercurial > gub
changeset 5703:4a71efdff50b
python3: updates.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Tue, 29 Sep 2009 12:39:36 +0200 |
parents | b9908969d0e2 |
children | 7328ad6457bf |
files | bin/cygwin-packager bin/gib gub/misc.py gub/runner.py gub/specs/cmake.py gub/specs/cygwin/texlive.py gub/specs/dhcp.py gub/specs/linux-arm-softfloat/glibc-core.py gub/specs/linux-arm-softfloat/glibc.py gub/specs/noweb.py gub/specs/openoffice.py gub/specs/root-image.py gub/specs/texlive.py |
diffstat | 13 files changed, 89 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/cygwin-packager Tue Sep 29 12:23:14 2009 +0200 +++ b/bin/cygwin-packager Tue Sep 29 12:39:36 2009 +0200 @@ -34,6 +34,9 @@ import optparse import os import re +import sys +if sys.version.startswith ('3'): + from functools import reduce # from gub import context from gub import cygwin
--- a/bin/gib Tue Sep 29 12:23:14 2009 +0200 +++ b/bin/gib Tue Sep 29 12:39:36 2009 +0200 @@ -141,12 +141,13 @@ available[s] () installer_file = installer_obj.installer_file ().replace (os.getcwd () + '/', '') logger.write_log ('installer left in: %(installer_file)s\n' % locals (), 'info') - except installer.ChecksumShortCircuit, exc: - logger.write_log ('*** checksum matches: no rebuild necessary\n', 'stage') - checksum_file = exc.file - logger.write_log ('checksum file: %(checksum_file)s\n' % locals (), 'info') - return - + except: + t, v, b = sys.exc_info () + if t == installer.ChecksumShortCircuit: + logger.write_log ('*** checksum matches: no rebuild necessary\n', 'stage') + checksum_file = v.file + logger.write_log ('checksum file: %(checksum_file)s\n' % locals (), 'info') + return installer_obj.connect_command_runner (None) def main (): @@ -171,9 +172,9 @@ installer_obj = installer.get_installer (settings, args, db, branch_dict) try: build_installer (installer_obj) - except locker.LockedError, locked: + except locker.LockedError: + logging.error ('another build in progress. Skipping.') if options.skip_if_locked: - logging.error ('skipping build; install_root is locked\n') sys.exit (0) raise logging.stage ('done\n')
--- a/gub/misc.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/misc.py Tue Sep 29 12:39:36 2009 +0200 @@ -8,6 +8,8 @@ import time import traceback import urllib2 +if sys.version.startswith ('3'): + from functools import reduce # from gub.syntax import printf, function_get_class, function_set_class, next from gub import octal
--- a/gub/runner.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/runner.py Tue Sep 29 12:39:36 2009 +0200 @@ -184,7 +184,8 @@ if sys.version.startswith ('3'): def str_append (x): result.append (str (x)) - map (lambda x: x.checksum (str_append), self._deferred_commands) + for i in self._deferred_commands: + i.checksum (str_append) else: list (map (lambda x: x.checksum (result.append), self._deferred_commands)) return '\n'.join (result)
--- a/gub/specs/cmake.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/cmake.py Tue Sep 29 12:39:36 2009 +0200 @@ -1,3 +1,4 @@ +''' %_mingw32_cmake %{_mingw32_env} ; \ cmake -DCMAKE_SYSTEM_NAME="Windows" @@ -24,3 +25,4 @@ -DQT_INCLUDE_DIR="%{_mingw32_includedir}" -DQT_QTCORE_INCLUDE_DIR="%{_mingw32_includedir}/QtCore" -DQT_QTGUI_INCLUDE_DIR="%{_mingw32_includedir}/QtGui" +'''
--- a/gub/specs/cygwin/texlive.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/cygwin/texlive.py Tue Sep 29 12:39:36 2009 +0200 @@ -16,8 +16,8 @@ ac_cv_func_vfork_works=${ac_cv_func_vfork_works=yes} xdvi_cv_setsid_in_vfork=${xdvi_cv_setsid_in_vfork=yes} lt_cv_cc_dll_switch=${lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles"} -''') - dependencies = gup.gub_to_distro_deps (lilypond.LilyPond.dependencies, +''' + dependencies = gup.gub_to_distro_deps (texlive.Texlive.dependencies, cygwin.gub_to_distro_dict) def patch (self): # FIXME: duh: cross-compile auto-enables t1lib
--- a/gub/specs/dhcp.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/dhcp.py Tue Sep 29 12:39:36 2009 +0200 @@ -1,3 +1,4 @@ +from gub import misc from gub import target class Dhcp (target.AutoBuild): @@ -6,7 +7,6 @@ srcdir_build_broken = True subpackage_names = [''] configure_command = '%(srcdir)s/configure linux-2.2' - from gub import misc make_flags = misc.join_lines (''' CC=%(toolchain_prefix)sgcc AR=%(toolchain_prefix)sar
--- a/gub/specs/linux-arm-softfloat/glibc-core.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/linux-arm-softfloat/glibc-core.py Tue Sep 29 12:39:36 2009 +0200 @@ -9,4 +9,4 @@ cd %(srcdir)s && patch -p1 < %(patchdir)s/glibc-2.3-linux-2.4.23-arm-bus-isa.patch ''') configure_flags = (glibc.Glibc_core.configure_flags - ' --without-fp') + + ' --without-fp')
--- a/gub/specs/linux-arm-softfloat/glibc.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/linux-arm-softfloat/glibc.py Tue Sep 29 12:39:36 2009 +0200 @@ -12,4 +12,4 @@ return (glibc.Glibc.enable_add_ons (self) .replace ('--enable-add-ons=nptl', '')) configure_variables = (glibc.Glibc.configure_variables - ' --without-fp') + + ' --without-fp')
--- a/gub/specs/noweb.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/noweb.py Tue Sep 29 12:39:36 2009 +0200 @@ -1,3 +1,4 @@ +from gub import misc from gub import target class Noweb (target.AutoBuild): @@ -7,6 +8,12 @@ simplicity, extensibility, and language-independence. ''' source = 'http://www.eecs.harvard.edu/~nr/noweb/dist/noweb-2.11b.tgz' + subpackage_names = [''] + install_command = misc.join_lines (''' +mkdir -p %(install_prefix)s/bin %(install_prefix)s/lib %(install_prefix)s/share/man/man1 %(install_prefix)s/share/tex/inputs +&& make %(compile_flags)s DESTDIR=%(install_root)s install +''') + license_files = ['%(srcdir)s/src/COPYRIGHT'] def __init__ (self, settings, source): target.TarBall.__init__ (self, settings, source) self.BIN='%(install_prefix)s/bin' @@ -18,10 +25,3 @@ make_flags = 'BIN=%(install_prefix)s/bin LIB=%(install_prefix)s/lib MAN=%(install_prefix)s/share/man TEXINPUTS=%(install_prefix)s/share/tex/inputs' def configure (self): self.shadow_tree ('%(srcdir)s/src', '%(builddir)s') - subpackage_names = [''] - from gub import misc - install_command = misc.join_lines (''' -mkdir -p %(install_prefix)s/bin %(install_prefix)s/lib %(install_prefix)s/share/man/man1 %(install_prefix)s/share/tex/inputs -&& make %(compile_flags)s DESTDIR=%(install_root)s install -''') - license_files = ['%(srcdir)s/src/COPYRIGHT']
--- a/gub/specs/openoffice.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/openoffice.py Tue Sep 29 12:39:36 2009 +0200 @@ -1,6 +1,9 @@ import operator import os import re +import sys +if sys.version.startswith ('3'): + from functools import reduce # from gub.syntax import printf from gub import context
--- a/gub/specs/root-image.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/root-image.py Tue Sep 29 12:39:36 2009 +0200 @@ -2,7 +2,7 @@ class Root_image (build.NullBuild): source = 'url://host/root-image-1.0.tar.gz' - busybox = [ + busybox = [ 'dhcp', 'psmisc', 'tinylogin', @@ -14,6 +14,7 @@ 'dropbear', 'sysvinit', ] + subpackage_names = [''] def get_ipkg_dependencies (self): busybox = ['makedevs'] return [ @@ -39,7 +40,6 @@ 'tslib-conf', 'update-rc.d', ] - subpackage_names = [''] def install_ipkg (self, i): fakeroot_cache = self.builddir () + '/fakeroot.cache' self.fakeroot (self.expand (self.settings.fakeroot, locals ()))
--- a/gub/specs/texlive.py Tue Sep 29 12:23:14 2009 +0200 +++ b/gub/specs/texlive.py Tue Sep 29 12:39:36 2009 +0200 @@ -43,6 +43,60 @@ 'tools::t1utils', 'zlib', ] +##--with-system-kpathsea + common_configure_flags = misc.join_lines (''' +--disable-cjkutils +--disable-dvi2tty +--disable-dvipdfmx +--disable-dvipng +--disable-lcdf-typetools +--disable-multiplatform +--disable-native-texlive-build +--disable-psutils +--disable-t1utils +--disable-texinfo +--disable-xdvipdfmx +--disable-xetex +--enable-ipc +--enable-omega +--enable-oxdvik +--enable-pdflatex +--enable-pdftex +--enable-shared +--enable-web2c +--with-dialog +--with-etex +--with-freetype2-include=%(system_prefix)s/include/freetype2 +--with-pnglib-include=%(system_prefix)s/include/libpng12 +--with-system-freetype2 +--with-system-gd +--with-system-ncurses +--with-system-pnglib +--with-system-t1lib +--with-system-tifflib +--with-system-zlib +--without-freetype +--without-icu +--without-sam2p +--without-system-freetype +--without-texi2html +--without-ttf2pk +--without-xdvipdfmx +--without-xetex +''') + configure_command = ('export TEXMFMAIN=%(srcdir)s/texmf;' + + target.AutoBuild.configure_command) + configure_flags = (target.AutoBuild.configure_flags + + '%(common_configure_flags)s' + + misc.join_lines (''' +--with-x +--with-mf-x-toolkit=xaw +--with-xdvi-x-toolkit=xaw +--x-includes=%(system_prefix)s/X11R6/include +--x-libraries=%(system_prefix)s/X11R6/lib +''')) + destdir_install_broken = True + license_files = ['%(srcdir)s/LICENSE.TL'] def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) def fixed_version (self): @@ -98,67 +152,12 @@ if texmf_dist: self.texmf_dist_repo.update_workdir (self.expand ('%(srcdir)s/texmf-dist')) self.func (defer) - def common_configure_flags (self): -##--with-system-kpathsea - return misc.join_lines (''' ---disable-cjkutils ---disable-dvi2tty ---disable-dvipdfmx ---disable-dvipng ---disable-lcdf-typetools ---disable-multiplatform ---disable-native-texlive-build ---disable-psutils ---disable-t1utils ---disable-texinfo ---disable-xdvipdfmx ---disable-xetex ---enable-ipc ---enable-omega ---enable-oxdvik ---enable-pdflatex ---enable-pdftex ---enable-shared ---enable-web2c ---with-dialog ---with-etex ---with-freetype2-include=%(system_prefix)s/include/freetype2 ---with-pnglib-include=%(system_prefix)s/include/libpng12 ---with-system-freetype2 ---with-system-gd ---with-system-ncurses ---with-system-pnglib ---with-system-t1lib ---with-system-tifflib ---with-system-zlib ---without-freetype ---without-icu ---without-sam2p ---without-system-freetype ---without-texi2html ---without-ttf2pk ---without-xdvipdfmx ---without-xetex -''') - configure_command = ('export TEXMFMAIN=%(srcdir)s/texmf;' - target.AutoBuild.configure_command) - configure_flags = (target.AutoBuild.configure_flags - + '%(common_configure_flags)s' - + misc.join_lines (''' ---with-x ---with-mf-x-toolkit=xaw ---with-xdvi-x-toolkit=xaw ---x-includes=%(system_prefix)s/X11R6/include ---x-libraries=%(system_prefix)s/X11R6/lib -''')) - destdir_install_broken = True def install (self): target.AutoBuild.install (self) self.system (''' rsync -v -a %(srcdir)s/texmf %(install_prefix)s/share/ rsync -v -a %(srcdir)s/texmf-dist %(install_prefix)s/share/ || : ''') - license_files = ['%(srcdir)s/LICENSE.TL'] # FIXME: shared for all vc packages def srcdir (self): return '%(allsrcdir)s/%(name)s-%(version)s'