def change_target_package(package): def update_libtool(self): package.map_locate(libtool_fix_allow_undefined, "%(builddir)s", "libtool") package.map_locate(libtool_disable_relink, "%(builddir)s", "libtool") package.update_libtool = misc.MethodOverrider(package.update_libtool, update_libtool) def install(whatsthis): package.post_install_smurf_exe() package.install = misc.MethodOverrider(package.install, install) @context.subst_method def so_extension(foo): return ".dll" package.so_extension = misc.MethodOverrider(package.nop, so_extension) # FIXME (cygwin): [why] do cross packages get here too? if isinstance(package, cross.AutoBuild): return build.change_dict( package, { "DLLTOOL": "%(toolchain_prefix)sdlltool", "DLLWRAP": "%(toolchain_prefix)sdllwrap", # note: this was cygwin only: ... "LDFLAGS": "-L%(system_prefix)s/lib -L%(system_prefix)s/bin -L%(system_prefix)s/lib/w32api", }, )
def __init__ (self, settings, source): Xerces_c.__init__ (self, settings, source) self.compile_dict.update ({ 'THREADS' : 'mthreads', 'LIBS': '', }) build.change_dict (self, self.compile_dict)
def change_target_package(package): def update_libtool(self): package.map_locate(libtool_fix_allow_undefined, '%(builddir)s', 'libtool') package.map_locate(libtool_disable_relink, '%(builddir)s', 'libtool') package.update_libtool = misc.MethodOverrider(package.update_libtool, update_libtool) def install(whatsthis): package.post_install_smurf_exe() package.install = misc.MethodOverrider(package.install, install) @context.subst_method def so_extension(foo): return '.dll' package.so_extension = misc.MethodOverrider(package.nop, so_extension) # FIXME (cygwin): [why] do cross packages get here too? if isinstance(package, cross.AutoBuild): return build.change_dict( package, { 'DLLTOOL': '%(toolchain_prefix)sdlltool', 'DLLWRAP': '%(toolchain_prefix)sdllwrap', # note: this was cygwin only: ... 'LDFLAGS': '-L%(system_prefix)s/lib -L%(system_prefix)s/bin -L%(system_prefix)s/lib/w32api', })
def __init__(self, settings, source): lilypond.LilyPond__simple.__init__(self, settings, source) build.change_dict( self, { 'PATH': '%(cross_prefix)s-ancient/bin:%(tools_prefix)s/bin:%(cross_prefix)s/bin:%(cross_prefix)s/%(target_architecture)s/bin:%(tools_cross_prefix)s/bin:' + os.environ['PATH'] })
def change_target_package(package): from gub import misc from gub import cross from gub import build cross.change_target_package(package) package.get_build_dependencies = misc.MethodOverrider( package.get_build_dependencies, strip_build_dep, (['zlib', 'zlib-devel'], )) package.get_dependency_dict = misc.MethodOverrider( package.get_dependency_dict, strip_dependency_dict, (['zlib', 'zlib-devel'], )) @context.subst_method def rpath(foo): return '' if not isinstance(package, cross.AutoBuild): package.rpath = misc.MethodOverrider(package.nop, rpath) @context.subst_method def so_extension(foo): return '.dylib' package.so_extension = misc.MethodOverrider(package.nop, so_extension) def autoupdate(foo): # somehow retriggers autoconf?!? # for i in ['configure.ac', 'configure']: for i in ['configure']: package.file_sub([ ('-fpascal-strings ', ''), ('-I(/Developer/Headers/FlatCarbon)', r'-I%(system_root)s\1'), ], '%(srcdir)s/' + i) package.autoupdate = misc.MethodOverrider(package.autoupdate, autoupdate) build.change_dict( package, { ## We get a lot of /usr/lib/ -> @executable_path/../lib/ ## we need enough space in the header to do these relocs. 'LDFLAGS': '-Wl,-headerpad_max_install_names ', ## UGH: gettext fix for ptrdiff_t 'CPPFLAGS': '-DSTDC_HEADERS', })
def change_target_package (package): from gub import misc from gub import cross from gub import build cross.change_target_package (package) package.get_build_dependencies = misc.MethodOverrider (package.get_build_dependencies, strip_build_dep, (['zlib', 'zlib-devel'],)) package.get_dependency_dict = misc.MethodOverrider (package.get_dependency_dict, strip_dependency_dict, (['zlib', 'zlib-devel'],)) @context.subst_method def rpath (foo): return '' if not isinstance (package, cross.AutoBuild): package.rpath = misc.MethodOverrider (package.nop, rpath) @context.subst_method def so_extension (foo): return '.dylib' package.so_extension = misc.MethodOverrider (package.nop, so_extension) def autoupdate (foo): # somehow retriggers autoconf?!? # for i in ['configure.ac', 'configure']: for i in ['configure']: package.file_sub ([('-fpascal-strings ', ''), ('-I(/Developer/Headers/FlatCarbon)', r'-I%(system_root)s\1'), ], '%(srcdir)s/' + i) package.autoupdate = misc.MethodOverrider (package.autoupdate, autoupdate) build.change_dict (package, { ## We get a lot of /usr/lib/ -> @executable_path/../lib/ ## we need enough space in the header to do these relocs. 'LDFLAGS': '-Wl,-headerpad_max_install_names ', ## UGH: gettext fix for ptrdiff_t 'CPPFLAGS' : '-DSTDC_HEADERS', })
def __init__ (self, settings, source): target.AutoBuild.__init__ (self, settings, source) self.compile_dict = { 'XERCESCROOT': '%(builddir)s', 'TRANSCODER': 'NATIVE', 'MESSAGELOADER': 'INMEM', 'NETACCESSOR': 'Socket', 'THREADS': 'pthread', 'BITSTOBUILD': '32', 'LIBS': ' -lpthread ', 'ALLLIBS': "${LIBS}", 'CFLAGS': ' -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_DEPRECATED_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET ', 'CXXFLAGS': ' -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_DEPRECATED_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET ', } build.change_dict (self, self.compile_dict) s = '' for i in list (self.compile_dict.keys ()): s += ' ' + i + '="' + self.compile_dict[i] + '"' self.make_flags = s self.configure_command = (self.make_flags + ' ' + target.AutoBuild.configure_command)
class Qtopia_core (target.AutoBuild): source = 'ftp://ftp.trolltech.com/qt/source/qtopia-core-opensource-src-4.2.2.tar.gz' dict = { 'CC': 'gcc', 'CXX': 'g++', #'LINK': '%(toolchain_prefix)sg++', } build.change_dict (self, dict) dependencies = ['freetype-devel', 'tslib-devel'] def patch (self): self.file_sub ([('pkg-config', '$PKG_CONFIG')], '%(srcdir)s/configure') #unset CC CXX; bash -x %(srcdir)s/configure configure_command = misc.join_lines (''' unset CC CXX; bash %(srcdir)s/configure -prefix %(prefix_dir)s -bindir %(prefix_dir)s/bin -libdir %(prefix_dir)s/lib -embedded %(cpu)s -fast -headerdir %(prefix_dir)s/include -datadir %(prefix_dir)s/share -sysconfdir /etc -xplatform qws/%(qmake_target_architecture)s -depths 8,16,32 -little-endian -release -no-cups -no-accessibility -no-freetype -no-glib -nomake demos -nomake examples -nomake tools -qt-mouse-tslib -qt-libjpeg -confirm-license -docdir %(prefix_dir)s/share/doc/qtopia -plugindir %(prefix_dir)s/share/qtopia/plugins -translationdir %(prefix_dir)s/share/qtopia/translations -examplesdir %(prefix_dir)s/share/doc/qtopia/examples -demosdir %(prefix_dir)s/share/doc/qtopia/demos -verbose ''') def configure (self): target.AutoBuild.configure (self) def dosub (logger, fname): loggedos.file_sub (logger, [('-I/usr', self.expand ('-I%(system_prefix)s'))], fname) self.map_locate (dosub, self.expand ('%(install_root)s'), 'Makefile') install_command = (target.AutoBuild.install_command + ' INSTALL_ROOT=%(install_root)s') license_files = ['%(srcdir)s/LICENSE.GPL'] def install (self): target.AutoBuild.install (self) self.system ('mkdir -p %(install_prefix)s/lib/pkgconfig') for i in ('QtCore.pc', 'QtGui.pc', 'QtNetwork.pc'): self.system (''' mv %(install_prefix)s/lib/%(i)s %(install_prefix)s/lib/pkgconfig/%(i)s ''', locals ()) self.file_sub ([('includedir', 'deepqtincludedir')], '%(install_prefix)s/lib/pkgconfig/%(i)s', env=locals ())
def __init__ (self, settings, source): lilypond.LilyPond__simple.__init__ (self, settings, source) build.change_dict (self, {'PATH': '%(cross_prefix)s-ancient/bin:%(tools_prefix)s/bin:%(cross_prefix)s/bin:%(cross_prefix)s/%(target_architecture)s/bin:%(tools_cross_prefix)s/bin:' + os.environ['PATH']})