Ejemplo n.º 1
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')

    # Download files
    tools.checkCreateDir(dep_build_dir+"/dune")
    for i in range(3):
        tools.checkDeleteDirectory(dep_build_dir+"/dune/"+dune_names[i])
        print "Extracting "+dune_names[i]
        try:
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        except IOError:
            # Possibly a corrupted/truncated file. Try to download once again
            download(root,config,force=True)
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        os.rename(dep_build_dir+"/dune/"+dune_extract_names[i],
                  dep_build_dir+"/dune/"+dune_names[i])
        if i==1:
            print "Patching "+dune_names[i]
            patch=py_patch.fromfile(root+"/installer/patches/dune-grid.patch")
            cwd=os.getcwd()
            os.chdir(dep_build_dir+"/dune/dune-grid/dune/grid/utility")
            patch.apply()
            os.chdir(cwd)
    # Copy over dune-foamgrid
    tools.checkDeleteDirectory(dep_build_dir+"/dune/dune-foamgrid")
    shutil.copytree(root+"/contrib/dune/dune-foamgrid",
                    dep_build_dir+"/dune/dune-foamgrid")

    tools.setCompilerOptions(config,'Dune')
Ejemplo n.º 2
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')

    # Download files
    tools.checkCreateDir(dep_build_dir+"/dune")
    for i in range(4):
        tools.checkDeleteDirectory(dep_build_dir+"/dune/"+dune_names[i])
        print "Extracting "+dune_names[i]
        try:
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        except IOError:
            # Possibly a corrupted/truncated file. Try to download once again
            download(root,config,force=True)
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        os.rename(dep_build_dir+"/dune/"+dune_extract_names[i],
                  dep_build_dir+"/dune/"+dune_names[i])
        if i==3:
            print "Patching "+dune_names[i]
            cwd=os.getcwd()

            os.chdir(dep_build_dir+"/dune/dune-localfunctions/dune/localfunctions/raviartthomas/raviartthomas02d")
            patch=py_patch.fromfile(root+"/installer/patches/dune-localfunctions_raviartthomas.patch")
            patch.apply()

            os.chdir(dep_build_dir+"/dune/dune-localfunctions/dune/localfunctions/lagrange/pk2d")
            patch=py_patch.fromfile(root+"/installer/patches/dune-localfunctions_pk2dlocalbasis.h.patch")
            patch.apply()

            os.chdir(cwd)
        elif i==2:
            print "Patching "+dune_names[i]
            cwd = os.getcwd()
            os.chdir(dep_build_dir+"/dune")
            patch = py_patch.fromfile(root+"/installer/patches/dune-grid_dgfparser.patch")
            patch.apply()
            
            patch = py_patch.fromfile(root+"/installer/patches/dune-grid_yaspgrid.patch")
            patch.apply()
            os.chdir(cwd)
        elif i==0:
            print "Patching "+dune_names[i]
            cwd = os.getcwd()
            os.chdir(dep_build_dir+"/dune")
            patch = py_patch.fromfile(root+"/installer/patches/dune-common_nullptr.patch")
            patch.apply()
            os.chdir(cwd)


    # Copy over dune-foamgrid
    tools.checkDeleteDirectory(dep_build_dir+"/dune/dune-foamgrid")
    shutil.copytree(root+"/contrib/dune/dune-foamgrid",
                    dep_build_dir+"/dune/dune-foamgrid")

    tools.setCompilerOptions(config,'Dune')
Ejemplo n.º 3
0
def createDirectories(root,config):

    dep_build_dir=config.get('Main','dependency_build_dir')
    checkCreateDir(dep_build_dir)
    dep_download_dir=config.get('Main','dependency_download_dir')
    checkCreateDir(dep_download_dir)
    bempp_build_dir=config.get('Bempp','build_dir')
    checkCreateDir(bempp_build_dir)
    checkCreateDir(root+"/installer/files")

    prefix = config.get('Main','prefix')
    checkCreateDir(prefix+"/bempp")
    checkCreateDir(prefix+"/bempp/lib")
    checkCreateDir(prefix+"/bempp/include")
Ejemplo n.º 4
0
def bootstrap(root, config):

    cleanUp(root, config)
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    checkCreateDir(dep_build_dir)
    dep_download_dir = config.get('Main', 'dependency_download_dir')
    checkCreateDir(dep_download_dir)
    bempp_build_dir = config.get('Bempp', 'build_dir')
    checkCreateDir(bempp_build_dir)

    checkCreateDir(prefix + "/bempp")
    checkCreateDir(prefix + "/bempp/lib")
    checkCreateDir(prefix + "/bempp/include")

    cmake.download(root, config)

    downloadDependencies(root, config)

    cmake.prepare(root, config)
    cmake.configure(root, config)
    cmake.build(root, config)
    cmake.install(root, config)
Ejemplo n.º 5
0
def bootstrap(root,config):

    cleanUp(root,config)
    dep_build_dir=config.get('Main','dependency_build_dir')
    checkCreateDir(dep_build_dir)
    dep_download_dir=config.get('Main','dependency_download_dir')
    checkCreateDir(dep_download_dir)
    bempp_build_dir=config.get('Bempp','build_dir')
    checkCreateDir(bempp_build_dir)

    checkCreateDir(prefix+"/bempp")
    checkCreateDir(prefix+"/bempp/lib")
    checkCreateDir(prefix+"/bempp/include")

    cmake.download(root,config)

    downloadDependencies(root,config)

    cmake.prepare(root,config)
    cmake.configure(root,config)
    cmake.build(root,config)
    cmake.install(root,config)