Example #1
0
 def run(self):
     utils.info("BEGIN " + self.get_name())
     utils.make_tmppath()
     utils.remove_from_native(CONF)
     confos = utils.compile_lib(CONF)
     if confos is not None:
         utils.copy_to_native(CONF)
     utils.info("END " + self.get_name())
 def run(self):
     utils.info("BEGIN " + self.get_name())
     utils.make_tmppath()
     utils.remove_from_native(CONF)
     confos = utils.compile_lib(CONF)
     if confos is not None:
         if utils.is_mac():
             utils.system_exec([
                 "install_name_tool -change \"/usr/local/lib/libz.1.so\" \"@loader_path/libz.so\" "
                 + confos["outname"]
             ], CONF["pathdst"])
         utils.copy_to_native(CONF)
     utils.info("END " + self.get_name())
Example #3
0
 def run(self):
     utils.info("BEGIN " + self.get_name())
     utils.make_tmppath()
     tarname=CONF["name"] + "-" + CONF["version"] + ".tar.gz"        
     utils.remove_from_native(CONF)
     if os.path.exists(CONF["pathdst"]):
         utils.remove_path(CONF["pathdst"])
     if os.path.exists(utils.PATHTMP + os.sep + tarname):
         utils.remove_path(utils.PATHTMP + os.sep + tarname)
     if os.path.exists(utils.PATHTMP + os.sep + CONF["name"] + "-" + CONF["version"]):
         utils.remove_path(utils.PATHTMP + os.sep + CONF["name"] + "-" + CONF["version"])
     utils.download_file(CONF["urlsrc"], utils.PATHTMP + os.sep + tarname)
     utils.untar_file(utils.PATHTMP + os.sep + tarname, utils.PATHTMP)
     utils.remove_file(utils.PATHTMP + os.sep + tarname)
     os.rename(utils.PATHTMP + os.sep + CONF["name"] + "-" + CONF["version"], CONF["pathdst"])
     
     if utils.is_mac():
         #CORREGGE configure
         apppth=CONF["pathdst"] + os.sep + "configure"
         f = codecs.open(apppth, encoding='utf-8')
         appdata = f.read()
         f.close()
         appdata=appdata.replace('.dylib','.so').replace("-dynamiclib","-shared")
         os.remove(apppth)
         f = codecs.open(apppth, encoding='utf-8', mode='w+')
         f.write(appdata)
         f.close()
         os.chmod(apppth, stat.S_IRWXU)
         
     
     if utils.is_windows():
         utils.system_exec(["mingw32-make.exe", "-fwin32/Makefile.gcc"],CONF["pathdst"])
     else:
         utils.system_exec(["./configure"],CONF["pathdst"])
         utils.system_exec(["make"],CONF["pathdst"])
      
     if utils.is_mac():   
         #CORREGGE zutil.h
         apppth=CONF["pathdst"] + os.sep + "zutil.h"
         f = codecs.open(apppth, encoding='utf-8')
         appdata = f.read()
         f.close()
         appdata=appdata.replace('#  define local static','//#  define local static')
         os.remove(apppth)
         f = codecs.open(apppth, encoding='utf-8', mode='w+')
         f.write(appdata)
         f.close()
     
     utils.copy_to_native(CONF)
     utils.info("END " + self.get_name())
Example #4
0
 def run(self):
     utils.info("BEGIN " + self.get_name())
     #PREPARE CONF        
     self._conf["pathsrc"]=".." + os.sep + self._name + os.sep + "src"
     self._conf["pathdst"]=self.get_path_tmp() + os.sep + self._name
     osn=None
     if utils.is_windows():
         osn="windows"
     elif utils.is_linux():
         osn="linux"                        
     elif utils.is_mac():
         osn="mac"
     if osn is not None:
         appcnf=self.get_os_config(osn)
         if appcnf is not None:
             self._conf[osn]=appcnf
     
     if self._b32bit and osn in self._conf:
         if "linker_flags" not in self._conf[osn]:
             self._conf[osn]["linker_flags"]="-m32"
         else:
             self._conf[osn]["linker_flags"]="-m32 " + self._conf[osn]["linker_flags"]
         if "cpp_compiler_flags" not in self._conf[osn]:
             self._conf[osn]["cpp_compiler_flags"]="-m32"
         else:
             self._conf[osn]["cpp_compiler_flags"]="-m32 " + self._conf[osn]["cpp_compiler_flags"]
             
     #START COMPILE CONF
     utils.make_tmppath(self.get_path_tmp())
     utils.remove_from_native(self.get_path_native(), self._conf)
     confos=utils.compile_lib(self._conf)
     if confos is not None:
         self.before_copy_to_native(osn)  
         utils.copy_to_native(self.get_path_native(),self._conf)
     utils.info("END " + self.get_name())