def compile(self): self.download() tar("xfz", self.src_file) unpack_dir = "CLAPACK-{0}".format(self.version) clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(unpack_dir): with open("make.inc", 'w') as makefile: content = [ "SHELL = /bin/sh\n", "PLAT = _LINUX\n", "CC = " + str(clang) + "\n", "CXX = " + str(clang_cxx) + "\n", "CFLAGS = -I$(TOPDIR)/INCLUDE\n", "LOADER = " + str(clang) + "\n", "LOADOPTS = \n", "NOOPT = -O0 -I$(TOPDIR)/INCLUDE\n", "DRVCFLAGS = $(CFLAGS)\n", "F2CCFLAGS = $(CFLAGS)\n", "TIMER = INT_CPU_TIME\n", "ARCH = ar\n", "ARCHFLAGS = cr\n", "RANLIB = ranlib\n", "BLASLIB = ../../blas$(PLAT).a\n", "XBLASLIB = \n", "LAPACKLIB = lapack$(PLAT).a\n", "F2CLIB = ../../F2CLIBS/libf2c.a\n", "TMGLIB = tmglib$(PLAT).a\n", "EIGSRCLIB = eigsrc$(PLAT).a\n", "LINSRCLIB = linsrc$(PLAT).a\n", "F2CLIB = ../../F2CLIBS/libf2c.a\n" ] makefile.writelines(content) run.run(make["-j", CFG["jobs"], "f2clib", "blaslib"]) with local.cwd(local.path("BLAS") / "TESTING"): run.run(make["-j", CFG["jobs"], "-f", "Makeblat2"]) run.run(make["-j", CFG["jobs"], "-f", "Makeblat3"])
def compile(self): self.download() js_dir = local.path(self.src_file) / "js" / "src" clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(js_dir): make_src_pkg = local["./make-source-package.sh"] with local.env( DIST=self.builddir, MOZJS_MAJOR_VERSION=0, MOZJS_MINOR_VERSION=0, MOZJS_PATCH_VERSION=0): make_src_pkg() mozjs_dir = local.path("mozjs-0.0.0") mozjs_src_dir = mozjs_dir / "js" / "src" tar("xfj", mozjs_dir + ".tar.bz2") with local.cwd(mozjs_src_dir): mkdir("obj") autoconf = local["autoconf-2.13"] autoconf() with local.cwd("obj"): with local.env(CC=str(clang), CXX=str(clang_cxx)): configure = local["../configure"] configure = configure["--without-system-zlib"] run.run(configure) mozjs_obj_dir = mozjs_src_dir / "obj" with local.cwd(mozjs_obj_dir): run.run(make["-j", str(CFG["jobs"])])
def compile(self): super(GZip, self).compile() test_archive = self.test_archive test_url = self.test_url + test_archive download.Wget(test_url, test_archive) tar("fxz", test_archive)
def prepare(self): super(GZip, self).prepare() test_archive = self.test_archive test_url = self.test_url + test_archive Wget(test_url, test_archive) tar("fxz", test_archive)
def compile(self): self.download() polybench_opts = CFG["projects"]["polybench"] verify = bool(polybench_opts["verify"]) workload = str(polybench_opts["workload"]) tar('xfz', self.src_file) src_dir_name = "polybench-c-{0}".format(self.version) src_dir = local.cwd / src_dir_name src_sub = src_dir / self.path_dict[self.name] / self.name src_file = src_sub / (self.name + ".c") utils_dir = src_dir / "utilities" polybench_opts = [ "-DPOLYBENCH_USE_C99_PROTO", "-D" + str(workload), "-DPOLYBENCH_USE_RESTRICT" ] if verify: polybench_opts = self.compile_verify([ "-I", utils_dir, "-I", src_sub, utils_dir / "polybench.c", src_file, "-lm" ], polybench_opts) clang = compiler.cc(self) run.run( clang["-I", utils_dir, "-I", src_sub, polybench_opts, utils_dir / "polybench.c", src_file, "-lm", "-o", self.name])
def pack_container(in_container, out_file): """ Pack a container image into a .tar.bz2 archive. Args: in_container (str): Path string to the container image. out_file (str): Output file name. """ container_filename = os.path.split(out_file)[-1] out_container = os.path.join("container-out", container_filename) out_container = os.path.abspath(out_container) out_tmp_filename = os.path.basename(out_container) out_dir = os.path.dirname(out_container) # Pack the results to: container-out with local.cwd(in_container): tar("cjf", out_container, ".") c_hash = update_hash(out_tmp_filename, out_dir) if not os.path.exists(out_dir): mkdir("-p", out_dir) mv(out_container, out_file) mv(out_container + ".hash", out_file + ".hash") new_container = {"path": out_file, "hash": str(c_hash)} settings.CFG["container"]["known"].value().append(new_container)
def compile(self): super(XZ, self).compile() test_archive = self.test_archive test_url = self.test_url + test_archive download.Wget(test_url, test_archive) tar("fxz", test_archive)
def compile(self): self.download() js_dir = local.path(self.src_file) / "js" / "src" clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(js_dir): make_src_pkg = local["./make-source-package.sh"] with local.env(DIST=self.builddir, MOZJS_MAJOR_VERSION=0, MOZJS_MINOR_VERSION=0, MOZJS_PATCH_VERSION=0): make_src_pkg() mozjs_dir = local.path("mozjs-0.0.0") mozjs_src_dir = mozjs_dir / "js" / "src" tar("xfj", mozjs_dir + ".tar.bz2") with local.cwd(mozjs_src_dir): mkdir("obj") autoconf = local["autoconf-2.13"] autoconf() with local.cwd("obj"): with local.env(CC=str(clang), CXX=str(clang_cxx)): configure = local["../configure"] configure = configure["--without-system-zlib"] run.run(configure) mozjs_obj_dir = mozjs_src_dir / "obj" with local.cwd(mozjs_obj_dir): run.run(make["-j", str(CFG["jobs"])])
def compile(self): self.emerge_env = dict(USE="-mpi -doc") super(Lammps, self).compile() test_archive = self.test_archive test_url = self.test_url + test_archive download.Wget(test_url, test_archive) tar("fxz", test_archive)
def compile(self): self.download() tar("xfz", self.src_file) unpack_dir = local.path('ruby-{0}'.format(self.version)) clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(unpack_dir): with local.env(CC=str(clang), CXX=str(clang_cxx)): configure = local["./configure"] run.run(configure["--with-static-linked-ext", "--disable-shared"]) run.run(make["-j", CFG["jobs"]])
def compile(self): self.download() tar('xfj', self.src_file) unpack_dir = "ffmpeg-{0}".format(self.version) clang = compiler.cc(self) with local.cwd(unpack_dir): download.Rsync(self.fate_uri, self.fate_dir) configure = local["./configure"] run.run(configure[ "--disable-shared", "--cc=" + str(clang), "--extra-ldflags=" + " ".join(self.ldflags), "--samples=" + self.fate_dir]) run.run(make["clean"]) run.run(make["-j{0}".format(str(CFG["jobs"])), "all"])
def compile(self): self.download() tar("xfJ", self.src_file) unpack_dir = local.path('Python-{0}'.format(self.version)) clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(unpack_dir): configure = local["./configure"] with local.env(CC=str(clang), CXX=str(clang_cxx)): run.run(configure["--disable-shared", "--without-gcc"]) run.run(make)
def compile(self): self.download() tar("xf", self.src_file) unpack_dir = local.path('tcc-{0}.tar.bz2'.format(self.version)) clang = compiler.cc(self) with local.cwd(unpack_dir): mkdir("build") with local.cwd("build"): configure = local["../configure"] run.run(configure["--cc=" + str(clang), "--with-libgcc"]) run.run(make)
def compile(self): self.download() unpack_dir = local.path('p7zip_{0}'.format(self.version)) tar('xfj', self.src_file) cp(unpack_dir / "makefile.linux_clang_amd64_asm", unpack_dir / "makefile.machine") clang = compiler.cc(self) clang_cxx = compiler.cxx(self) with local.cwd(unpack_dir): run.run(make["CC=" + str(clang), "CXX=" + str(clang_cxx), "clean", "all"])
def compile(self): self.download() tar("xfJ", self.src_file) unpack_dir = "gzip-{0}.tar.xz".format(self.version) testfiles = [local.path(self.testdir) / x for x in self.testfiles] cp(testfiles, '.') clang = compiler.cc(self) with local.cwd(unpack_dir): configure = local["./configure"] with local.env(CC=str(clang)): run.run(configure["--disable-dependency-tracking", "--disable-silent-rules", "--with-gnu-ld"]) run.run(make["-j" + str(CFG["jobs"]), "clean", "all"])
def pack_container(in_container, out_file): container_filename = os.path.split(out_file)[-1] out_container = os.path.join("container-out", container_filename) out_container = os.path.abspath(out_container) out_tmp_filename = os.path.basename(out_container) out_dir = os.path.dirname(out_container) # Pack the results to: container-out with local.cwd(in_container): tar("cjf", out_container, ".") c_hash = update_hash(out_tmp_filename, out_dir) if not os.path.exists(out_dir): mkdir("-p", out_dir) mv(out_container, out_file) mv(out_container + ".hash", out_file + ".hash") new_container = {"path": out_file, "hash": str(c_hash)} CFG["container"]["known"].value().append(new_container)
def compile(self): self.download() self.cflags += ["-fPIC"] clang = compiler.cc(self) tar("xfz", self.src_file) unpack_dir = local.path("libressl-{0}".format(self.version)) configure = local[unpack_dir / "configure"] with local.cwd(unpack_dir): with local.env(CC=str(clang)): run.run(configure["--disable-asm", "--disable-shared", "--enable-static", "--disable-dependency-tracking", "--with-pic=yes"]) run.run(make["-j8"]) make_tests = make["-Ctests", "-j8"] run.run(make_tests[LibreSSL.BINARIES])
def compile(self): self.download() tar("xf", self.src_file) unpack_dir = local.path('rodinia_{0}'.format(self.version)) c_compiler = compiler.cc(self) cxx_compiler = compiler.cxx(self) config_dir = self.config['dir'] config_src = self.config['src'] config_flags = self.config['flags'] with local.cwd(unpack_dir / config_dir): for outfile, srcfiles in config_src.items(): cls = type(self) _cc = cls.select_compiler(c_compiler, cxx_compiler) if "flags" in self.config: _cc = _cc[config_flags] _cc = _cc[srcfiles] _cc = _cc["-o", outfile] run.run(_cc)
def compile(self): self.download() tar('xfz', self.src_file) test_dir = local.path(self.testdir) testfiles = [test_dir / x for x in self.testfiles] cp(testfiles, self.builddir) unpack_dir = local.path('xz-{0}'.format(self.version)) clang = compiler.cc(self) with local.cwd(unpack_dir): configure = local["./configure"] with local.env(CC=str(clang)): run.run(configure["--enable-threads=no", "--with-gnu-ld=yes", "--disable-shared", "--disable-dependency-tracking", "--disable-xzdec", "--disable-lzmadec", "--disable-lzmainfo", "--disable-lzma-links", "--disable-scripts", "--disable-doc"]) run.run(make["CC=" + str(clang), "clean", "all"])
def pack_container(in_container, out_file): """ Pack a container image into a .tar.bz2 archive. Args: in_container (str): Path string to the container image. out_file (str): Output file name. """ container_filename = local.path(out_file).basename out_container = local.cwd / "container-out" / container_filename out_dir = out_container.dirname # Pack the results to: container-out with local.cwd(in_container): tar("cjf", out_container, ".") c_hash = download.update_hash(out_container) if out_dir.exists(): mkdir("-p", out_dir) mv(out_container, out_file) mv(out_container + ".hash", out_file + ".hash") new_container = {"path": out_file, "hash": str(c_hash)} CFG["container"]["known"] += new_container
def configure(self): js_dir = path.join(self.src_dir, "js", "src") clang = lt_clang(self.cflags, self.ldflags, self.compiler_extension) clang_cxx = lt_clang_cxx(self.cflags, self.ldflags, self.compiler_extension) with local.cwd(js_dir): make_src_pkg = local["./make-source-package.sh"] with local.env(DIST=self.builddir, MOZJS_MAJOR_VERSION=0, MOZJS_MINOR_VERSION=0, MOZJS_PATCH_VERSION=0): make_src_pkg() mozjs_dir = "mozjs-0.0.0" tar("xfj", mozjs_dir + ".tar.bz2") with local.cwd(path.join(mozjs_dir, "js", "src")): mkdir("obj") autoconf = local["autoconf-2.13"] autoconf() with local.cwd("obj"): with local.env(CC=str(clang), CXX=str(clang_cxx)): configure = local["../configure"] run(configure)
def configure(self): js_dir = path.join(self.src_dir, "js", "src") clang = cc(self) clang_cxx = cxx(self) with local.cwd(js_dir): make_src_pkg = local["./make-source-package.sh"] with local.env(DIST=self.builddir, MOZJS_MAJOR_VERSION=0, MOZJS_MINOR_VERSION=0, MOZJS_PATCH_VERSION=0): make_src_pkg() mozjs_dir = "mozjs-0.0.0" tar("xfj", mozjs_dir + ".tar.bz2") with local.cwd(path.join(mozjs_dir, "js", "src")): mkdir("obj") autoconf = local["autoconf-2.13"] autoconf() with local.cwd("obj"): with local.env(CC=str(clang), CXX=str(clang_cxx)): configure = local["../configure"] configure = configure["--without-system-zlib"] run(configure)
def download(self): Wget(self.src_uri, self.SRC_FILE) tar('xfz', self.SRC_FILE) Wget(self.libmcrypt_uri, self.libmcrypt_file) tar('xfz', self.libmcrypt_file) Wget(self.mhash_uri, self.mhash_file) tar('xfz', self.mhash_file)
def compile(self): self.download() download.Wget(self.boost_src_uri, self.boost_src_file) tar("xfj", self.boost_src_file) cp("-ar", local.path(self.testdir) / "cfg", '.') cp("-ar", local.path(self.testdir) / "etc", '.') cp("-ar", local.path(self.testdir) / "scenes", '.') cp("-ar", local.path(self.testdir) / "share", '.') cp("-ar", local.path(self.testdir) / "test", '.') clang = compiler.cc(self) clang_cxx = compiler.cxx(self) # First we have to prepare boost for lady povray... boost_prefix = "boost-install" with local.cwd(self.boost_src_dir): mkdir(boost_prefix) bootstrap = local["./bootstrap.sh"] run.run(bootstrap["--with-toolset=clang", "--prefix=\"{0}\"".format(boost_prefix)]) _b2 = local["./b2"] run.run( _b2["--ignore-site-config", "variant=release", "link=static", "threading=multi", "optimization=speed", "install"]) src_file = local.path(self.src_file) with local.cwd(src_file): with local.cwd("unix"): sh("prebuild.sh") configure = local["./configure"] with local.env( COMPILED_BY="BB <*****@*****.**>", CC=str(clang), CXX=str(clang_cxx)): run.run(configure["--with-boost=" + boost_prefix]) run.run(make["all"])
def compile(self): self.download() download.Wget(self.boost_src_uri, self.boost_src_file) tar("xfj", self.boost_src_file) cp("-ar", local.path(self.testdir) / "cfg", '.') cp("-ar", local.path(self.testdir) / "etc", '.') cp("-ar", local.path(self.testdir) / "scenes", '.') cp("-ar", local.path(self.testdir) / "share", '.') cp("-ar", local.path(self.testdir) / "test", '.') clang = compiler.cc(self) clang_cxx = compiler.cxx(self) # First we have to prepare boost for lady povray... boost_prefix = "boost-install" with local.cwd(self.boost_src_dir): mkdir(boost_prefix) bootstrap = local["./bootstrap.sh"] run.run(bootstrap["--with-toolset=clang", "--prefix=\"{0}\"".format(boost_prefix)]) _b2 = local["./b2"] run.run(_b2["--ignore-site-config", "variant=release", "link=static", "threading=multi", "optimization=speed", "install"]) src_file = local.path(self.src_file) with local.cwd(src_file): with local.cwd("unix"): sh("prebuild.sh") configure = local["./configure"] with local.env(COMPILED_BY="BB <*****@*****.**>", CC=str(clang), CXX=str(clang_cxx)): run.run(configure["--with-boost=" + boost_prefix]) run.run(make["all"])
def compile(self): self.download() download.Wget(self.libmcrypt_uri, self.libmcrypt_file) download.Wget(self.mhash_uri, self.mhash_file) tar('xfz', self.src_file) tar('xfz', self.libmcrypt_file) tar('xfz', self.mhash_file) builddir = local.path(self.builddir) mcrypt_dir = builddir / "mcrypt-2.6.8" mhash_dir = builddir / self.mhash_dir libmcrypt_dir = builddir / self.libmcrypt_dir _cc = compiler.cc(self) _cxx = compiler.cxx(self) # Build mhash dependency with local.cwd(mhash_dir): configure = local["./configure"] with local.env(CC=_cc, CXX=_cxx): run.run(configure["--prefix=" + builddir]) run.run(make["-j", CFG["jobs"], "install"]) # Builder libmcrypt dependency with local.cwd(libmcrypt_dir): configure = local["./configure"] with local.env(CC=_cc, CXX=_cxx): run.run(configure["--prefix=" + builddir]) run.run(make["-j", CFG["jobs"], "install"]) with local.cwd(mcrypt_dir): configure = local["./configure"] lib_dir = builddir / "lib" inc_dir = builddir / "include" env = CFG["env"].value mod_env = dict( CC=_cc, CXX=_cxx, LD_LIBRARY_PATH=path.list_to_path( [str(lib_dir)] + env.get("LD_LIBRARY_PATH", [])), LDFLAGS="-L" + str(lib_dir), CFLAGS="-I" + str(inc_dir)) env.update(mod_env) with local.env(**env): run.run(configure["--disable-dependency-tracking", "--enable-static", "--disable-shared", "--with-libmcrypt=" + builddir, "--with-libmhash=" + builddir]) run.run(make["-j", CFG["jobs"]])
def download(self): Wget(self.src_uri, self.SRC_FILE) tar('xfz', path.join('.', self.SRC_FILE))
def download(self): Wget(self.src_uri, self.SRC_FILE) tar('xfz', self.SRC_FILE)
def download(self): Wget(self.src_uri, self.SRC_FILE) tar("xf", os.path.join('.', self.SRC_FILE))
def download(self): Wget(self.src_uri, self.src_file) tar('xfz', path.join(self.builddir, self.src_file))
def download(self): Wget(self.boost_src_uri, self.boost_src_file) Git(self.src_uri, self.SRC_FILE) tar("xfj", self.boost_src_file)
def download(self): Wget(self.src_uri, self.SRC_FILE) tar('xfj', self.SRC_FILE) with local.cwd(self.src_dir): Rsync(self.fate_uri, self.fate_dir)
def download(self): Wget(self.src_uri, self.SRC_FILE) tar("xfJ", self.SRC_FILE)
def download(self): Wget(self.src_uri, self.SRC_FILE) tar('xfz', path.join(self.builddir, self.SRC_FILE))