コード例 #1
0
ファイル: conanfile.py プロジェクト: hoxnox/procman
 def do_build(self):
     cmake = CMake(self)
     cmake.build_dir = "{staging_dir}/src".format(staging_dir=self.staging_dir)
     tools.untargz("procman-{v}.tar.gz".format(v=self.version), cmake.build_dir)
     cmake.configure(defs={
             "CMAKE_INSTALL_PREFIX": self.staging_dir,
             "CMAKE_INSTALL_LIBDIR": "lib"
         }, source_dir="procman-{v}".format(v=self.version))
     cmake.build(target="install")
コード例 #2
0
 def do_build(self):
     cmake = CMake(self)
     tools.untargz("libressl-{v}.tar.gz".format(v=self.version), "{staging_dir}/src".format(staging_dir=self.staging_dir))
     src_dir = "{staging_dir}/src/libressl-{v}".format(staging_dir=self.staging_dir, v=self.version)
     cmake.build_dir = "{src_dir}/build".format(src_dir=src_dir)
     for file in sorted(glob("patch/*.patch")):
         self.output.info("Applying patch '{file}'".format(file=file))
         tools.patch(base_path=src_dir, patch_file=file, strip=0)
     cmake_defs = {"CMAKE_INSTALL_PREFIX": self.staging_dir,
                   "CMAKE_INSTALL_LIBDIR": "lib",
                   "BUILD_SHARED": "1" if self.options["libressl"].shared else "0"}
     cmake_defs.update(self.cmake_crt_linking_flags())
     cmake.configure(defs=cmake_defs, source_dir=src_dir)
     cmake.build(target="install")
コード例 #3
0
 def do_build(self):
     cmake = CMake(self)
     cmake.build_dir = "{staging_dir}/src-yadisk-upload".format(staging_dir=self.staging_dir)
     tools.untargz("yadisk-upload-{v}.tar.gz".format(v=self.version), cmake.build_dir)
     copy('conanbuildinfo.cmake', cmake.build_dir)
     cmake_defs = {"CMAKE_INSTALL_PREFIX": self.staging_dir,
                   "CMAKE_INSTALL_LIBDIR": "lib",
                   "WITH_TESTS": "1" if self.options.tests else "0",
                   "WITH_LIBS": "1",
                   "WITH_TOOLS": "1" if self.options.tools else "0"}
     if len(str(self.options.log)) != 0:
         cmake_defs.update({"WITH_LOG": self.options.log})
     cmake_defs.update(self.cmake_crt_linking_flags())
     cmake_defs.update(self.cmake_crt_linking_flags())
     cmake.configure(defs=cmake_defs, source_dir="yadisk-upload-{v}".format(v=self.version))
     cmake.build(target="install")
コード例 #4
0
ファイル: conanfile.py プロジェクト: hoxnox/conan-libencfs
    def do_build(self):
        cmake = CMake(self)

        tools.untargz("encfs-{v}.tar.gz".format(v=self.version), "{staging_dir}/src".format(staging_dir=self.staging_dir))
        src_dir = "{staging_dir}/src/encfs-{v}".format(staging_dir=self.staging_dir, v=self.version)
        cmake.build_dir = "{src_dir}/build".format(src_dir=src_dir)
        include_dir = "{staging_dir}/include/encfs".format(staging_dir=self.staging_dir)
        makedirs("{include_dir}/internal".format(include_dir=include_dir))
        makedirs(cmake.build_dir)

        for file in sorted(glob("patch/[0-9]*.patch")):
            self.output.info("Applying patch '{file}'".format(file=file))
            tools.patch(base_path=src_dir, patch_file=file, strip=0)
        if self.settings.os == "Android":
            for file in sorted(glob("patch/android-[0-9]*.patch")):
                self.output.info("Applying patch '{file}'".format(file=file))
                tools.patch(base_path=src_dir, patch_file=file, strip=0)


        cmake_prefix_path = ""
        for k,_ in self.deps_cpp_info.dependencies:
            cmake_prefix_path = "%s;%s" % (cmake_prefix_path, self.deps_cpp_info[k].rootpath)
        cmake_defs = {"CMAKE_INSTALL_PREFIX": self.staging_dir,
                      "CMAKE_INSTALL_LIBDIR": "lib",
                      "CMAKE_PREFIX_PATH": cmake_prefix_path,
                      "ENABLE_NLS": "OFF",
                      "BUILD_SHARED_LIBS": "OFF",
                      "INSTALL_LIBENCFS": "ON"}
        cmake.verbose = True
        cmake_defs.update(self.cmake_crt_linking_flags())
        cmake.configure(defs=cmake_defs, source_dir=src_dir)
        cmake.build(target="install")
        for file in glob("{src_dir}/encfs/*.h".format(src_dir=src_dir)):
            copy(file, include_dir)
        copy("{src_dir}/internal/easylogging++.h".format(src_dir=src_dir),
                "{include_dir}/internal".format(include_dir=include_dir))
        copy("{build_dir}/internal/tinyxml2-3.0.0/libtinyxml2.a".format(build_dir=cmake.build_dir),
                "{staging_dir}/lib".format(staging_dir=self.staging_dir))
        copy("{build_dir}/config.h".format(build_dir=cmake.build_dir), include_dir)